# Abnormal segmentation behavior

**URL:** https://discourse.slicer.org/t/abnormal-segmentation-behavior/31520
**Category:** Support
**Created:** [September 2, 2023, 6:42pm UTC](https://discourse.slicer.org/t/abnormal-segmentation-behavior/31520 "2023-09-02T18:42:40Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![mohammed\_alshakhas](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/mohammed_alshakhas/32/10025_2.png) [@mohammed\_alshakhas](https://discourse.slicer.org/u/mohammed_alshakhas)
#### Post date: [September 2, 2023, 6:42pm UTC](https://discourse.slicer.org/t/abnormal-segmentation-behavior/31520/1 "2023-09-02T18:42:40Z")

</div>

i had this recurring behavior lately . other segments disappearing upon new segments editing or creation

[https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/5/5/550090d037815bc9b0d5dd50a272f0b340ec157d.mp4](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/5/5/550090d037815bc9b0d5dd50a272f0b340ec157d.mp4)

---

<div class="post-metadata">

### Author: ![ylcnkzy](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/ylcnkzy/32/12189_2.png) [@ylcnkzy](https://discourse.slicer.org/u/ylcnkzy)
#### Post date: [September 6, 2023, 1:33pm UTC](https://discourse.slicer.org/t/abnormal-segmentation-behavior/31520/2 "2023-09-06T13:33:48Z")

</div>

You are editing **Segment-2** while **capillary** segmentation is selected. Probably, when you make changes (edits) on " Segment-2 (but actually capillary)", it probably **overwrites all visible segments** (probably due to your segmentation settings). if the area you are editing has different HU values than Segment 2 (as a setting), then any changes you are going to make (even a single pixel) on Segment 2 while “capillary” is selected will overwrite the visible segment.

**Solution:** If you intended to make changes to segment 2, just unselect all others (including **capillary** ), then select segment 2 and proceed with your editing like that.

I hope that helps.

---

<div class="post-metadata">

### Author: ![mohammed\_alshakhas](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/mohammed_alshakhas/32/10025_2.png) [@mohammed\_alshakhas](https://discourse.slicer.org/u/mohammed_alshakhas)
#### Post date: [September 6, 2023, 1:45pm UTC](https://discourse.slicer.org/t/abnormal-segmentation-behavior/31520/3 "2023-09-06T13:45:25Z")

</div>

thank you for response

my workflow is the following  
segment mandible ( segment 2) using threshold/paint ( everywhere )  
segment condyle (capillary) : threshold/paint ( inside segment 2 + allow overlap )

i used this workflow many times before and was fine.

which part of the segmentation setting will erase the whole segment despite “allow overlap”?

---

<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 7, 2023, 5:23pm UTC](https://discourse.slicer.org/t/abnormal-segmentation-behavior/31520/4 "2023-09-07T17:23:19Z")

</div>

Did the segments actually change (e.g., also disappeared in slice views as well) or it was just a rendering issue in the 3D view?

---

<div class="post-metadata">

### Author: ![mohammed\_alshakhas](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/mohammed_alshakhas/32/10025_2.png) [@mohammed\_alshakhas](https://discourse.slicer.org/u/mohammed_alshakhas)
#### Post date: [September 7, 2023, 6:11pm UTC](https://discourse.slicer.org/t/abnormal-segmentation-behavior/31520/5 "2023-09-07T18:11:25Z")

</div>

Only in rendering in view 1. View 2 is not affected

---

<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 7, 2023, 6:16pm UTC](https://discourse.slicer.org/t/abnormal-segmentation-behavior/31520/6 "2023-09-07T18:16:50Z")

</div>

What Slicer version is this?

Do you have an Apple silicon (ARM) system? Apple’s intel emulator does not seem very robust. Maybe upgrading your system will fix the issue.

Can you reproduce the behavior if you save the scene, restart Slicer, and load the scene?  
Can you reproduce it on a different computer? (or can you share the scene with us so that we can try it on different computers)

---

<div class="post-metadata">

### Author: ![mohammed\_alshakhas](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/mohammed_alshakhas/32/10025_2.png) [@mohammed\_alshakhas](https://discourse.slicer.org/u/mohammed_alshakhas)
#### Post date: [September 7, 2023, 6:28pm UTC](https://discourse.slicer.org/t/abnormal-segmentation-behavior/31520/7 "2023-09-07T18:28:39Z")

</div>

Slicer 5.5 but happened more frequent before on 5.4 on Mac m2 .  
I don’t have access to other computer .  
Once the rendering issues occurs it’s permanent . Even after restart and opening the scene , rendering will not show on view 1 .  
The error only occurs once per scene .

---

<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 7, 2023, 6:32pm UTC](https://discourse.slicer.org/t/abnormal-segmentation-behavior/31520/8 "2023-09-07T18:32:49Z")

</div>

> [@mohammed\_alshakhas](#):
>
> Once the rendering issues occurs it’s permanent . Even after restart and opening the scene , rendering will not show on view 1 .

This is great! Any problems that we can reproduce we can fix. Could you share this scene file (upload somewhere and post the link here)? Make sure the image is anonymized (no protected health information is included).

---

<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 8, 2023, 10:53pm UTC](https://discourse.slicer.org/t/abnormal-segmentation-behavior/31520/9 "2023-09-08T22:53:38Z")

</div>

I was able to reproduce the issue. I’ve submitted a bug report here:

> <https://github.com/Slicer/Slicer/issues/7220>
>
> \## Summary
> 
> When removing the first segment in a segmentation and show 3D was …enabled, after the segment was removed, 3D is no longer displayed.
> 
> \## Steps to reproduce
> 
> \- Load a volume
> \- Create a segmentation with 3 segments
> \- Paint something into each segment
> \- Click Show 3D button to see the segmentation in 3D
> \- Remove the first segment
> 
> \### Expected behavior
> 
> The first segment should be removed but all the other segments should be still visible in 3D.
> 
> \### Actual behavior
> 
> All the segments disappear. Show 3D button is untoggled.
> 
> \## Environment
> \- Slicer version: Slicer-5.4
> \- Operating system: Windows and Mac

@Sunderlandkyl would you be able to work on it? It seems that it is due to some modified event triggered by modification of a shared labelmap representation.

---

<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 14, 2023, 3:15pm UTC](https://discourse.slicer.org/t/abnormal-segmentation-behavior/31520/10 "2023-09-14T15:15:46Z")

</div>

The issue is now fixed in the latest preview release with this PR: [BUG: Fix closed surface disappearing when segment is removed by Sunderlandkyl · Pull Request #7226 · Slicer/Slicer · GitHub](https://github.com/Slicer/Slicer/pull/7226).
