# Algorithm used in Watershed effect in Segment Editor

**URL:** <https://discourse.slicer.org/t/algorithm-used-in-watershed-effect-in-segment-editor/21796>\
**Category:** Support\
**Tags:** segmentation\
**Created:** [February 3, 2022, 12:09pm UTC](https://discourse.slicer.org/t/algorithm-used-in-watershed-effect-in-segment-editor/21796 "2022-02-03T12:09:35Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![MPhilip](https://avatars.discourse-cdn.com/v4/letter/m/5f8ce5/32.png) [@MPhilip](https://discourse.slicer.org/u/MPhilip)\
**Post date:** [February 3, 2022, 12:09pm UTC](https://discourse.slicer.org/t/algorithm-used-in-watershed-effect-in-segment-editor/21796/1 "2022-02-03T12:09:35Z")

</div>

@lassoan could you please guide me to relevant documentation of the watershed effect implemented on the 3D slicer detailing the algorithm implemented?

Thanks

---

<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:** [February 4, 2022, 4:25am UTC](https://discourse.slicer.org/t/algorithm-used-in-watershed-effect-in-segment-editor/21796/2 "2022-02-04T04:25:52Z")

</div>

This effect uses MorphologicalWatershedFromMarkersImageFilter class in ITK. See the full implementation here:

> <https://github.com/lassoan/SlicerSegmentEditorExtraEffects/blob/5331eafdc77946e957fe771c5324d34dc7c3bc2e/SegmentEditorWatershed/SegmentEditorWatershedLib/SegmentEditorEffect.py#L114-L119>

---

<div class="post-metadata">

**Author:** ![MPhilip](https://avatars.discourse-cdn.com/v4/letter/m/5f8ce5/32.png) [@MPhilip](https://discourse.slicer.org/u/MPhilip)\
**Post date:** [February 4, 2022, 9:20am UTC](https://discourse.slicer.org/t/algorithm-used-in-watershed-effect-in-segment-editor/21796/3 "2022-02-04T09:20:06Z")

</div>

Hi @lassoan.  
Thank you very much for the reply.  
I would like to know what the algorithm is called. Is it marker controlled watershed transformation algorithm?

Thanks

---

<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:** [February 4, 2022, 12:54pm UTC](https://discourse.slicer.org/t/algorithm-used-in-watershed-effect-in-segment-editor/21796/4 "2022-02-04T12:54:53Z")

</div>

You can find an details about the algorithm in this paper: [https://doi.org/10.54294/lf8u75](https://doi.org/10.54294/lf8u75)
