# Erase using a segment as only editable area

**URL:** https://discourse.slicer.org/t/erase-using-a-segment-as-only-editable-area/20519
**Category:** Support
**Tags:** segmentation
**Created:** [November 7, 2021, 5:35pm UTC](https://discourse.slicer.org/t/erase-using-a-segment-as-only-editable-area/20519 "2021-11-07T17:35:46Z")
**Posts on this page:** 17
**Page:** 1

<div class="post-metadata">

### Author: ![Michele\_Bailo](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/michele_bailo/32/67234_2.png) [@Michele\_Bailo](https://discourse.slicer.org/u/Michele_Bailo)
#### Post date: [November 7, 2021, 5:35pm UTC](https://discourse.slicer.org/t/erase-using-a-segment-as-only-editable-area/20519/1 "2021-11-07T17:35:46Z")

</div>

Hi everyone,  
I’m using a Slicer version 4.13.0-2021-06-03 for Windows.  
I noticed that the function “Masking - Editable area - Inside segment _XXX_” doesn’t seem to apply to the “Erase” function of the “Segment Editor” (it works correctly only with the “Paint” function)

Thank you very much for your support!

MB!

---

<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: [November 7, 2021, 6:29pm UTC](https://discourse.slicer.org/t/erase-using-a-segment-as-only-editable-area/20519/2 "2021-11-07T18:29:44Z")

</div>

Please try with the latest Slicer Preview Release and let us know if it does not work as you expect.

---

<div class="post-metadata">

### Author: ![Michele\_Bailo](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/michele_bailo/32/67234_2.png) [@Michele\_Bailo](https://discourse.slicer.org/u/Michele_Bailo)
#### Post date: [November 8, 2021, 2:33pm UTC](https://discourse.slicer.org/t/erase-using-a-segment-as-only-editable-area/20519/3 "2021-11-08T14:33:07Z")

</div>

I tried with the latest version but unfortunately it doesn’t work properly either

many thanks

MB

 ![Screenshot 2021-11-08 at 15.29.53](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/c/b/cbd5563032345acf45780fdd15bbec6eb9898397.jpeg)

 ![Screenshot 2021-11-08 at 15.30.08](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/d/1/d161802cd5bbb26de76613207173e05bb396d02f.jpeg)

---

<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: [November 8, 2021, 5:36pm UTC](https://discourse.slicer.org/t/erase-using-a-segment-as-only-editable-area/20519/4 "2021-11-08T17:36:17Z")

</div>

I was able to reproduce this.

@Sunderlandkyl can you have a look at this? If it is not an easy fix then you can submit a bug report and post the link here.

@Michele_Bailo As a workaround, you can create a temporary segment and paint with that instead of erasing. When you finished “erasing” then you can remove that temporary segment.

---

<div class="post-metadata">

### Author: ![Michele\_Bailo](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/michele_bailo/32/67234_2.png) [@Michele\_Bailo](https://discourse.slicer.org/u/Michele_Bailo)
#### Post date: [November 8, 2021, 7:14pm UTC](https://discourse.slicer.org/t/erase-using-a-segment-as-only-editable-area/20519/5 "2021-11-08T19:14:37Z")

</div>

> @Michele_Bailo As a workaround, you can create a temporary segment and paint with that instead of erasing. When you finished “erasing” then you can remove that temporary segment.

Yes, this is exactly what I have been doing for the past months. But I thought I’d tell you about it because I wasn’t sure if I was doing something wrong or if there were other ways.  
Thank you so much for your availability!

---

<div class="post-metadata">

### Author: ![hherhold](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/hherhold/32/12199_2.png) [@hherhold](https://discourse.slicer.org/u/hherhold)
#### Post date: [August 24, 2022, 1:32pm UTC](https://discourse.slicer.org/t/erase-using-a-segment-as-only-editable-area/20519/6 "2022-08-24T13:32:15Z")

</div>

Has this been looked into at all?

Thanks!

-Hollister

---

<div class="post-metadata">

### Author: ![jamesobutler](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/jamesobutler/32/7511_2.png) [@jamesobutler](https://discourse.slicer.org/u/jamesobutler)
#### Post date: [August 24, 2022, 2:37pm UTC](https://discourse.slicer.org/t/erase-using-a-segment-as-only-editable-area/20519/7 "2022-08-24T14:37:37Z")

</div>

Here I have Segment 1 and Segment 2 painted. I have selected the “Erase” effect, selected Segment\_1 in the segment table as my active segment, changed the editable area to “Inside Segment\_1” and placed my cursor over the boundary line.

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/b/f/bfe914015a8f9ae03492b424dc2a7434c5ea3864.jpeg)

Then when I click to erase, it erased only inside Segment\_1 and did not erase Segment\_2 as well which had been contained inside my erase circle.

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/8/f/8fab00196ce0a088e61e2b5c1d5c760f36dc8719.jpeg)

I could also select Segment\_2 as the active segment, then select “Inside Segment\_1” and oddly edit another segment (Segment\_1) that doesn’t match my currently active segment (Segment\_2) in the segment table.

---

<div class="post-metadata">

### Author: ![hherhold](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/hherhold/32/12199_2.png) [@hherhold](https://discourse.slicer.org/u/hherhold)
#### Post date: [August 24, 2022, 2:48pm UTC](https://discourse.slicer.org/t/erase-using-a-segment-as-only-editable-area/20519/8 "2022-08-24T14:48:28Z")

</div>

Thanks James. My use case is slightly different:

I have multiple segments visible and multiple hidden. I want to erase all visible segments but leave hidden unchanged. If I click “erase all segments” AND select editable area inside all visible segments, when I erase, it erases ALL segments, not just the visible ones.

Hopefully that makes sense…

---

<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: [August 28, 2022, 7:35pm UTC](https://discourse.slicer.org/t/erase-using-a-segment-as-only-editable-area/20519/9 "2022-08-28T19:35:39Z")

</div>

@Sunderlandkyl should be able to have a look at this when he gets back from vacation in a week or two. You can ping him here or submit a bug report at [issues.slicer.org](http://issues.slicer.org) and assign the issue to Kyle Sunderland.

---

<div class="post-metadata">

### Author: ![hherhold](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/hherhold/32/12199_2.png) [@hherhold](https://discourse.slicer.org/u/hherhold)
#### Post date: [August 28, 2022, 7:49pm UTC](https://discourse.slicer.org/t/erase-using-a-segment-as-only-editable-area/20519/10 "2022-08-28T19:49:28Z")

</div>

Sounds good, no rush. In the meantime I’ve been using your suggested workaround to make a new segment, paint that, and then subtract. 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: [August 29, 2022, 4:10am UTC](https://discourse.slicer.org/t/erase-using-a-segment-as-only-editable-area/20519/11 "2022-08-29T04:10:50Z")

</div>

There is no need to subtract: if you enable overwrite then it is enough to paint in the new segment. In the very end you can delete that new segment.

---

<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: [September 6, 2022, 8:22pm UTC](https://discourse.slicer.org/t/erase-using-a-segment-as-only-editable-area/20519/12 "2022-09-06T20:22:22Z")

</div>

I don’t seem to be able to reproduce the issue.

Can you clarify if the setting that is causing the unexpected behavior is “Editable area” or “Modify other segments”?

---

<div class="post-metadata">

### Author: ![hherhold](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/hherhold/32/12199_2.png) [@hherhold](https://discourse.slicer.org/u/hherhold)
#### Post date: [September 12, 2022, 12:24pm UTC](https://discourse.slicer.org/t/erase-using-a-segment-as-only-editable-area/20519/13 "2022-09-12T12:24:45Z")

</div>

Sorry for the slow reply.

I think my confusion was the inconsistency in behavior between scissors and erase. In scissors, there is an “Apply to all segments” checkbox, which is actually “apply to all visible segments”. I thought (incorrectly) that the “Erase all segments” checkbox would behave similarly, but it does exactly what it says it does - erase all segments, visible or not. The tooltips for both checkboxes (which I had turned off, unfortunately) do document the appropriate behavior correctly.

Erase all segments _does_ work correctly with Editable area set appropriately, I do not see any issue with that.

So I guess this is a case of “nothing to see here, move along…”

Thanks!

---

<div class="post-metadata">

### Author: ![jamesobutler](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/jamesobutler/32/7511_2.png) [@jamesobutler](https://discourse.slicer.org/u/jamesobutler)
#### Post date: [September 12, 2022, 2:08pm UTC](https://discourse.slicer.org/t/erase-using-a-segment-as-only-editable-area/20519/14 "2022-09-12T14:08:05Z")

</div>

> [@hherhold](#):
>
> In scissors, there is an “Apply to all segments” checkbox, which is actually “apply to all visible segments”. I thought (incorrectly) that the “Erase all segments” checkbox would behave similarly, but it does exactly what it says it does - erase all segments, visible or not.

We should probably update the wording to clarify these meanings based on the confusion you faced which I’m sure others face as well.

“Apply to visible segments” and “Erase all segments” could be options where using “all” is only used when referring to visible and non-visible segments.

---

<div class="post-metadata">

### Author: ![jamesobutler](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/jamesobutler/32/7511_2.png) [@jamesobutler](https://discourse.slicer.org/u/jamesobutler)
#### Post date: [September 12, 2022, 10:44pm UTC](https://discourse.slicer.org/t/erase-using-a-segment-as-only-editable-area/20519/15 "2022-09-12T22:44:50Z")

</div>

@hherhold see if the following naming change proposed by @Sunderlandkyl makes sense

> <https://github.com/Slicer/Slicer/pull/6526>
>
> The "Apply to all segments" label was misleading, since enabling it caused the s…cissors effect to only apply on all visible segments.
> Changed label from "Apply to all segments" to "Apply to visible segments".
> 
> See: https://discourse.slicer.org/t/erase-using-a-segment-as-only-editable-area/20519/13

---

<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: [September 13, 2022, 2:20am UTC](https://discourse.slicer.org/t/erase-using-a-segment-as-only-editable-area/20519/16 "2022-09-13T02:20:41Z")

</div>

We used the “Apply to all segments” as checkbox label to keep things simpler and shorter (to increase the chance that users read and understand the label). However, this is the second time that users report the current behavior as an error, so it seems that the current label is misleading and using a longer but more accurate label is justified. We’ll proceed with the changes that @Sunderlandkyl proposed.

---

<div class="post-metadata">

### Author: ![hherhold](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/hherhold/32/12199_2.png) [@hherhold](https://discourse.slicer.org/u/hherhold)
#### Post date: [September 13, 2022, 2:15pm UTC](https://discourse.slicer.org/t/erase-using-a-segment-as-only-editable-area/20519/17 "2022-09-13T14:15:02Z")

</div>

This change makes sense to me.

Thanks!
