View multiple label maps in one scene

Is it possible to maintain more than one label map volume node in a scene and if so adjust the colors to keep track of what is what? My goal is to be able to describe the shape of a label map and then describe the shape of another object and have both in the scene at the same time.

More specifically, I think my issue is that when a label map is created and added to the scene, I cannot view it in along side the background volume that i would like to use unless I put it into the label map slot in the slice drop down menu, which I would like to avoid.

e: more information on the issue

If you want to show only one labelmap at a time (you can have multiple colors in one labelmap) and only want to show it in 2D view then labelmap should work.

If you want to display more then use Segmentations instead of labelmaps: you can show any number of segmentations, labels can overlap, you can display segments as contour+fill at the same time, and you can show segments in 3D as well.

If you have a labelmap then you can create a Segmentation node in the Segmentations module’s Import/export section.

Whats the best way to remove a segment from the scene? I tried


But that doesn’t seem to work. Thank you for your response!

I am able to eliminate the segments as I would like, but when I do it through the code, I get an error saying:

vtkSlicerSegmentationsModuleLogic::GetSegmentForSegmentSubjectHierarchyItem: Segmentation does not contain segment with given ID: Segment_name

I am deleting with the following code:

segmentation = segmentationNode.GetSegmentation()

Deleting a segment:

segmentation = segmentationNode.GetSegmentation()

Deleting a segmentation node:

1 Like