# Segmentation (.seg.nrrd) merges labels instead of one-layer-per-label representation

**URL:** <https://discourse.slicer.org/t/segmentation-seg-nrrd-merges-labels-instead-of-one-layer-per-label-representation/30792>\
**Category:** Support\
**Tags:** segmentation\
**Created:** [July 25, 2023, 10:49pm UTC](https://discourse.slicer.org/t/segmentation-seg-nrrd-merges-labels-instead-of-one-layer-per-label-representation/30792 "2023-07-25T22:49:36Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mangotee](https://avatars.discourse-cdn.com/v4/letter/m/c57346/32.png) [@mangotee](https://discourse.slicer.org/u/mangotee)\
**Post date:** [July 25, 2023, 10:49pm UTC](https://discourse.slicer.org/t/segmentation-seg-nrrd-merges-labels-instead-of-one-layer-per-label-representation/30792/1 "2023-07-25T22:49:36Z")

</div>

Hi,  
I have noticed that the array in the saved segmentation file (.seg.nrrd) is not really one-layer-per-label. Instead, non-overlapping labels are merged into one layer, while overlapping layers are kept separately.  
I find this quite clever, but for convenient echange with deep learning (specifically MONAI Label), I would like to store it as a one-layer-per-label representation with exactly the same voxel grid size as the source image volume. The latter seems to be the default behaviour in the latest Slicer versions, but I couldn’t find a discussion on “one-layer-per-label” (perhaps I don’t know the right search term).  
Btw, I know that MONAI Label allows overlapping labels in principle… but I am playing around with a 2D radiology app right now, and I need to manually change the storage behaviour of .seg.nrrd files. Would be great if there was a global flag (e.g. in Application Settings) that could switch that on.  
I also contacted the authors of the MONAILabelReviewer module, who contributed overlapping-labels support in MONAI Label, but they also didn’t know how to avoid the layer-collapsing behaviour in .seg.nrrd.  
Thanks for your advice in advance!

---

<div class="post-metadata">

**Author:** ![pieper](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/pieper/32/8_2.png) [@pieper](https://discourse.slicer.org/u/pieper)\
**Post date:** [July 27, 2023, 4:25pm UTC](https://discourse.slicer.org/t/segmentation-seg-nrrd-merges-labels-instead-of-one-layer-per-label-representation/30792/2 "2023-07-27T16:25:23Z")

</div>

> [@mangotee](#):
>
> The latter seems to be the default behaviour in the latest Slicer versions

Maybe you can just standardize on the newer version? There will be a new 5.4 release before too long that will be essentially the current preview version with a few tweaks.
