# Combining two segmentations with different volume sizes

**URL:** <https://discourse.slicer.org/t/combining-two-segmentations-with-different-volume-sizes/16094>\
**Category:** Support\
**Created:** [February 19, 2021, 5:55pm UTC](https://discourse.slicer.org/t/combining-two-segmentations-with-different-volume-sizes/16094 "2021-02-19T17:55:22Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Aep93](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/aep93/32/5990_2.png) [@Aep93](https://discourse.slicer.org/u/Aep93)\
**Post date:** [February 19, 2021, 5:55pm UTC](https://discourse.slicer.org/t/combining-two-segmentations-with-different-volume-sizes/16094/1 "2021-02-19T17:55:22Z")

</div>

Hello all,  
I have two segmentations and the size of the references volume of these segmentations are different from each other. Now I want to combine these two segmentations and edit them in the Segment Editor module. How is it possible?  
How can I manage different sizes of my segmentations? Should I make the sizes of both segmentations exactly the same, if yes, how should I do this?  
Thanks in advane

---

<div class="post-metadata">

**Author:** ![Aep93](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/aep93/32/5990_2.png) [@Aep93](https://discourse.slicer.org/u/Aep93)\
**Post date:** [February 20, 2021, 12:12am UTC](https://discourse.slicer.org/t/combining-two-segmentations-with-different-volume-sizes/16094/2 "2021-02-20T00:12:14Z")

</div>

Hello all,  
I could manage to somehow combine my segmentations. Now, when I go to segment editor, the quality of my segments are considerably different. This is a screenshot:

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/c/1/c15b13f97afe6cc4e2ff195f0912c3742323d5ef.jpeg)

I added the segmentation of white part to the segmentation of green part and it can be seen that the qualities are very different. I should note that the quality of white part was not this bad when it was in separate segment. What should I do to solve this problem?  
Also, now when I want to paint in segment mesher it takes a lot of time for the combined segmentation while when I want to paint each segmentation separatetly, it is very fast.  
Any helps would be greatly appreciated.

---

<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:** [February 20, 2021, 4:25am UTC](https://discourse.slicer.org/t/combining-two-segmentations-with-different-volume-sizes/16094/3 "2021-02-20T04:25:37Z")

</div>

> [@Aep93](#):
>
> Now I want to combine these two segmentations and edit them in the Segment Editor module. How is it possible?

You can drag-and-drop segments between segmentations in Data module. The segmentation will be resampled to the resolution of the segmentation’s internal labelmap representation at the next editing operation (not immediately to allow lossless copying/moving of segments between segmentations). If the quality is not sufficiently good then follow [these instructions](https://slicer.readthedocs.io/en/latest/user_guide/modules/segmenteditor.html#segmentation-is-not-accurate-enough).

> [@Aep93](#):
>
> Also, now when I want to paint in segment mesher it takes a lot of time for the combined segmentation while when I want to paint each segmentation separately, it is very fast.

Meshing two segments is a harder problem than one, so it is normal that meshing takes more time. You can adjust meshing options to find a good balance between meshing speed, memory usage, and size and quality of the created mesh.

---

<div class="post-metadata">

**Author:** ![Aep93](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/aep93/32/5990_2.png) [@Aep93](https://discourse.slicer.org/u/Aep93)\
**Post date:** [February 20, 2021, 4:29am UTC](https://discourse.slicer.org/t/combining-two-segmentations-with-different-volume-sizes/16094/4 "2021-02-20T04:29:34Z")

</div>

Thanks for your response @lassoan. I made a mistake in my previous question, I mentioned “segment mesher” but in fact I meant “segment editor”. I wanted to say that when I want to paint combined segmentation in segment editor, the time is too long, but when I paint each of my segmentations separately (before combination) in segment editor, it is very fast. Do you have any comments in this regard?  
Your help is greatly appreciated.

---

<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:** [February 20, 2021, 4:57am UTC](https://discourse.slicer.org/t/combining-two-segmentations-with-different-volume-sizes/16094/5 "2021-02-20T04:57:01Z")

</div>

> [@Aep93](#):
>
> when I want to paint combined segmentation in segment editor, the time is too long

Slowdown is expected if you copy a segment to a finer resolution segmentation or the two segments are far from each other, but it is hard to tell what is the best way to make the performance better without seeing your data. If you can share an example data set the demonstrates the issue (upload somewhere and post the link) then we can take a look.

---

<div class="post-metadata">

**Author:** ![Aep93](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/aep93/32/5990_2.png) [@Aep93](https://discourse.slicer.org/u/Aep93)\
**Post date:** [February 22, 2021, 6:40am UTC](https://discourse.slicer.org/t/combining-two-segmentations-with-different-volume-sizes/16094/6 "2021-02-22T06:40:30Z")

</div>

Thanks for your response @lassoan. Sure, I will spend a little more time on my model and if I was not able what I want, I will share a sample dataset so that you can take a quick look. Thanks a lot.

---

<div class="post-metadata">

**Author:** ![Aep93](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/aep93/32/5990_2.png) [@Aep93](https://discourse.slicer.org/u/Aep93)\
**Post date:** [June 1, 2021, 5:35am UTC](https://discourse.slicer.org/t/combining-two-segmentations-with-different-volume-sizes/16094/7 "2021-06-01T05:35:30Z")

</div>

Hello @lassoan. I still have some problems with this. I attached one of the segmentations here. I transformed this segmentation from low-resolution volume to high resolution. However, it is very heavy now. It takes a lot to perform some operations (such as painting) on it. On the other hand, I do not want to reduce its quality as I want to combine it with another segmentation as mentioned above. Can you please take a look at this segmentation and help me to reduce its size.

Download link:  
[Segmentation](https://github.com/A-ep93/SlicerTest/blob/main/Segmentation2.seg.nrrd)

Thanks in advance

---

<div class="post-metadata">

**Author:** ![Aep93](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/aep93/32/5990_2.png) [@Aep93](https://discourse.slicer.org/u/Aep93)\
**Post date:** [June 4, 2021, 1:53am UTC](https://discourse.slicer.org/t/combining-two-segmentations-with-different-volume-sizes/16094/9 "2021-06-04T01:53:06Z")

</div>

Any help is greatly appreciated. I think the size of my volume gets unnecessarily large when I increase the resolution. I am saying this because I have other models with the same volume size as my “high” resolution volume, but they are very fast.  
I am wondering whether I should do anything special when I convert my low res model to high res.  
Thanks in advance

---

<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 4, 2021, 2:00am UTC](https://discourse.slicer.org/t/combining-two-segmentations-with-different-volume-sizes/16094/10 "2021-06-04T02:00:23Z")

</div>

You need to find a good tradeoff between details, accuracy vs computation time and memory usage. Try increasingly finer resolution and see how your segmentation size is changing.

---

<div class="post-metadata">

**Author:** ![Aep93](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/aep93/32/5990_2.png) [@Aep93](https://discourse.slicer.org/u/Aep93)\
**Post date:** [June 4, 2021, 4:24am UTC](https://discourse.slicer.org/t/combining-two-segmentations-with-different-volume-sizes/16094/11 "2021-06-04T04:24:11Z")

</div>

Thanks for your response @lassoan. I will try changing the resolution to find a trade-off between accuracy and memory. Thanks.

---

<div class="post-metadata">

**Author:** ![jamessmith](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/jamessmith/32/11159_2.png) [@jamessmith](https://discourse.slicer.org/u/jamessmith)\
**Post date:** [June 5, 2021, 6:36pm UTC](https://discourse.slicer.org/t/combining-two-segmentations-with-different-volume-sizes/16094/12 "2021-06-05T18:36:40Z")

</div>

Interesting and useful discussion. Thanks for sharing, I appreciate that! 👍
