Segmentation Alignment

Hi everyone,

I have a pre-determined VOI segmentation and DCE MRI sequence in DICOM format, and want to overlay/align them. What is the best way to go about this? I was thinking about converting the VOI segmentation to a labelmap volume matched to reference geometry of the DCE MRI’s. Would this work to align?


Yes, you should be able to load the segmentation as a segmentation node and the MRI as a volume node and Slicer will overlay them correctly. There are many visualization parameters that you can tune in Segmentations module’s Display section.

Hi Andras,

When I try to do this, I load the MRI as a volume using slicer.util.loadVolume(), and then want to use the code below. However, I’m not sure how to (1) get the MRML node of the loaded MRI volume and (2) load the segmentation before getting the segmentation node as below. Thanks!

segmentationNode = getNode('Segmentation')
labelmapVolumeNode = slicer.mrmlScene.AddNewNodeByClass('vtkMRMLLabelMapVolumeNode')
slicer.modules.segmentations.logic().ExportVisibleSegmentsToLabelmapNode(segmentationNode, labelmapVolumeNode, referenceVolumeNode)

Does everything work correctly using the GUI?

What are the input files on disk that you would like to load using Python?

Hi Andras,

I am able to load the MRI dicom’s as a volume, but I am having trouble loading the segmentation. The segmentation file is also in dicom format, so I am trying to load as labelmap through GUI following instructions ( but I don’t see this option. What do you recommend?


What information object is used for storing the segmentation: DICOM RT structure set or DICOM Segmentation Object?

DICOM segmentation object

DICOM segmentation object must be loaded via DICOM module and it requires Quantitative Reporting extension.

Hi Andras,

Please ignore my last reply, I was able to get it to work by putting the seg files in the same folder. The new problem I have is that 2 of the segmentation files (specifically PE segmentations) are not able to load as a DICOMsegmentation-- do you know why this could be? Thanks

Use the latest Slicer Preview Release. If the import still does not work as expected then check if there are any errors or warnings in the log.