Visualization of continuous uncertainty maps in 3D Slicer (volume appears uniform color)

Hi,

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:

  1. How should continuous scalar volumes be visualized correctly in 3D Slicer?
  2. Is there a recommended way to rescale or normalize the data for better visualization?
  3. Could Slicer be interpreting the volume incorrectly (e.g., as labelmap instead of scalar)?

Any guidance would be greatly appreciated.

Thanks!

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.

Thanks for your reply!

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?

This link contains the NIfTI file if needed: https://drive.google.com/file/d/1M_4hVtoldng_uQpgJwLan57OOZFdETz4/view?usp=share_link

Thanks again!

Thanks for sharing the file, something must have happened when you saved that converted to integer.

Here’s what it looks like in slicer:

And here’s what nibabel says:

>>> a = nibabel.load("/tmp/CHUP-029_high_uncertainty_total.nii.gz")
>>> print(a.header.get_data_dtype())
uint8

It worked, thank you so much!!!