# Grabbing the default segment editor widget

**URL:** <https://discourse.slicer.org/t/grabbing-the-default-segment-editor-widget/2375>\
**Category:** Support\
**Created:** [March 20, 2018, 1:32pm UTC](https://discourse.slicer.org/t/grabbing-the-default-segment-editor-widget/2375 "2018-03-20T13:32:13Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![drusmanbashir](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/drusmanbashir/32/1282_2.png) [@drusmanbashir](https://discourse.slicer.org/u/drusmanbashir)\
**Post date:** [March 20, 2018, 1:32pm UTC](https://discourse.slicer.org/t/grabbing-the-default-segment-editor-widget/2375/1 "2018-03-20T13:32:13Z")

</div>

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

Thanks  
Usman.

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [March 20, 2018, 1:56pm UTC](https://discourse.slicer.org/t/grabbing-the-default-segment-editor-widget/2375/2 "2018-03-20T13:56:16Z")

</div>

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")
segmentEditorNode.GetMasterVolumeNode()

```

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: [https://www.slicer.org/wiki/Documentation/Nightly/ScriptRepository#How\_to\_run\_segment\_editor\_effects\_from\_a\_script](https://www.slicer.org/wiki/Documentation/Nightly/ScriptRepository#How_to_run_segment_editor_effects_from_a_script)

---

<div class="post-metadata">

**Author:** ![drusmanbashir](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/drusmanbashir/32/1282_2.png) [@drusmanbashir](https://discourse.slicer.org/u/drusmanbashir)\
**Post date:** [March 20, 2018, 1:57pm UTC](https://discourse.slicer.org/t/grabbing-the-default-segment-editor-widget/2375/3 "2018-03-20T13:57:58Z")

</div>

Thanks for the prompt reply.

---

<div class="post-metadata">

**Author:** ![kayarre](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/kayarre/32/3606_2.png) [@kayarre](https://discourse.slicer.org/u/kayarre)\
**Post date:** [October 23, 2018, 9:25pm UTC](https://discourse.slicer.org/t/grabbing-the-default-segment-editor-widget/2375/4 "2018-10-23T21:25:29Z")

</div>

> [@lassoan](#):
>
> egmentEditorNode = slicer.mrmlScene.GetSingletonNode(“SegmentEditor”, “vtkMRMLSegmentEditorNode”)

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