merge tracts from CLI

16 views
Skip to first unread message

Hannah Lindsey

unread,
Sep 14, 2025, 9:16:11 PM (10 days ago) Sep 14
to DSI Studio
Hi! Is there a way to load individual tract files, merge them into one tract, and then save them as a single tract file?

I was able to load multiple tracts and save them as a single file with --action=ana, but I want to merge them first, so I tried this:

dsi_studio \

--action=ana \

--source=sub-${id}.fz \

--tract=CorpusCallosum_ForcepsMinor.tt.gz,\

CorpusCallosum_Body.tt.gz,\

CorpusCallosum_ForcepsMajor.tt.gz,\

CorpusCallosum_Tapetum.tt.gz \

--cmd="[Tracts][merge_all]" \

--output=CorpusCallosum.tt.gz

but, as I'm sure you are aware, --cmd doesn't work with ana.

I also tried a similar command but with --action=vis, but I keep getting a "please load a fib file to run --action=vis" error, even though I definitely specified an existing fib file.

P.S. Does the fact that --action=vis tried to work mean it has returned as a CLI function!?!? If so, that would make me SO happy!!   :)

Frank Yeh

unread,
Sep 16, 2025, 11:18:31 PM (8 days ago) Sep 16
to lindse...@gmail.com, DSI Studio
I fixed the --action=vis function, and you should be able to merge tracts using it.  To use it specify --cmd=name_of_the_command,parameter+name_of_the_2nd_command,parameter+...
The command for merging tracts can be found in the command history.

--
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/f1144e30-8420-4341-8184-ab27ea58c9e0n%40googlegroups.com.

Hannah Lindsey

unread,
Sep 16, 2025, 11:39:24 PM (8 days ago) Sep 16
to Frank Yeh, Studio DSI
Amazing!!! Thank you. I’ll test it out tomorrow and let you know if I encounter any issues. 
_________________________________
Hannah M. Lindsey, PhD
Research Associate
TBI and Concussion Center
Department of Neurology
University of Utah

On Sep 16, 2025, at 11:18 pm, Frank Yeh <fran...@gmail.com> wrote:



Hannah Lindsey

unread,
Sep 17, 2025, 10:36:08 AM (8 days ago) Sep 17
to DSI Studio
Okay, I downloaded the updated version and tried the following:

dsi_studio \

--action=vis \

--source=${sub}/sub-02C1019.qsdr.fz \

--tract=${sub}/trks/CorpusCallosum_ForcepsMinor.tt.gz,${sub}/trks/CorpusCallosum_Body.tt.gz,${sub}/trks/CorpusCallosum_ForcepsMajor.tt.gz,${sub}/trks/CorpusCallosum_Tapetum.tt.gz \

--cmd=merge_all_tracts+save_tract,${sub}/trks/CorpusCallosum.tt.gz


This is what happened in the terminal: 

DSI Studio version: Hou "侯" Sep 17 2025

action=vis

┌──📟DSI Studio version: Hou "侯" Sep 17 2025

├──┬──📟command line

│  ├──thread_count=10

│  ├──source=/Volumes/AC/CENC-LPA-diff/fib/02C1019/sub-02C1019.qsdr.fz

│  ├──┬──📟run 

│  │  ├──┬──📂opening /Volumes/AC/CENC-LPA-diff/fib/02C1019/sub-02C1019.qsdr.fz

│  │  │  ├──fib_ver: 202504

│  │  │  ├──dim: 80 100 80 vs: 2 2 2 

│  │  │  ├──trans: -2 -0 0 79.5; -0 -2 0 81.5; -0 -0 2 -72; 0 0 0 1; 

│  │  │  ├──is qsdr: yes

│  │  │  ├──mask voxels: 270564

│  │  │  ├──┬──📟loading image volumes

│  │  │  │  └──⏱3ms

│  │  │  ├──template: human

│  │  │  └──⏱17ms

│  │  ├──┬──📟initializing tracking GUI

│  │  │  ├──create GUI objects

QAbstractItemView::commitData called with an editor that does not belong to this view

QAbstractItemView::commitData called with an editor that does not belong to this view

QAbstractItemView::commitData called with an editor that does not belong to this view

QAbstractItemView::commitData called with an editor that does not belong to this view

QAbstractItemView::commitData called with an editor that does not belong to this view

QAbstractItemView::commitData called with an editor that does not belong to this view

QAbstractItemView::commitData called with an editor that does not belong to this view

QAbstractItemView::commitData called with an editor that does not belong to this view

QAbstractItemView::commitData called with an editor that does not belong to this view

QAbstractItemView::commitData called with an editor that does not belong to this view

QAbstractItemView::commitData called with an editor that does not belong to this view

QAbstractItemView::commitData called with an editor that does not belong to this view

QAbstractItemView::commitData called with an editor that does not belong to this view

QAbstractItemView::commitData called with an editor that does not belong to this view

QAbstractItemView::commitData called with an editor that does not belong to this view

QAbstractItemView::commitData called with an editor that does not belong to this view

QAbstractItemView::commitData called with an editor that does not belong to this view

QAbstractItemView::commitData called with an editor that does not belong to this view

QAbstractItemView::commitData called with an editor that does not belong to this view

QAbstractItemView::commitData called with an editor that does not belong to this view

QAbstractItemView::commitData called with an editor that does not belong to this view

QAbstractItemView::commitData called with an editor that does not belong to this view

QAbstractItemView::commitData called with an editor that does not belong to this view

QAbstractItemView::commitData called with an editor that does not belong to this view

QAbstractItemView::commitData called with an editor that does not belong to this view

QAbstractItemView::commitData called with an editor that does not belong to this view

QAbstractItemView::commitData called with an editor that does not belong to this view

QAbstractItemView::commitData called with an editor that does not belong to this view

QAbstractItemView::commitData called with an editor that does not belong to this view

QAbstractItemView::commitData called with an editor that does not belong to this view

QAbstractItemView::commitData called with an editor that does not belong to this view

QAbstractItemView::commitData called with an editor that does not belong to this view

QAbstractItemView::commitData called with an editor that does not belong to this view

QAbstractItemView::commitData called with an editor that does not belong to this view

QAbstractItemView::commitData called with an editor that does not belong to this view

QAbstractItemView::commitData called with an editor that does not belong to this view

QAbstractItemView::commitData called with an editor that does not belong to this view

QAbstractItemView::commitData called with an editor that does not belong to this view

QAbstractItemView::commitData called with an editor that does not belong to this view

QAbstractItemView::commitData called with an editor that does not belong to this view

QAbstractItemView::commitData called with an editor that does not belong to this view

QAbstractItemView::commitData called with an editor that does not belong to this view

QAbstractItemView::commitData called with an editor that does not belong to this view

QAbstractItemView::commitData called with an editor that does not belong to this view

QAbstractItemView::commitData called with an editor that does not belong to this view

QAbstractItemView::commitData called with an editor that does not belong to this view

QAbstractItemView::commitData called with an editor that does not belong to this view

QAbstractItemView::commitData called with an editor that does not belong to this view

QAbstractItemView::commitData called with an editor that does not belong to this view

QAbstractItemView::commitData called with an editor that does not belong to this view

QAbstractItemView::commitData called with an editor that does not belong to this view

QAbstractItemView::commitData called with an editor that does not belong to this view

QAbstractItemView::commitData called with an editor that does not belong to this view

QAbstractItemView::commitData called with an editor that does not belong to this view

QAbstractItemView::commitData called with an editor that does not belong to this view

QAbstractItemView::commitData called with an editor that does not belong to this view

QAbstractItemView::commitData called with an editor that does not belong to this view

QAbstractItemView::commitData called with an editor that does not belong to this view

QAbstractItemView::commitData called with an editor that does not belong to this view

QAbstractItemView::commitData called with an editor that does not belong to this view

QAbstractItemView::commitData called with an editor that does not belong to this view

QAbstractItemView::commitData called with an editor that does not belong to this view

QAbstractItemView::commitData called with an editor that does not belong to this view

QAbstractItemView::commitData called with an editor that does not belong to this view

QAbstractItemView::commitData called with an editor that does not belong to this view

QAbstractItemView::commitData called with an editor that does not belong to this view

QAbstractItemView::commitData called with an editor that does not belong to this view

QAbstractItemView::commitData called with an editor that does not belong to this view

QAbstractItemView::commitData called with an editor that does not belong to this view

QAbstractItemView::commitData called with an editor that does not belong to this view

QAbstractItemView::commitData called with an editor that does not belong to this view

QAbstractItemView::commitData called with an editor that does not belong to this view

QAbstractItemView::commitData called with an editor that does not belong to this view

QAbstractItemView::commitData called with an editor that does not belong to this view

QAbstractItemView::commitData called with an editor that does not belong to this view

QAbstractItemView::commitData called with an editor that does not belong to this view

QAbstractItemView::commitData called with an editor that does not belong to this view

QAbstractItemView::commitData called with an editor that does not belong to this view

QAbstractItemView::commitData called with an editor that does not belong to this view

QAbstractItemView::commitData called with an editor that does not belong to this view

QAbstractItemView::commitData called with an editor that does not belong to this view

QAbstractItemView::commitData called with an editor that does not belong to this view

QAbstractItemView::commitData called with an editor that does not belong to this view

QAbstractItemView::commitData called with an editor that does not belong to this view

QAbstractItemView::commitData called with an editor that does not belong to this view

QAbstractItemView::commitData called with an editor that does not belong to this view

QAbstractItemView::commitData called with an editor that does not belong to this view

QAbstractItemView::commitData called with an editor that does not belong to this view

QAbstractItemView::commitData called with an editor that does not belong to this view

QAbstractItemView::commitData called with an editor that does not belong to this view

QAbstractItemView::commitData called with an editor that does not belong to this view

QAbstractItemView::commitData called with an editor that does not belong to this view

QAbstractItemView::commitData called with an editor that does not belong to this view

QAbstractItemView::commitData called with an editor that does not belong to this view

QAbstractItemView::commitData called with an editor that does not belong to this view

QAbstractItemView::commitData called with an editor that does not belong to this view

QAbstractItemView::commitData called with an editor that does not belong to this view

│  │  │  ├──prepare template and atlases

│  │  │  ├──initialize slices

│  │  │  ├──connect signal and slots 

│  │  │  ├──begin visualization

│  │  │  ├──GUI initialization complete

│  │  │  └──⏱111ms

│  │  ├──┬──📟initializing OpenGL

│  │  │  ├──version: 2.1 Metal - 89.4

│  │  │  ├──vendor: Apple

│  │  │  ├──renderer: Apple M1 Max

│  │  │  └──⏱0ms

│  │  ├──❌canceled

│  │  └──⏱382ms

│  └──⏱382ms

└──⏱1.346s


I copied the cmds from the command history, like you suggested.

I think the issue might be the license window that you have to accept and sign in to when the GUI opens, because when I add "--stay_open=1" to the --action=vis command, it doesn't go past that window (when I click "accept and sign in", it doesn't open the tracking window, just shows main DSI Studio window where you open the files).

If that is the issue, then it might be nice to have a way to accept and sign in on a loop on the command line so you don't have to click the button on the window each time. Again, I have 600 subjects to run this on, so that wouldn't be fun to have to press accept every few seconds for each one.

Frank Yeh

unread,
Sep 17, 2025, 10:39:16 AM (8 days ago) Sep 17
to Hannah Lindsey, Studio DSI
BTW, to merge the tracts in CLI. The updated version (just updated today, will be ready to download in one hour) supports --merge_all with --action=ana 

example:

--action=ana --source=some.fz --tract=1.tt.gz,2.tt.gz --merge_all --output=1_2.tt.gz

Frank Yeh

unread,
Sep 17, 2025, 10:43:55 AM (8 days ago) Sep 17
to lindse...@gmail.com, DSI Studio
The GUI of the agreement page seems to be getting in the way here.
I would use --action=ana with --merge_all in today's version. The Mac build takes a while, and should be ready in two hour or three.

Reply all
Reply to author
Forward
0 new messages