Error tckmap: cannot perform streamline mapping: no step size information in track file header

Hello, I’m trying to convert a .tck tract file in a .nii file.
I’m use tckmap command in this way:
tckmap --template --mask.nii (path) file.tck’s path file.nii’s destination path
this worked fot different subjects’s file, but now for some subjects it seems not work.
Thank you.

Hi Francesca,

When using a basic projection of streamlines onto a voxel grid, tckmap will typically increase the number of vertices along each streamline (“upsample”) before assigning each vertex to the voxel in which it resides. The granularity here must be appropriate based on the relationship between the tracking step size, and the voxel size: If the step size is large and the voxels are small, streamlines may “skip” over voxels that they should in fact contribute to, given they should be interpreted as continuous.

One way tckmap deals with this is by looking at the tracking step size in the track file header, and the voxel size of the output image, and determining this upsampling ratio automatically. However, if the step size information is not present in the track file header, tckmap is unable to perform this calculation, and hence provides the quoted error message.

I would advise running tckinfo on your track files (some where tckmap succeeded, some where it did not), and note the presence / absence of keys “step_size” and “output_step_size” in the header of different files. From there, you need to back-track through your data processing steps, and try to figure out which aspect of processing has resulted in the loss or corruption of this information for only some subjects.

Also: Note that if you update your MRtrix3 installation and re-compile, you should get a more instructive error message in this circumstance; specifically advocating use of the -upsample command-line option to set this upsampling ratio explicitly.


Thank you, I’ve resolved my problem.