# Is it possible to combine Label Maps and Images into a single file?

**URL:** <https://discourse.slicer.org/t/is-it-possible-to-combine-label-maps-and-images-into-a-single-file/5680>\
**Category:** Support\
**Created:** [February 7, 2019, 2:41pm UTC](https://discourse.slicer.org/t/is-it-possible-to-combine-label-maps-and-images-into-a-single-file/5680 "2019-02-07T14:41:50Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kevin.Kn](https://avatars.discourse-cdn.com/v4/letter/k/59ef9b/32.png) [@Kevin.Kn](https://discourse.slicer.org/u/Kevin.Kn)\
**Post date:** [February 7, 2019, 2:41pm UTC](https://discourse.slicer.org/t/is-it-possible-to-combine-label-maps-and-images-into-a-single-file/5680/1 "2019-02-07T14:41:50Z")

</div>

Currently I have pairs of .nii images and labelmaps, which I would like to combine into single files where the label map overlaps with the image.

Is there a way to do this that doesn’t mess with the spatial dimensions of the image and labelmap? I know that you can create larger volumes and save multiple images to that volume as long as they fit the dimensions, but doing that stacks the images on top of each other.

---

<div class="post-metadata">

**Author:** ![cpinter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/cpinter/32/7995_2.png) [@cpinter](https://discourse.slicer.org/u/cpinter)\
**Post date:** [February 7, 2019, 2:50pm UTC](https://discourse.slicer.org/t/is-it-possible-to-combine-label-maps-and-images-into-a-single-file/5680/2 "2019-02-07T14:50:59Z")

</div>

You can mask out parts of your images with the labelmaps like this:

1. Make sure that the SegmentEditorExtraEffects extension is installed
2. Import the labelmap into a segmentation (right-click labelmap in Data module and choose “Convert labelmap to segmentation node”
3. Go to Segment Editor
4. Select the new segmentation, and your image as master volume
5. Use Mask volume effect

I don’t quite understand your comment on stacks of images. How different are the geometries of the images and labelmaps?
