Interactive lung lobe segmentation fails with NIFTI volume


I am trying to generate lung lobe labels for a MONAI Label segmentation with the “Interactive Lobe Segmentation”.

With a COV-19 lung CT demo dataset (as well as with the Slicers “CTChest” demo) I get:

… which is reasonable.

When I load data from MONAI Labels “Task06Lung” dataset (which obviously is a NIFTI volume) the interactive lobe segmentation is not correct:

The file name: lung_001.nii.gz

Do I need to convert the volume?

PS: The “Lung CT Segmenter” works well in both cases.

1 Like

“Volume” for “DemoChestCT” (lobe segmentation working) shows:


Volume for lung_001.nii.gz (lobe segmentation not working) shows:


Two things I tried and that had no effect:

  • Export the NIFTI Volume as DICOM dataset, then reload the DICOM
  • Load the NIFT volume and “Cast scalar volume” to integer
1 Like

This lung_001.nii.gz image seems to be quite unusual, i.e., messed up.

  1. Float scalar type does not make sense for clinical CTs, so change that to short. Do not choose Int, as that would be 32 bits per voxel, which would be unusual, too.

  2. The IJK coordinate system is a left-handed coordinate system (determinant of the IJK to RAS direction matrix is negative, so the transformation turns the volume inside out). You can fix this by resampling the volume using Crop volume module with the default settings (you don’t need to crop away any part of the volume, you just take advantage of that Interpolated cropping enables resampling and the module always uses right-handed coordinate system for IJK).

  3. Nifti is for brain imaging. For general imaging purposes, use nrrd instead. Nifti has many issues, for example it is very easy to mess up the image orientation (as it is stored in Nifti in a complex, redundant way and interpretation of non-trivial cases is inconsistent between different applications).

Thank you, @lassoan
Did as advised:

  • changed (with “Cast Scalar Volume” module) the scalar type to short
  • resampled the volume. There is still the circled “1” in the Matrix which is “-1” in all working cases …


Unfortunately still no lobes detected:


Link to a folder containing the initial file is here: