How to restrict fixelcfestats to subset of tracts

Hi Rachael,
You could try the new tck2fixel command in the 3.0 release. This uses the new directory-based fixel format.

To do this first convert your fixel template analysis mask that you previously computed for input to fixelcfestats:

fixelconvert template_fixel_mask.msf template_fixel_mask_dir

Then compute a fixel track density image, where each fixel value contains the number of streamlines associated with it:

tck2fixel track_of_interest.tck template_fixel_mask_dir template_fixel_mask_dir track_of_interest_TDI.mif

Note that in the above command the output will be placed inside the input fixel directory (hence why I have template_fixel_mask_dir twice). I.e. the track_of_interest_TDI.mif file will be found inside the template_fixel_mask_dir directory. You can view all “data” files in the fixel directory using the 3.0 mrview fixel plot tool.

To convert the fixel TDI to a mask, just threshold:

mrthresold -abs  1 template_fixel_mask_dir/track_of_interest_TDI.mif template_fixel_mask_dir/track_of_interest_mask.mif

For each subject in your study, convert fixel images (the ones previously input to fixelcfestats) to the format:

fixelconvert patient-fdc-01.msf all_patients_fdc_dir -name 01

Note that here fdc data from all subjects ends up in a single fixel directory (since they share the same ‘directions.mif’ file). This will be the input to the new MRtrix v3.0 fixelcfestats (checkout the new documentation to get a feel for how this works)

Finally, you will want to mask the input data by cropping/removing the fixels not in your tract-of-interest mask. This can be done with:

fixelcrop all_patients_fdc_dir template_fixel_mask_dir/track_of_interest_TDI.mif all_patients_fdc_dir_cropped

The all_patients_fdc_dir_cropped directory now contains all data (fixel directions, and FDC values for all subjects) ready for input to fixelcfestats.

I’ve just typed these instructions out without running the commands, so let me know if you run into any issues.
Cheers,
Dave

2 Likes