Batch Tractography for along tract analysis

84 views
Skip to first unread message

Christian Gewinn (Christent)

unread,
Jun 26, 2025, 9:24:32 AMJun 26
to DSI Studio
Hello,

I am currently working on extracting the Fornix from .fz files using current DSI. I only got the output for average stastics of FA, AD, RD and MD(stat.txt) and another file apparently storing coordinates(tt.gz/.mat)  after running in batch analysis (Step B4) or via CLI. How can you do it all in batch processing for both averaged and along tract outputs in one go?

CLI command used for tractography: --action=atk --source=*.fz --track_id=Fornix --trk_format=mat --report --output=path/to/folder

Cheers,
Christian

Frank Yeh

unread,
Jun 26, 2025, 9:31:00 AMJun 26
to christia...@gmail.com, DSI Studio
try --export=dti_fa,ad,rd,md
> --
> 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/8b42c630-1bbb-431c-b6c4-1deb4b8dca53n%40googlegroups.com.
Message has been deleted

Christian Gewinn (Christent)

unread,
Jun 27, 2025, 12:14:28 PMJun 27
to DSI Studio
Can you please elaborate on the exporting. I cant wrap my head around it using the docs. If I use this on the fz file, how does it output the stats for fornix for me? It put out 4 compressed nifti folders im not quite sure what to make of. If I use it in the atk call, no extra files are generated.

Frank Yeh

unread,
Jun 27, 2025, 12:18:47 PMJun 27
to christia...@gmail.com, DSI Studio
You may try this. Also make sure to update DSI Studio to the latest version.

--action=atk --source=*.fz --track_id=Fornix --trk_format=mat
--output=path/to/folder --export=dti_fa,ad,rd,md


On Fri, Jun 27, 2025 at 12:14 PM Christian Gewinn (Christent)
<christia...@gmail.com> wrote:
>
> Can you please elaborate on the exporting. I cant wrap my head around it using the docs. If I use this on the fz file, how does it output the stats for fornix for me? It put out 4 compressed nifti folders im not quite sure what to make of. If I use it in the atk call, no extra files are generated.
>
>
> Frank Yeh schrieb am Donnerstag, 26. Juni 2025 um 15:31:00 UTC+2:
>>
>> try --export=dti_fa,ad,rd,md
>>
>> On Thu, Jun 26, 2025 at 9:24 AM Christian Gewinn (Christent)
>> <christia...@gmail.com> wrote:
>> >
>> > Hello,
>> >
>> > I am currently working on extracting the Fornix from .fz files using current DSI. I only got the output for average stastics of FA, AD, RD and MD(stat.txt) and another file apparently storing coordinates(tt.gz/.mat) after running in batch analysis (Step B4) or via CLI. How can you do it all in batch processing for both averaged and along tract outputs in one go?
>> >
>> > CLI command used for tractography: --action=atk --source=*.fz --track_id=Fornix --trk_format=mat --report --output=path/to/folder
>> >
>> > Cheers,
>> > Christian
>> >
>> > --
>> > 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/8b42c630-1bbb-431c-b6c4-1deb4b8dca53n%40googlegroups.com.
>
> --
> 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/6b57ae37-efec-4a31-9a7b-bec241760126n%40googlegroups.com.
Message has been deleted

Christian Gewinn (Christent)

unread,
Jun 30, 2025, 4:57:54 PMJun 30
to DSI Studio
Running the command

--action=atk --source=*.fz --track_id=Fornix --report=report.txt
--output=...\Tracto --export=dti_fa,ad,rd,md

on one subject of the same dataset yielded no extra files output.(only the stat and the tt.gz after updating to June27 version) Is that expected behaviour?

Sifting through the docs I found a similar piece(--export=...) using the ana function to export DTI metrics like this:

--action=ana --source=*.gqi.fz --tract=...\Tracto\ ProjectionBasalGanglia_ FornixR\*.ProjectionBasalGanglia_FornixR.tt.gz --export=dti_fa,rd,ad,md

Running this function on the fz files including the tt.gz output yielded me a seperate txt file for every metric(ad,rd,md,fa),
but the contents dont follow the expected dimensions of [fibercount]:100. Instead it has [fibercount]:[variable length]. 
If this is what I want I would need to know what this length represents and how it is set so I can do proper statistics on it.

PS: Just to clarify the original need, I want the along-the-tract metrics for the four parameters ad,rd,md,fa. I already ran the tractography once and have all the outputs for the fornix as .stat and tt.gz files present.
I have checked to make sure the reconstruction included all above parameters.

Frank Yeh

unread,
Jun 30, 2025, 5:01:31 PMJun 30
to christia...@gmail.com, DSI Studio
Sorry about the issue. Could you also post the log output from the command line?
There may be hints from the messages.
Frank

On Mon, Jun 30, 2025 at 4:57 PM Christian Gewinn (Christent)
> To view this discussion visit https://groups.google.com/d/msgid/dsi-studio/333d1255-8525-4569-b4db-7145bd6c0df1n%40googlegroups.com.

Christian Gewinn (Christent)

unread,
Jul 1, 2025, 10:06:49 AMJul 1
to DSI Studio
I have uploaded the console output in a txt together with the output folder as "Data Christian Gewinn along_tract analysis" on your dropbox. Hopefully this helps with the resolution

Frank Yeh

unread,
Jul 1, 2025, 11:04:50 AMJul 1
to christia...@gmail.com, DSI Studio
Thanks I will check and let you know.
Frank

On Tue, Jul 1, 2025 at 10:06 AM Christian Gewinn (Christent)
> To view this discussion visit https://groups.google.com/d/msgid/dsi-studio/597c8341-58c4-4f6b-926b-a928f5e4109bn%40googlegroups.com.

Frank Yeh

unread,
Jul 5, 2025, 11:43:16 AMJul 5
to christia...@gmail.com, DSI Studio
I updated DSI Studio.
Could you download the new version and see if it works for you?
Thanks a lot for the suggestion.
Frank

On Tue, Jul 1, 2025 at 10:06 AM Christian Gewinn (Christent)
> To view this discussion visit https://groups.google.com/d/msgid/dsi-studio/597c8341-58c4-4f6b-926b-a928f5e4109bn%40googlegroups.com.

Christian Gewinn (Christent)

unread,
Jul 7, 2025, 7:15:53 AMJul 7
to DSI Studio
I have tried the new version with the aforementioned command. It does work now and outputs all of the files. One note I have is that the outputs are not sorted by tracts anymore in seperate folders but are all thrown into the same directory.
To elaborate, it still creates the output folder for ProjectionBasalGanglia_FornixL and R, but does not sort any outputs of the process into them. Might be unintended behaviour.
Incidentally, the output generated matches the ones created if you call --action=ana --source=*.gqi.fz --tract=...\*...tt.gz --export=dti_fa,rd,ad,md using the outputs of normal tractography

I want to make sure I understand the output properly. Currently it outputs the along tract information as [fiber]:[data] with arbitrary length of data, ranging from 50 to over 100 datapoints..
What I expect as output is more along the lines of what is described here: https://www.sciencedirect.com/science/article/pii/S1053811911012833 (along-tract statistics overview parapgraph has a short outline)

Thanks for the assistance so far
Christian

Frank Yeh

unread,
Jul 7, 2025, 8:47:38 AMJul 7
to christia...@gmail.com, DSI Studio
Did you use command line or GUI? If on the command line, could you let
me know the command you used?

On Mon, Jul 7, 2025 at 7:15 AM Christian Gewinn (Christent)
> To view this discussion visit https://groups.google.com/d/msgid/dsi-studio/bff96958-e099-49d2-8c63-4c656584ba2fn%40googlegroups.com.

Frank Yeh

unread,
Jul 7, 2025, 9:45:53 AMJul 7
to christia...@gmail.com, DSI Studio
I updated DSI Studio. The new build should be ready in one hour (three
hour for Mac).
Please see if the updated version solves the problem.
Thanks a lot for reporting this issue!
Frank

Christian Gewinn (Christent)

unread,
Jul 8, 2025, 8:38:58 AMJul 8
to DSI Studio
The new version does fix the file sorting issue. The output format of the files is not the data I want or at least not in a format where I can tun it into what I need either. 
The output expected is similar to the gui solution of: Open *.fz file in T3 Fiber Tracking -> T3d Autotrack fornix L/R -> Tract Analysis Report -> Data Sampling strategy=fiber orientation+select index=fa/ad/rd/md -> Save report Data. Since I would need to do this about 416 times for my 104 subjects, hence why I asked if a CLI Batch solution was available. I hope this clears the problem up further.

Cheers
Christian

Christian Gewinn (Christent)

unread,
Jul 14, 2025, 9:57:19 AMJul 14
to DSI Studio
Hello,

I just want to check in if this issue is still looked into or if I am needed to do the pipeline fully manually. I have since contacted another colleague who did this analysis and they sent me this line of code which didnt produce the correct output for me although the gui approach worked and produced it correctly:
--action=ana --source=*.gqi.fz --tract=Z:\Christian\Tracto\N\ProjectionBasalGanglia_FornixR\*.ProjectionBasalGanglia_FornixR.tt.gz --export=report:dti_fa:0:1

Cheers

Frank Yeh

unread,
Jul 14, 2025, 11:10:24 AMJul 14
to christia...@gmail.com, DSI Studio
I am going to check the code and figure out a solution.
Hope to get back to you in a day or two

On Mon, Jul 14, 2025 at 9:57 AM Christian Gewinn (Christent)
> To view this discussion visit https://groups.google.com/d/msgid/dsi-studio/a9dda616-a310-44c1-babf-eabdf17be66bn%40googlegroups.com.

Frank Yeh

unread,
Jul 15, 2025, 10:39:27 AMJul 15
to christia...@gmail.com, DSI Studio
The parameters for 'Tract Analysis Report' is --export=report:dti_fa:3:1

3->fiber orientation
1->bandwidth

On Tue, Jul 8, 2025 at 8:39 AM Christian Gewinn (Christent)
> To view this discussion visit https://groups.google.com/d/msgid/dsi-studio/8d0a8394-f60a-4d14-8092-5cfff8b16bc7n%40googlegroups.com.

Christian Gewinn (Christent)

unread,
Jul 16, 2025, 7:22:58 AMJul 16
to DSI Studio
Thank you for your help. This has worked and provided me the output I needed. It would be very nice to include this in the docs for future use.

Cheers,
Christian Gewinn

Frank Yeh

unread,
Jul 16, 2025, 9:46:01 AMJul 16
to christia...@gmail.com, DSI Studio
Yes, I also updated the documentations at
https://dsi-studio.labsolver.org/doc/cli_t3.html

On Wed, Jul 16, 2025 at 7:23 AM Christian Gewinn (Christent)
> To view this discussion visit https://groups.google.com/d/msgid/dsi-studio/729aab8c-5c31-468e-9d60-6830c3efc755n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages