Negative counts in the TDI?

FYI

If you’re getting negative streamline counts when viewing a TDI, it’s likely a limitation of the image viewer. For instance, any value in ITKSnap that is > 32768 (2^15) gets wrapped to a negative value.

OK, so the image is most likely stored as a 16 bit integer. Can you post the output of mrinfo on your image so we can check the data type? We really should be using unsigned integers here, if your image was produced using standard signed 16-bit integers, then really the problem is not the viewer, but that tckmap is not using the most appropriate data type to store the data…

Looks like image is being written as 32 bit unsigned int and ITK Snap is expecting 16 bit signed int. I specified tckmap to output the data in float32 and ITK Snap rescales and displays it properly.


Image: “CC_10000_SIFT_TDI.nii.gz”


Format: NIfTI-1.1 (GZip compressed)
Dimensions: 145 x 174 x 145
Voxel size: 1.25 x 1.25 x 1.25
Data type: unsigned 32 bit integer (little endian)
Data strides: [ -1 2 3 ]
Intensity scaling: offset = 0, multiplier = 1
Comments: track-weighted ima
Properties:
mrtrix_version: 0.3.12-1056-g72603c8e
Transform: 1 -0 -0 -90
0 1 -0 -126
-0 0 1 -72
0 0 0 1


Image: “CC_10000_SIFT_TDI_new.nii.gz”


Format: NIfTI-1.1 (GZip compressed)
Dimensions: 145 x 174 x 145
Voxel size: 1.25 x 1.25 x 1.25
Data type: 32 bit float (little endian)
Data strides: [ -1 2 3 ]
Intensity scaling: offset = 0, multiplier = 1
Comments: track-weighted ima
Properties:
mrtrix_version: 0.3.12-1056-g72603c8e
Transform: 1 -0 -0 -90
0 1 -0 -126
-0 0 1 -72
0 0 0 1

Ok, so the issue is definitely with ITKsnap, nothing for us to fix :grin:
Thanks for reporting back!