# SegmentEditorWidget not adding more than one effect

**URL:** <https://discourse.slicer.org/t/segmenteditorwidget-not-adding-more-than-one-effect/11932>\
**Category:** Development\
**Tags:** segmentation\
**Created:** [June 8, 2020, 7:52pm UTC](https://discourse.slicer.org/t/segmenteditorwidget-not-adding-more-than-one-effect/11932 "2020-06-08T19:52:52Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Queen\_Rei](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/queen_rei/32/6348_2.png) [@Queen\_Rei](https://discourse.slicer.org/u/Queen_Rei)\
**Post date:** [June 8, 2020, 7:52pm UTC](https://discourse.slicer.org/t/segmenteditorwidget-not-adding-more-than-one-effect/11932/1 "2020-06-08T19:52:52Z")

</div>

![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/5/5/55ee47ee78af9d2e2da207d039a1a85fd69ae7d7.png)

I tried to add a threshold, open, and close smoothing effect in my module, but it’s only doing the thresholding. Is there something I am doing wrong? Do you need any more info?

Thank you and hope you and your family/friends are safe \<3

---

<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, 9:07pm UTC](https://discourse.slicer.org/t/segmenteditorwidget-not-adding-more-than-one-effect/11932/2 "2020-06-08T21:07:05Z")

</div>

You need to call `onApply` when you want to apply an effect (it is not enough to do it once at the end).

Also, name of the smoothing methods are not correct. See the correct values here:

> <https://github.com/Slicer/Slicer/blob/6256f99080957f39f41b1830f52bd8dcd5263a3d/Modules/Loadable/Segmentations/EditorEffects/Python/SegmentEditorSmoothingEffect.py#L353-L357>

Finally, if you want to both remove extrusions and fill holes then use median method instead of opening+closing.
