I am trying to visualize a continuous uncertainty map (entropy-based) generated from a deep learning segmentation model in 3D Slicer.
The NIfTI file contains floating-point values (not binary), with a range approximately between 0 and 0.35 and millions of unique values. However, when I load it in Slicer, it appears as a uniform color (no visible gradient), even when using it as a foreground volume with opacity and applying different colormaps (e.g., Inferno, Hot).
I have already tried:
Disabling auto window/level and manually adjusting the range
Changing colormaps
Overlaying it on the PET volume
Verifying that the data is continuous using Python (many unique values)
Despite this, the map still looks flat (single color), instead of showing a smooth gradient.
My questions are:
How should continuous scalar volumes be visualized correctly in 3D Slicer?
Is there a recommended way to rescale or normalize the data for better visualization?
Could Slicer be interpreting the volume incorrectly (e.g., as labelmap instead of scalar)?
That should be supported with no problem in Slicer. Maybe you could share an example. Maybe it’s not being saved as float or maybe there’s something else going on.
I checked the file in Python using nibabel, and it is indeed stored as a floating-point volume (float32) with a large number of unique values (millions), so it is definitely not binary.
For example:
min ≈ 0.0
max ≈ 0.35
number of unique values > 2 million
However, in Slicer it still appears as a uniform color, even when:
loaded as a scalar volume
used as a foreground with opacity over the PET
applying different colormaps (Inferno, Hot)
manually adjusting window/level
I suspect the issue might be related to the value distribution being very skewed (most voxels close to zero), so the contrast is not well represented.
Do you think rescaling (e.g., percentile-based normalization) before loading into Slicer would be the correct approach? Or is there a recommended way in Slicer to visualize such highly skewed scalar volumes?