Grabbing the default segment editor widget

Is there any way to access the active segment editor widget, for example to see the master volume / segmentation active currently?


Yes, you can access these information, but not through digging in the GUI, but elegantly getting information from the MRML node. For example, if you are interested in the segment editor widget of the Segment Editor module:

segmentEditorNode = slicer.mrmlScene.GetSingletonNode("SegmentEditor", "vtkMRMLSegmentEditorNode")

Note that you can place a segment editor widget in your own module’s GUI. That segment editor widget will not use the singleton node above, but you create a separate vtkMRMLSegmentEditorNode for that. See the examples here:

1 Like

Thanks for the prompt reply.

can something similar be done to access the instance of slicer.qMRMLSegmentSelectorWidget()?