Calculating the tract volume

Hi MRtrix expert,

I am trying to calculate the volume of a tract (IFOF) in two different groups. I have generated the whole-brain tractography and extracted the IFOF tract. FA, length and streamline count are calculated.


Welcome Salah!

The typical approach to calculating a tract volume is to:

  1. Generate a binary mask corresponding to the tract;
  2. Calculate the number of voxels contained within that mask;
  3. Multiply this number by the volume of each voxel.

Step 1 would typically be achieved using a combination of tckmap (to get a streamline count per voxel) and mrthreshold to go from a streamline count per voxel to a binary mask. Step 2 can be obtained by running mrstats with the -mask option, and extracting the value of “count”. For Step 3 you can get the voxel spacing in mm from mrinfo.

The specific details of Step 1 are not entirely unambiguous though, there’s a few different ways it could be done, or little tweaks that could be applied. There’s a little bit of discussion around it in this paper from @Lee_Reid; I’m not aware of any other manuscripts that discuss specifically the nuances of tract volume quantification, but others are free to provide links.


Hi Rob

Thank you for your reply. I tired to open the paper you have attached but for some reason I wont open. Anyhow, I calculated the volume using this steps:
1- use tckmap to create tract-weighted FA in nii format
(tckmap -mage DIR/fa.mif -template DIR/fa.mif TRACT.tck DIR/twfa.nii
2 - fslmaths to create binary image bin.nii with a threshold 10
(fslmaths DIR/twfa.nii -thr 10 -bin DIR/bin.nii
3 - fslstats to calculate the tract volume with -V
(fslstats DIR/bin.nii -v)

The middle value is the volume of the tract.


I tried to open the paper you have attached but for some reason it wont open.

Sorry, I copy & pasted the wrong text into the hyperlink; fixed.

Anyhow, I calculated the volume using this steps:

You can also use MRtrix3’s mrthreshold to produce a binary mask image, and mrstats -mask -output count to query the number of voxels in the mask (then multiply by the voxel volume to get tract volume in mm).

1 Like