Wrong resolution after 'Segmentation geometry'

Hi all,

We developed an automatic segmentation model for tumors in the liver. The output we get is in nifti file and still needs to corrected in Slicer 3D.
I upload the scan (nifti.gz) and segmentation (nifti) in Slicer 3D: sometimes from a specific slice I can’t draw/erase anymore. This problem we solved by choosing ‘Segmentation geometry’ and choosing current scan (512x512).
However, when I want to use those adjusted segmentations for volumetric assessment, I get an error, and this is because the resolution was changed in the process…

Can anyone help me out?

Regards,
Michiel

What is the geometry (origin, spacing, and axis directions) of the scan and segmentation file?

Nifti has a serious issue that it can store multiple geometries in a single file and these geometries may contradict each other. Did you use sform, qform, or both to specify geometry?

Is there a reason for choosing nifti format, which allows this redundant/inconsistent geometry definition? This problem is unique to the nifti file format, so you can choose any other research file format (for example: nrrd) to avoid such complications.

Where do you get an error? What is the error message?

The resolution of the nifti.gz CT scan is 512x512, and of the pre-segmentation in niftii is also 512x512. Ergo, it should be the same resolution.
When I upload both to Slicer 3D, I cannot adjust or draw segmentations besides in a certain box. And when I export the adjusted segmentation, the resolution has changed.

I do not get an error, but the output of our volumetric model is wrong (counts too many lesions).

You can store very images with very different geometry (origin, spacing, axis directions) in a 512x512 grid. It seems that geometry of the segmentation’s binary labelmap representation does not match the geometry of the input image that you are currently using. The segmentation’s geometry is automatically set based on the first image you select, but you can change it anytime.

“Cannot paint outside some boundaries” section of the Segment Editor module documentation (or other sections in that FAQ) provides a bit more details and describes what you can do about it.