Newbie: Overlaying .nii file with Dicom

Operating system: Windows 10
Slicer version: 4.11.20200930

I have a DICOM file containing 1 CT scan cross-section slice and an .nii / .nii.gz file containing the tagged muscle volume of the specific DICOM file. I would like to overlay the 2 files to see the tagged muscles.

I drag and drop both files in 3D slicer and I get a pop-up that asks me the “description” (volume, segmentation, transform) for each file and gives different import option depending on what I choose.

I import DICOM file as “volume” and the .nii file as “segmentation”. I arrange them in hierarchy so that dicom file is the parent and the .nii file is the child.

I do not see the tag from the .nii/.nii.gz file when I overlay them in the red view. Please advise.

You have chosen the descriptions correctly (CT → “Volume”, binary labelmap overlay → “Segmentation”). If they are in the same physical position then they appear overlaid - you don’t need to do anything else.

To verify that the two volumes are in the same position, load the files, but this time load both as “Volume”, then go to Volumes module and take a screenshot of the contents of “Volume Information” section for each volume and post them here.

Thank you, Andras.

I already see the difference - but I do not really know why. Any insights?

Here’s the volume for the DICOM:

Volume for the .nii.gz file:

The software that created the segmentation file did not copy the origin, spacing, and axis direction of the input volume. Most likely this segmentation was created in Python and stored as a numpy array (hence the inverted image dimensions KJI instead of IJK) and written to file without setting the image geometry (IJK to physical space mapping) in the nifti file writer. Report the problem to the developer of the segmentation software.

As a workaround, you could create a labelmap volume in the correct physical space and just copy over the voxel data from the imported labelmap volume.

You are correct, Andras. The file was created in Python and stored as numpy.
I will report this issue to the developer.

Thank you for your help. Very much appreciated!

1 Like