Tracks2prob and tckmap

Hi all,

In tracks2prob from MRtrix 2, there was an option (-fraction) to produce an image of the fraction of streamlines through each voxel, as a proportion of the total number of streamlines in the file. I think tckmap is the equivalent command in MRtrix 3, and I think it produces a track density image, which is the streamline count per voxel. Does tckmap have an equivalent option to -fraction in tracks2prob?

Many thanks,

Claire

Hi Claire,

No; but that’s because the same result can be achieved using other tools.

Watch this for some command-line gymnastics (sorry, I couldn’t help myself):

tckmap tracks.tck -vox 1.0 - | mrcalc - $(tckinfo tracks.tck | grep " count" | cut -d':' -f2 | tr -d '[:space:]') -div tdi_fractional.mif

This:

  • Runs tckmap to generate the TDI as normal.
  • Runs tckinfo on the track file, and extracts just the value for the field named “count” (which is the number of tracks in the file).
  • Runs mrcalc with the -div option, dividing the TDI by the total number of streamlines, so that the value in each voxel is the fraction of streamlines that intersected that voxel rather than the count.

Of course, you could do these three steps separately and manually; but it wouldn’t be as much fun! :stuck_out_tongue:

Rob

Thanks Rob!