Overlay colourmap in mrview: value 1 not displayed. Any custum colour map/lut?

Hi,

when I overlay an image containing integers (labels/rois) the value equal to one is not displayed. See screenshot. Other values 2 - 6 are. 0 obviously not.
Bug?

Other question that I have: is it possible to use a custom colour map (or LUT). E.g. freesurfer.lut to view labelconvert output?

Thanks for any help.

Best regards,
Stefan.

I can’t reproduce the problem with the voxels with value 1 not displaying on my system… Can you tell me a bit more about your OS, graphics card and driver, the specifics of the image you’re trying to overlay (e.g. mrinfo R_kmean.nii.gz)?

I can however reproduce the issue with the zero values not displaying. I agree that’s probably a bug, I’ll see if I can fix that.

Hi Donald,

thx for the quick response.

maybe its not os related but datatype.

mrinfo R_kmean.nii.gz


Image: “R_kmean.nii.gz”


Dimensions: 169 x 169 x 102
Voxel size: 1.3 x 1.3 x 1.3
Data strides: [ 1 2 3 ]
Format: NIfTI-1.1 (GZip compressed)
Data type: unsigned 32 bit integer (little endian)
Intensity scaling: offset = 0, multiplier = 1
Transform: 0.9977 0.02319 0.06365 -116.9
-0.003114 0.9543 -0.2989 -91.78
-0.06768 0.298 0.9522 -40.6
comments: Preprocessed dMRI
mrtrix_version: 3.0_RC3_latest-5-g81036fcc

When doing mrconvert R_kmean.nii.gz -type int8 test.mif
the image overlay now correctly shows voxels with value 1.

Ok, that’s interesting… I tried with a image with 32-bit unsigned int datatype, and that seemed to overlay fine. I’m not sure what’s going on, but given that it works correctly with an 8-bit datatype, there’s a good chance this will be related to the OpenGL drivers and how they handle 32-bit int textures: there’s a possibility that the driver internally converts these to 16-bit ints, even though the OpenGL 3.3 standard mandates that they should be available. Stranger things have happened…

From that point of view alone, I’d be interested to know what OS, graphics card, and drivers you’re using, if only so others with similar issues can understand what the issue might be. You can find a lot of this information just by running:

mrview -info -exit

Hi Donald,

It’s macOS 10.13.6

mrview: [INFO] GL renderer: AMD Radeon Pro Vega 56 OpenGL Engine
mrview: [INFO] GL version: 4.1 ATI-1.68.21
mrview: [INFO] GL vendor: ATI Technologies Inc.

1 Like