# Segment visibilities are not saved in the mrml file

**URL:** <https://discourse.slicer.org/t/segment-visibilities-are-not-saved-in-the-mrml-file/1820>\
**Category:** Development\
**Tags:** bug\
**Created:** [January 12, 2018, 2:39pm UTC](https://discourse.slicer.org/t/segment-visibilities-are-not-saved-in-the-mrml-file/1820 "2018-01-12T14:39:27Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![MMMPPPMMM](https://avatars.discourse-cdn.com/v4/letter/m/a9a28c/32.png) [@MMMPPPMMM](https://discourse.slicer.org/u/MMMPPPMMM)\
**Post date:** [January 12, 2018, 2:39pm UTC](https://discourse.slicer.org/t/segment-visibilities-are-not-saved-in-the-mrml-file/1820/1 "2018-01-12T14:39:27Z")

</div>

I have a segmentation with two segments.  
I disable the visability of the 2nd segment in the data module.  
I save the scene.

 ![SlicerVisibilityBug](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/6/c/6c94aed85a7170ed829cc8ec22b2a8aebd22bc0c.png)

If Ioad the scene again, both segments are visible

 ![SlicerVisibilityBug2](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/5/d/5df999bf0cfd888b1b899499cf387d321c9d9a24.png)

---

<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:** [January 12, 2018, 3:43pm UTC](https://discourse.slicer.org/t/segment-visibilities-are-not-saved-in-the-mrml-file/1820/2 "2018-01-12T15:43:28Z")

</div>

Thanks for reporting this, I could reproduce it. Saving of visibility state is correct, but the information is ignored when the scene is loaded. I’ll try to fix 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:** [January 13, 2018, 3:40am UTC](https://discourse.slicer.org/t/segment-visibilities-are-not-saved-in-the-mrml-file/1820/3 "2018-01-13T03:40:36Z")

</div>

Fix committed in revision 26831. Nightly builds are being reworked, so it may take a few days until a new nightly build is created.

---

<div class="post-metadata">

**Author:** ![MMMPPPMMM](https://avatars.discourse-cdn.com/v4/letter/m/a9a28c/32.png) [@MMMPPPMMM](https://discourse.slicer.org/u/MMMPPPMMM)\
**Post date:** [January 17, 2018, 1:19pm UTC](https://discourse.slicer.org/t/segment-visibilities-are-not-saved-in-the-mrml-file/1820/4 "2018-01-17T13:19:05Z")

</div>

Thank you. Seems to work.

But now the master volume information seems to be ignored?

---

<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:** [January 17, 2018, 1:41pm UTC](https://discourse.slicer.org/t/segment-visibilities-are-not-saved-in-the-mrml-file/1820/5 "2018-01-17T13:41:52Z")

</div>

> [@MMMPPPMMM](#):
>
> master volume information seems to be ignored?

What do you mean? What do you do, what do you expect to happen, and happens instead?

---

<div class="post-metadata">

**Author:** ![MMMPPPMMM](https://avatars.discourse-cdn.com/v4/letter/m/a9a28c/32.png) [@MMMPPPMMM](https://discourse.slicer.org/u/MMMPPPMMM)\
**Post date:** [January 18, 2018, 2:27pm UTC](https://discourse.slicer.org/t/segment-visibilities-are-not-saved-in-the-mrml-file/1820/6 "2018-01-18T14:27:27Z")

</div>

I have a scene with one CT volume and two segmentations.

I load the scene -\> Switch to Segment Editor -\> Switch to the 2nd segmentation

Then I have to select the master volume again, although it was previously selected before saving the 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:** [January 18, 2018, 4:14pm UTC](https://discourse.slicer.org/t/segment-visibilities-are-not-saved-in-the-mrml-file/1820/7 "2018-01-18T16:14:07Z")

</div>

I cannot reproduce this, it all works well for me. Have you added segments to both segmentations? Can you upload the saved scene somewhere and post the link here?
