# Edited segment is undone when the next segment is edited

**URL:** <https://discourse.slicer.org/t/edited-segment-is-undone-when-the-next-segment-is-edited/29807>\
**Category:** Support\
**Created:** [June 2, 2023, 6:45pm UTC](https://discourse.slicer.org/t/edited-segment-is-undone-when-the-next-segment-is-edited/29807 "2023-06-02T18:45:26Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ga1424](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/ga1424/32/66215_2.png) [@ga1424](https://discourse.slicer.org/u/ga1424)\
**Post date:** [June 2, 2023, 6:45pm UTC](https://discourse.slicer.org/t/edited-segment-is-undone-when-the-next-segment-is-edited/29807/1 "2023-06-02T18:45:26Z")

</div>

Operating system windows 11  
Slicer version: 5.2.2  
Expected behavior: Want to protect and preserve all segmentation edits  
Actual behavior: Editing a subsequent or new segment and using an operation like fill value or a logical operation works fine for the segment being edited but the greyscale information from the previously edited segment. reappears. My previous work is undone What is causing this?

---

<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 2, 2023, 11:27pm UTC](https://discourse.slicer.org/t/edited-segment-is-undone-when-the-next-segment-is-edited/29807/2 "2023-06-02T23:27:40Z")

</div>

I’m not sure what grayscale information you are referring to. Could you clarify, maybe attach a few illustrative screenshots?

---

<div class="post-metadata">

**Author:** ![ga1424](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/ga1424/32/66215_2.png) [@ga1424](https://discourse.slicer.org/u/ga1424)\
**Post date:** [June 4, 2023, 1:44am UTC](https://discourse.slicer.org/t/edited-segment-is-undone-when-the-next-segment-is-edited/29807/3 "2023-06-04T01:44:03Z")

</div>

Hello, Andrus.

The volume is one which we want to segment into Air (-1000 Hu), water (0 Hu) and bone. The bone is to remain unedited.

I began by transforming the background and internal voids to -1000 Hu. (Air)

![Screenshot_8.png](https://mail.google.com/mail/u/0?ui=2&ik=1ad062974e&attid=0.1&permmsgid=msg-a:r-4953343549178719465&th=18883fd99c7fd382&view=fimg&fur=ip&sz=s0-l75-ft&attbid=ANGjdJ-zRYsF4unbIYvteIumXrOdH5kqnv6nPo9FZvnUeGFBybPHgC9BKD2OfTIzk5vpuze6DQqxoVcDgJo78Rmz6M0HaAqdCGqV4yxA7xv2PQ9VQ7mEdNvmEWfeKt0&disp=emb&realattid=ii_ligpgvb90)

I then turned off the segment layer and moved on to transforming the non-bone elements of the head to 0 Hu (water).

I bracket this process to come as close to the bone as possible and to preserve delicate, thin bones in the sinus and temporal regions.

The first mask is bracketed at -500 to 50 Hu.

![Crysttal Test 6-1-23 Image 3.png](https://mail.google.com/mail/u/0?ui=2&ik=1ad062974e&attid=0.2&permmsgid=msg-a:r-4953343549178719465&th=18883fd99c7fd382&view=fimg&fur=ip&sz=s0-l75-ft&attbid=ANGjdJ9oOFP0fH8U3tVN-jEleh-zqV5Wn_5K33YHg0GuaJYkb1HoUYN_Dt5kgEseEZSlWujI967gKHofL-Jfp4sDf1L8BqIjuyxy4I9WYdry9n2FGDTqm_YfSrfZqNY&disp=emb&realattid=ii_ligpqo7m1)

I next used “mask volume” to apply a “fill value” of 0 Hu inside the mask.

The “fill value” worked. But…

![Crysttal Test 6-1-23 Image 5.png](https://mail.google.com/mail/u/0?ui=2&ik=1ad062974e&attid=0.4&permmsgid=msg-a:r-4953343549178719465&th=18883fd99c7fd382&view=fimg&fur=ip&sz=s0-l75-ft&attbid=ANGjdJ8XemYKrHqMQGtbrCtQxQvmD_D3a6prqnXKnB8cl9fIBLaXhGZrfIjRxxqyhXJjho4tMOtePkmaimSttSnA1PTXuSSJWQOMdv21umkPRKcC8nFp29TBzQ_80gU&disp=emb&realattid=ii_ligq3w373)

…the material I transformed in the previous segmentation has returned. Dang!

Hoping to fix the problem I went back to the first step to transform the background and voids again to -1000 Hu. And…

… it worked but the transformation I did inside the head in the second segmentation was undone.

I seem to be stuck in a loop. I would like to preserve my work in the segments segments as I go and then output the resulting edited volume in an imagestack for further editing in another application

Any help is appreciated. I am relatively new to Slicer and have much to learn.

Thanks for taking a look at this.

Mike
