# Segmentation threshold effect question

**URL:** <https://discourse.slicer.org/t/segmentation-threshold-effect-question/10677>\
**Category:** Support\
**Tags:** segmentation\
**Created:** [March 13, 2020, 4:53pm UTC](https://discourse.slicer.org/t/segmentation-threshold-effect-question/10677 "2020-03-13T16:53:33Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![rprueckl](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/rprueckl/32/4240_2.png) [@rprueckl](https://discourse.slicer.org/u/rprueckl)\
**Post date:** [March 13, 2020, 4:53pm UTC](https://discourse.slicer.org/t/segmentation-threshold-effect-question/10677/1 "2020-03-13T16:53:33Z")

</div>

I have a question regarding the threshold functionality in the Segment Editor (Using build Slicer 4.11.0-2020-03-10).  
I do the following:

- Load scalar volume
- Use the volume as master for segmentation
- Add one segment
- Modify segment (e.g. with the Paint effect)
- Add a second segment
- For the second segment, I want to apply thresholding.
- I set a threshold and apply

The second segment now correctly contains the areas identified by the thresholding process.  
Voxels of the first segment, however, are cleared at positions that are contained in the second segment. In other words, the threshold operation for the second segment “destroyed” my first segment. I guess this has to do with labelmaps shared between segments.

The behavior is not what I expected, and I would rather suspect a bug here. As the thresholding functionality is supposed to be widely used, however, I find it hard to believe that this hasn’t been observed before. So if this is working as intended, I would be happy about an explanation of this behavior.

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:** [March 13, 2020, 4:57pm UTC](https://discourse.slicer.org/t/segmentation-threshold-effect-question/10677/2 "2020-03-13T16:57:52Z")

</div>

By default modifying a segment will overwrite all segments underneath the modified area. If you don’t want to overwrite, you can change the “Modify other segments” setting in the Masking section of the segment editor to “Allow overlap”:

![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/a/8/a8fa20a596131cb01c61c0ee09e101967f294119.png)

---

<div class="post-metadata">

**Author:** ![rprueckl](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/rprueckl/32/4240_2.png) [@rprueckl](https://discourse.slicer.org/u/rprueckl)\
**Post date:** [March 13, 2020, 5:05pm UTC](https://discourse.slicer.org/t/segmentation-threshold-effect-question/10677/3 "2020-03-13T17:05:01Z")

</div>

I see, this makes sense. Thanks a lot for the quick explanation.

---

<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:** [March 13, 2020, 5:18pm UTC](https://discourse.slicer.org/t/segmentation-threshold-effect-question/10677/4 "2020-03-13T17:18:36Z")

</div>

If you don’t want to overlap the segments, and would just like to modify the region outside of the first segment, you can also look at the “Editable area” setting.

![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/9/b/9bb90dbd0618db15d8bfca36e0de003ced4fabb6.png)
