# Combining Segmentations of Different MRI files

**URL:** <https://discourse.slicer.org/t/combining-segmentations-of-different-mri-files/3238>\
**Category:** Support\
**Created:** [June 19, 2018, 11:06pm UTC](https://discourse.slicer.org/t/combining-segmentations-of-different-mri-files/3238 "2018-06-19T23:06:08Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![rnahum](https://avatars.discourse-cdn.com/v4/letter/r/f04885/32.png) [@rnahum](https://discourse.slicer.org/u/rnahum)\
**Post date:** [June 19, 2018, 11:06pm UTC](https://discourse.slicer.org/t/combining-segmentations-of-different-mri-files/3238/1 "2018-06-19T23:06:08Z")

</div>

Hello!  
I segmented the sagittal, coronal, and axial views of MRI scans of three separate .nrrd files and I made an individual segmentation for each view. Is there a way that I can combine these three segmentations into one segmentation in slicer?

Operating system:Windows  
Slicer version: 4.8.1  
Expected behavior:  
Actual behavior:

---

<div class="post-metadata">

**Author:** ![Mustafa](https://avatars.discourse-cdn.com/v4/letter/m/f19dbf/32.png) [@Mustafa](https://discourse.slicer.org/u/Mustafa)\
**Post date:** [June 19, 2018, 11:34pm UTC](https://discourse.slicer.org/t/combining-segmentations-of-different-mri-files/3238/2 "2018-06-19T23:34:47Z")

</div>

@rnahum Do you want them to be in one orientation? Or, do you want to simply overlay segmentations?

---

<div class="post-metadata">

**Author:** ![rnahum](https://avatars.discourse-cdn.com/v4/letter/r/f04885/32.png) [@rnahum](https://discourse.slicer.org/u/rnahum)\
**Post date:** [June 20, 2018, 12:03am UTC](https://discourse.slicer.org/t/combining-segmentations-of-different-mri-files/3238/3 "2018-06-20T00:03:43Z")

</div>

@Mustafa Just overlay the segmentations

---

<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 20, 2018, 12:08am UTC](https://discourse.slicer.org/t/combining-segmentations-of-different-mri-files/3238/4 "2018-06-20T00:08:23Z")

</div>

In summary: if the goal is 3D reconstruction then acquire a single volume with isotropic pixel spacing. See this post for more details: [Combining volumes - what am I missing?](https://discourse.slicer.org/t/combining-volumes-what-am-i-missing/2941/2?u=lassoan)

---

<div class="post-metadata">

**Author:** ![rnahum](https://avatars.discourse-cdn.com/v4/letter/r/f04885/32.png) [@rnahum](https://discourse.slicer.org/u/rnahum)\
**Post date:** [June 20, 2018, 12:18am UTC](https://discourse.slicer.org/t/combining-segmentations-of-different-mri-files/3238/5 "2018-06-20T00:18:12Z")

</div>

Does this method combine the MRI scans, and will I have to redo the segmentations? Is there a way to just combine the segmentations?

---

<div class="post-metadata">

**Author:** ![Mustafa](https://avatars.discourse-cdn.com/v4/letter/m/f19dbf/32.png) [@Mustafa](https://discourse.slicer.org/u/Mustafa)\
**Post date:** [June 22, 2018, 9:48pm UTC](https://discourse.slicer.org/t/combining-segmentations-of-different-mri-files/3238/6 "2018-06-22T21:48:23Z")

</div>

> [@rnahum](#):
>
> Does this method combine the MRI scans, and will I have to redo the segmentations? Is there a way to just combine the segmentations?

I prepared a recipe for you. Hope, it will help.

1-) In what format (dcm, nii, etc.) do you store your segmentations? Are they loadable to Slicer? If yes, please proceed.

2-) Let us say you overlay segmentations from three different orientations . I don’t expect a meaningful result out of this because location and shape of segmentations are very different on each volumes. We, homo sapiens, can correlate a semantic to axial, coronal and sagittal otherwise they are way different matrices from each other when computer reads them.

3-) Instead of #2, revisit #1 and pick an orientation and convert two others into the first one. This step involves in squeezing& rotating volumes that I have never done it on Slicer.

4-) I am not able to test now but you may not even need to convert anything (neglect #3) because Slicer automatically extracts three orientations and visualizes once you load a volume. Therefore, let us say, you can save axial view of coronal and axial view of sagittal and the axial itself.

5-) Then overlay two psudeoaxials and the axial itself.

These five steps are all for segmentations. I expects the size of segmentation masks are same with original scans. Hence, in terms of matrix size convenience there shouldnt be any problem. Matrix is matrix whether they are segmentations or not.

Sorry for the late reply.

Best Regards,

Mustafa

---

<div class="post-metadata">

**Author:** ![Mustafa](https://avatars.discourse-cdn.com/v4/letter/m/f19dbf/32.png) [@Mustafa](https://discourse.slicer.org/u/Mustafa)\
**Post date:** [June 22, 2018, 9:50pm UTC](https://discourse.slicer.org/t/combining-segmentations-of-different-mri-files/3238/7 "2018-06-22T21:50:36Z")

</div>

They are in nrrd. That’s good.

---

<div class="post-metadata">

**Author:** ![rnahum](https://avatars.discourse-cdn.com/v4/letter/r/f04885/32.png) [@rnahum](https://discourse.slicer.org/u/rnahum)\
**Post date:** [June 22, 2018, 9:56pm UTC](https://discourse.slicer.org/t/combining-segmentations-of-different-mri-files/3238/8 "2018-06-22T21:56:22Z")

</div>

@Mustafa thank you!

I have one more question: can I load the other segmentations from the other two views into the segmentation of the third view using the segment editor module? or will I need to use a different module?

---

<div class="post-metadata">

**Author:** ![rnahum](https://avatars.discourse-cdn.com/v4/letter/r/f04885/32.png) [@rnahum](https://discourse.slicer.org/u/rnahum)\
**Post date:** [June 22, 2018, 10:48pm UTC](https://discourse.slicer.org/t/combining-segmentations-of-different-mri-files/3238/9 "2018-06-22T22:48:50Z")

</div>

Also would the pseudoaxials just be the segmentations of the coronal and sagittal views?

---

<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 22, 2018, 11:52pm UTC](https://discourse.slicer.org/t/combining-segmentations-of-different-mri-files/3238/10 "2018-06-22T23:52:43Z")

</div>

> [@rnahum](#):
>
> can I load the other segmentations from the other two views into the segmentation of the third view using the segment editor module

Yes, you can import any segments from any segmentation into another segmentation node. To prevent losing details duting import, make sure the segmentation node where you import the segments has sufficiently high resolution (you can create a higher resolution segmentation by cropping/resampling using Crop volumes module). In 1-2 weeks [we’ll add a feature to segmentation module, which will make this resampling very easy](https://github.com/Slicer/Slicer/pull/975).

---

<div class="post-metadata">

**Author:** ![rnahum](https://avatars.discourse-cdn.com/v4/letter/r/f04885/32.png) [@rnahum](https://discourse.slicer.org/u/rnahum)\
**Post date:** [July 25, 2018, 8:16pm UTC](https://discourse.slicer.org/t/combining-segmentations-of-different-mri-files/3238/11 "2018-07-25T20:16:52Z")

</div>

Hello!  
I was wondering if this resampling feature has been added to the segmentation module yet?

---

<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:** [July 25, 2018, 8:36pm UTC](https://discourse.slicer.org/t/combining-segmentations-of-different-mri-files/3238/12 "2018-07-25T20:36:45Z")

</div>

Yes, it is already available in nightly version of Slicer. Click on the button on the right side of _Master volume_ selector in Segment editor module to open the dialog where you can view/change current resolution.
