tcksift : how to save -output_at_counts files in a specific directory

Hi everyone,

I’m new with Mrtrix so the answer is maybe easy but I didn’t find any previous topic about that !

I am trying to filter tracks of the optic chiasma with tcksift. I would like to save output filtered track files at specific numbers of remaining streamlines with the option -output_at_counts.
This command works :

tcksift -output_at_counts 150,200,300 data/Chiasma_fa_0.2.tck data/fod.nii data/out_fod.tck

It saves the final output out_fod.tck in the data folder as I specified, but the three intermediate track files 150_tracks.tck, 200_tracks.tck and 300_tracks.tck are saved in the directory in which I ran the command. I would like to save these 3 files in the data folder with the original tck files. Is it possible to specify the path to save these 3 files ?

Thank you for your answers !

Welcome Maxime!

No, the current interface for that command-line option only receives as input a list of integers, and hard-codes the output paths in the working directory. The interface here would not have received a great deal of thought given that it’s there principally for technical evaluation of the method and not expected to be widely adopted by users.

What would perhaps make more sense would be to take the output track file path ("data/out_fod.tck" in your case), and augment that with the streamline count (e.g. producing “data/out_fod_300.tck” etc…). I could make that change relatively easily. But having full control over exactly where these files go and what they are called would probably be too clumsy from a command-line interface perspective. It would probably make sense then to also change the -output_debug command-line option to permit setting an output prefix, which I think was asked somewhere recently.

I would also note that it appears as though you are running SIFT on the results of targeted tracking or track editing, i.e. not a whole-brain tractogram. This is inappropriate for how that method operates. Please see this manuscript, with the key point made in the “Processing pipeline for FBC estimation” section.