# How to remove some segment editor effects

**URL:** <https://discourse.slicer.org/t/how-to-remove-some-segment-editor-effects/16162>\
**Category:** Development\
**Tags:** segmentation, python, scripted\
**Created:** [February 23, 2021, 4:54pm UTC](https://discourse.slicer.org/t/how-to-remove-some-segment-editor-effects/16162 "2021-02-23T16:54:26Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![akshay\_pillai](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/akshay_pillai/32/8301_2.png) [@akshay\_pillai](https://discourse.slicer.org/u/akshay_pillai)\
**Post date:** [February 23, 2021, 4:54pm UTC](https://discourse.slicer.org/t/how-to-remove-some-segment-editor-effects/16162/1 "2021-02-23T16:54:26Z")

</div>

Operating system: Windows 10  
Slicer version:4.11.202.00930

I am trying to create a new module from the segment editor module and need to remove some of the editor effects that I won’t be needing. Is there any way to do this. I want to keep some of the effects and remove the rest.For example, remove Draw tube, Engrave, Islands, Level tracing, split volume,flood filling, but keep the rest. Please let me know if anyone has done this and how? Any help is appreciated. Thanks.

---

<div class="post-metadata">

**Author:** ![Sunderlandkyl](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/sunderlandkyl/32/79987_2.png) [@Sunderlandkyl](https://discourse.slicer.org/u/Sunderlandkyl)\
**Post date:** [February 23, 2021, 5:00pm UTC](https://discourse.slicer.org/t/how-to-remove-some-segment-editor-effects/16162/2 "2021-02-23T17:00:09Z")

</div>

You can use [setEffectNameOrder](https://apidocs.slicer.org/master/classqMRMLSegmentEditorWidget.html#ac28caab505058e98b850f73044c82ee8) to set the order that you would like the effects to appear and disable [unorderedEffectsVisible](https://apidocs.slicer.org/master/classqMRMLSegmentEditorWidget.html#a7950066736b1a5aa30b32ddc67fb9e56) to hide the ones that weren’t specified.

---

<div class="post-metadata">

**Author:** ![akshay\_pillai](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/akshay_pillai/32/8301_2.png) [@akshay\_pillai](https://discourse.slicer.org/u/akshay_pillai)\
**Post date:** [February 23, 2021, 5:04pm UTC](https://discourse.slicer.org/t/how-to-remove-some-segment-editor-effects/16162/3 "2021-02-23T17:04:15Z")

</div>

Hey, thanks a lot. If its no trouble, Can you give me an example of how the code would be for any one effect to be listed.

---

<div class="post-metadata">

**Author:** ![Sunderlandkyl](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/sunderlandkyl/32/79987_2.png) [@Sunderlandkyl](https://discourse.slicer.org/u/Sunderlandkyl)\
**Post date:** [February 23, 2021, 5:09pm UTC](https://discourse.slicer.org/t/how-to-remove-some-segment-editor-effects/16162/4 "2021-02-23T17:09:40Z")

</div>

Sure, here’s an example of creating a segment editor widget with only the paint and threshold effects:

```auto
segmentEditorWidget = slicer.qMRMLSegmentEditorWidget()
segmentEditorWidget.setEffectNameOrder(["Paint", "Threshold"])
segmentEditorWidget.unorderedEffectsVisible = False
segmentEditorWidget.show()

```

---

<div class="post-metadata">

**Author:** ![akshay\_pillai](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/akshay_pillai/32/8301_2.png) [@akshay\_pillai](https://discourse.slicer.org/u/akshay_pillai)\
**Post date:** [February 23, 2021, 5:43pm UTC](https://discourse.slicer.org/t/how-to-remove-some-segment-editor-effects/16162/5 "2021-02-23T17:43:00Z")

</div>

Thanks! That helped.

---

<div class="post-metadata">

**Author:** ![danielgreenwood](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/danielgreenwood/32/11113_2.png) [@danielgreenwood](https://discourse.slicer.org/u/danielgreenwood)\
**Post date:** [May 31, 2021, 6:46pm UTC](https://discourse.slicer.org/t/how-to-remove-some-segment-editor-effects/16162/6 "2021-05-31T18:46:29Z")

</div>

Good question and perfect answers to solve this problem. [🙂](https://removalsofberkshire.com/) I appreciate that, thanks!
