# GUI sphere paint segmentation

**URL:** <https://discourse.slicer.org/t/gui-sphere-paint-segmentation/11924>\
**Category:** Development\
**Created:** [June 8, 2020, 11:20am UTC](https://discourse.slicer.org/t/gui-sphere-paint-segmentation/11924 "2020-06-08T11:20:20Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![szhang](https://avatars.discourse-cdn.com/v4/letter/s/bc8723/32.png) [@szhang](https://discourse.slicer.org/u/szhang)\
**Post date:** [June 8, 2020, 11:20am UTC](https://discourse.slicer.org/t/gui-sphere-paint-segmentation/11924/1 "2020-06-08T11:20:20Z")

</div>

It probably has been asked before, but in case I missed any latest development.  
If I want to include in my module a GUI component for segmentation (e.g. via sphere paint) as easy as creating a fiducial markup like qSlicerSimpleMarkupsWidget, is it possible?  
Thanks a lot in advance!

---

<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:** [June 8, 2020, 2:18pm UTC](https://discourse.slicer.org/t/gui-sphere-paint-segmentation/11924/2 "2020-06-08T14:18:49Z")

</div>

There are several very simple options.

1. You can create a model node from markups as shown in [this example](https://www.slicer.org/wiki/Documentation/Nightly/ScriptRepository#Manipulating_objects_in_the_slice_viewer) and add it to a segmentation as shown in this [other example](https://www.slicer.org/wiki/Documentation/Nightly/ScriptRepository#Get_histogram_of_a_segmented_region).
2. You can find many examples [here](https://www.slicer.org/wiki/Documentation/Nightly/ScriptRepository#How_to_run_segment_editor_effects_from_a_script) that shows how to use Segment Editor without showing a widget.
3. [Segment Editor module](https://github.com/Slicer/Slicer/blob/master/Modules/Scripted/SegmentEditor/SegmentEditor.py) is an example of how to embed a segment widget into any scripted module.
