Hello MRtrix team,
First, I used the tcksample command to sample points along all fibre tracks. I’m hoping to extract all the sampled values on all tracks passing through individual voxels and to do it repeatedly for all voxels in a given image.
Currently, I am able to take the ASCII text file generated by tcksample and the corresponding coordinate text files (by converting .tck file to ASCII text files), and perform dataframe operations in Python pandas. So I assigned a trackID number to each track (see example for track #0 below). For one voxel, there may be multiple tracks passing through.
However, this requires importing millions of .txt files for a 5M .tck file. So I would like to know if there is a command or somewhere in the MRtrix script which can allow me to:
- quickly identity all tracks pass through individual voxels
- or directly extract sampled values on all the tracks passing through a voxel
I really appreciate if anyone could provide suggestions for an easier and more efficient solution. Thank you!