Fiber-Tracking Parameter Setting (Command Line)

22 views
Skip to first unread message

Darren Lee

unread,
Mar 2, 2026, 11:25:56 AM (5 days ago) Mar 2
to DSI Studio
Dear Dr. Yeh 

I am writing to seek clarification regarding Fiber Tracking using the CLI. I noticed that the tractography results generated via the CLI differ substantially from those obtained through the GUI.  Below is the CLI command I used:
dsi_studio \
--action=trk \
--source=${sub}/dwi/dsi_studio/${sub}_src.gqi.fz \
--output=${sub}/dwi/dsi_studio/${sub}_whole_brain_CLI \
--trk_format=trk \
--tip_iteration=2 \
--step_size=0.5 \
--turning_angle=55 \
--min_length=20 \
--max_length=200 \
--random_seed=42

From the screenshot, the tractogram labeled whole_brain in Step T3d: Tracts was generated via the GUI, while sub-0001_whole_brain_CLI was generated via the CLI. There appears to be a significant discrepancy between the tract distributions produced by the two methods. All tracking parameters configured in the GUI are shown under Step T3c: Options.  Could you please advise how I should modify my CLI command to ensure that the results closely match those obtained via the GUI? ScreenShot_2026-03-02_142946_546.png

Best regards,
Darren  


Darren Lee

unread,
Mar 3, 2026, 9:52:49 AM (4 days ago) Mar 3
to DSI Studio

Dear Dr. Yeh,

I have resolved the issue. It was caused by an incorrect overwrite setting on my end.

My apologies for the confusion.

Best regards,
Darren


On Mon, 2 Mar 2026 at 23:50, Darren Lee <darre...@gmail.com> wrote:
Hi Yeh, 
   
    In the CLI, I used --parameter_id to copy all the tracking parameters from the GUI, and the resulting whole-brain tractogram is similar to the one obtained from the GUI.  

    I have another quick question: when using --parameter_id, do I still need to manually set the output parameters (e.g., --output and --trk_format)? My updated CLI command is as follows:
sub=sub-0001

dsi_studio \
--action=trk \
--source=${sub}/dwi/dsi_studio/${sub}_src.gqi.fz \
--output=${sub}/dwi/dsi_studio/${sub}_whole_brain_CLI \
--trk_format=trk \
--parameter_id=c9A99193FE8D5123Fba3FcbA041b4843c40420Fba803FcCDCC4C3Ec
. However, I noticed that the output file is named whole_brain_template_GUI.tt.tt, which differs from the filename and format I specified using --output and --trk_format

  Additionally, when I loaded the CLI-generated file into DSI Studio, the whole-brain tractogram did not appear to be in the original space. I have attached a screenshot for reference.Additionally, when I loaded the CLI-generated file into DSI-Studio, the whole-brain tractogram did not appear to be in the original space. I have attached a screenshot for reference.
image.png

Best regards,
Darren  


--
You received this message because you are subscribed to a topic in the Google Groups "DSI Studio" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/dsi-studio/1G48vhe-Q5Q/unsubscribe.
To unsubscribe from this group and all its topics, send an email to dsi-studio+...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/dsi-studio/d802d023-4102-45b5-b673-3514c0f28c44n%40googlegroups.com.

Darren Lee

unread,
Mar 3, 2026, 9:52:52 AM (4 days ago) Mar 3
to DSI Studio
Hi Yeh, 
   
    In the CLI, I used --parameter_id to copy all the tracking parameters from the GUI, and the resulting whole-brain tractogram is similar to the one obtained from the GUI.  

    I have another quick question: when using --parameter_id, do I still need to manually set the output parameters (e.g., --output and --trk_format)? My updated CLI command is as follows:
sub=sub-0001

dsi_studio \
--action=trk \
--source=${sub}/dwi/dsi_studio/${sub}_src.gqi.fz \
--output=${sub}/dwi/dsi_studio/${sub}_whole_brain_CLI \
--trk_format=trk \
--parameter_id=c9A99193FE8D5123Fba3FcbA041b4843c40420Fba803FcCDCC4C3Ec
. However, I noticed that the output file is named whole_brain_template_GUI.tt.tt, which differs from the filename and format I specified using --output and --trk_format

  Additionally, when I loaded the CLI-generated file into DSI Studio, the whole-brain tractogram did not appear to be in the original space. I have attached a screenshot for reference.Additionally, when I loaded the CLI-generated file into DSI-Studio, the whole-brain tractogram did not appear to be in the original space. I have attached a screenshot for reference.
image.png

Best regards,
Darren  

On Mon, 2 Mar 2026 at 16:25, Darren Lee <darre...@gmail.com> wrote:

Frank Yeh

unread,
Mar 3, 2026, 9:58:10 AM (4 days ago) Mar 3
to darre...@gmail.com, DSI Studio
Glad this is resolved.
Best regards,
Frank

You received this message because you are subscribed to the Google Groups "DSI Studio" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dsi-studio+...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/dsi-studio/CAGbZhR6gNa76bMu_rDbCg7MAxr%2B6S4Ki21M-QN2FE%3DbqXPBuTQ%40mail.gmail.com.

Darren Lee

unread,
Mar 3, 2026, 8:20:53 PM (4 days ago) Mar 3
to DSI Studio

Hi Yeh,

I'm currently using Autotrack for OpticaRadiationLeft. In the GUI interface, parameters such as min_length and max_length can be set manually, while in the CLI these parameters cannot be specified when using --action=atk. I used the following CLI command and found that no streamlines were generated:

    dsi_studio --action=atk --source=sub-0001_src.gqi.fz --trk_format=trk.gz --track_id=ProjectionBasalGanglia_OpticRadiationL

However, in the GUI the streamlines for the OpticRadiationL tract can be generated successfully (see the attached screenshot).

Alternatively, in the CLI I tried using --action=trk with the following command:

    dsi_studio --action=trk --source=sub-0001_src.gqi.fz --output=sub-0001_OR_L --trk_format=trk --track_id=OpticRadiationL --parameter_id=c9A99193Fb803FdbF041b9643db803Fba04CDCC4C3Ec

The resulting tract was similar to what I obtained in the GUI using Autotrack.

Since the GUI is not available on our High-Performance Computing environment, I have to rely on the CLI. Given this limitation, would it be appropriate to use --action=trk with the corresponding track_id (and parameter_id) as a replacement for --action=atk in this case? 

For reference, the .fz file and the resulting .trk file (generated using --action=trk with --track_id=OpticRadiationL) have been uploaded via a private link for data sharing on the DSI Studio Google Group website.

Best regards,
Darren

ScreenShot_2026-03-02_234756_478.png
Reply all
Reply to author
Forward
0 new messages