Setting segmentation in SegmentEditor without changing volumes in slice views

I’ve setup 3DSlicer to load different volumes in different slice views, red, green, etc. There are also a separate segmentation node for each of these volumes. These segmentation nodes are displayed only on the slice views that display the master volume for the segmentation.

If I use the SegmentEditor module UI to change the segmentation node, all the slice views are changed have the background volume changed to the master volume for the newly selected segmentation node. If I programmatically use slicer.util.getNode(“SegmentEditor”).SetAndObserveSegmentationNode(segmentationNode), it has the same effect of changing all the view volumes.

How can I change the active segmentation in the SegmentEditor module without changing all the setup I’ve done to the slice views?

The new master volume is only shown in those views where the segmentation node is visible (based on view node IDs set in the segmentation’display node).

You can also disable automatic showing of the matter volume in slice views by turning off
autoShowMasterVolumeNode property of the segment editor widget.

Thanks, That works. I was running into the issue where if you switch to a segmentation that is not visible in any views, 3DSlicer will change all the views to that master volume node

1 Like

Not seeing any view IDs means the segmentation appears in every views. If you want a segmentation to not appear in any view then you can set some non-existing view node ID in the display node (or turn off visibility in all its display nodes, or remove all its display nodes).