Resolution of segmentations change after saving.

Hello,

After saving segmentations and labels, I have noticed that sometimes certain structures change to a lower resolution. Not all segmentations change to a lower resolution, just some, but it is always the same structures. I am wondering if anyone knows why this is or if anyone has tips or suggestions to prevent this.

Thanks!

In a segmentation with binary labelmap representation, each layer is allowed to have different geometry (origin, spacing, axis directions, extents) temporarily - to allow moving segments between segmentations without unnecessary quality loss (each resampling of a binary labelmap can lead to slight changes). All layers are forced to have the same geometry during certain editing operations and when the segmentation is saved to file.

1 Like

I didn’t know this. Is it documented under what conditions this happens? Since uniformity is forced on saving, shouldn’t it be forced when a segment is transferred into a different segmentation? What is the use case where allowing the temporary altered resolution, but forcing it on saving, avoids unnecessary resampling? The only case I can think of is if you have a high resolution segment in segmentation A, copy it to lower resolution segmentation B, and then copy it again from segmentation B to segmentation C, which has a different low resolution, but I’m not sure when someone would routinely be doing that.

It is described here, but not in more detail than in my above post. It should not matter, because when you need segments to have the same geometry then the resampling happens automatically.

This is a good example but there are many more. Resampling is performed using “lazy” strategy (i.e., as late as possible), to avoid any unnecessary loss of detail.

1 Like