Quick methods to extract tracks at each voxel

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.
Screenshot from 2020-08-30 22-39-53
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:

  1. quickly identity all tracks pass through individual voxels
  2. 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!