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

1 Like

Thanks Rob!

Hi, I feel like the question I have somehow relates to the question above/your answer, thats why I post here…

I´m trying to do my analysis following these steps:
A visitation (streamline) map or tractogram was constructed for each individual (all streamlines starting from a specific seed). In order to allow comparison of these maps between participants, the tractograms were normalized by log transforming the data and then dividing each voxel’s value by that of the maximum value in the map yielding voxel values between 0 and 1 ( Mars et al., 2016). Then, Targets were drawn as 3 × 3 × 3 voxel regions of interest. The average of all voxel´s values was calculated for each target. Permutation testing was then used to test for a difference between each target

I am unsure how to transfer this to mrtrix:

  1. If I use tckgen with the -seed_image option, i get streamlines that start in the seed and go to the rest of the brain, but SIFT cannot be applied.
  2. If I do tckgen with the -seed_image option anyway, I can use the tckmap command with the -vox option in order to get the visitation map.
  3. However I am not sure about the next two steps: log-transforming the data and getting the maximum value in the map in order to divide all other voxels by this value.

I know, doing a log-transfrom on your data needs to be thought through thorougly, however as I read through a lot of FAQs on this forum (and Mars et al. 2016, who are doing the same statistical analysis as me), I feel like it´s the right choice, as I want to do tract-wise permutation tests.

Thanks in advance!

(reference: Mars, R. B., Foxley, S., Verhagen, L., Jbabdi, S., Sallet, J., Noonan, M. P., … & Rushworth, M. F. (2016). The extreme capsule fiber complex in humans and macaque monkeys: a comparative diffusion MRI tractography study. Brain Structure and Function , 221 , 4059-4071.)