Read NIFTI Images


Does anyone know how to read NIFTI images properly?

I used files from this dataset:Liver Tumor Segmentation - Part 2 | Kaggle

And I can use image reader but the output comes out very grey color, such as this,


I was expecting something more like this,

Hi @june,

it looks like the images are read in fine, but they are displayed misleadingly: I suspect they are of type “UnsignedInt” (or the like), which means that a pixel can take on values between 0 and 4294967295 (i.e., an unnecessarily high value), but the actual values are in a much smaller range. This would results in a mostly grey display of the image. You can normalize the image to use the full range of the image type with an image normalizer. Alternatively, if its only for viewing purposes, you can use the UI of the Image Viewer node (circled; the arrows denote positions where you can find out about the type):

You can also check the histogram tab for more insights on the pixel value distribution.

You can also use the image converter to convert the image to a different type with a smaller value range - this might save you some memory.

Hope that helps!