# Saving a segmentation and input volume in one file

**URL:** https://discourse.slicer.org/t/saving-a-segmentation-and-input-volume-in-one-file/21506
**Category:** Support
**Tags:** segmentation, dicom
**Created:** [January 18, 2022, 2:42am UTC](https://discourse.slicer.org/t/saving-a-segmentation-and-input-volume-in-one-file/21506 "2022-01-18T02:42:21Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![3Dslicerhelp](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/3dslicerhelp/32/13839_2.png) [@3Dslicerhelp](https://discourse.slicer.org/u/3Dslicerhelp)
#### Post date: [January 18, 2022, 2:42am UTC](https://discourse.slicer.org/t/saving-a-segmentation-and-input-volume-in-one-file/21506/1 "2022-01-18T02:42:21Z")

</div>

Operating system: Windows 10  
Slicer version: 4.11.20200930

Hello,

I uploaded a CT dicom image set into Slicer and segmented a region of interest. Now, I would like to save both my input volume and segmentation into a single file (preferably .nrrd). Is there a way I am able to do this?

I have attempted to export my segmentation as a labelmap; however, this only saves the segmentation without the CT dicoms. I need the 3D CT volume with the segmentation included as my label.

My end goal is to use these .nrrd files as inputs for a deep learning model that requires labelled image sets.

Thanks,  
K.

---

<div class="post-metadata">

### Author: ![3Dslicerhelp](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/3dslicerhelp/32/13839_2.png) [@3Dslicerhelp](https://discourse.slicer.org/u/3Dslicerhelp)
#### Post date: [January 19, 2022, 3:09pm UTC](https://discourse.slicer.org/t/saving-a-segmentation-and-input-volume-in-one-file/21506/2 "2022-01-19T15:09:59Z")

</div>

I uploaded a CT dicom image set into Slicer and segmented a region of interest. Now, I would like to save both my input volume and segmentation into a single file (preferably .nrrd). Is there a way I am able to do this?

I have attempted to export my segmentation as a labelmap; however, this only saves the segmentation without the CT dicoms. I need the 3D CT volume with the segmentation included as my label.

My end goal is to use these .nrrd files as inputs for a deep learning model that requires labelled image sets.

Thanks!

---

<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: [January 27, 2022, 6:59am UTC](https://discourse.slicer.org/t/saving-a-segmentation-and-input-volume-in-one-file/21506/3 "2022-01-27T06:59:25Z")

</div>

Normally you save the input CT volume and the segmentation as separate files - see all the deep learning data sets that you can find online. This makes sense because the scalar type of the volumes are often different (16-bit for CT, 8-bit for labelmap), the entropy of a CT and a labelmap is vastly different, so you can compress them better if you store them as two separate files, the correspondence between a CT and segmentation is not always 1-to-1 (there can be several segmentations for a CT, for example, by different experts), etc.

---

<div class="post-metadata">

### Author: ![rbumm](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/rbumm/32/9404_2.png) [@rbumm](https://discourse.slicer.org/u/rbumm)
#### Post date: [January 27, 2022, 10:35am UTC](https://discourse.slicer.org/t/saving-a-segmentation-and-input-volume-in-one-file/21506/4 "2022-01-27T10:35:30Z")

</div>

To package mrml, ct.nrrd and segmentation.nrrd into one MRB file you can click this symbol:

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/6/1/61b690c7a704da2986adbaa72f5962ccfc8dd653.png)
