# How to convert volume to segmentation?

**URL:** <https://discourse.slicer.org/t/how-to-convert-volume-to-segmentation/1081>\
**Category:** Support\
**Tags:** segmentation\
**Created:** [September 18, 2017, 3:29pm UTC](https://discourse.slicer.org/t/how-to-convert-volume-to-segmentation/1081 "2017-09-18T15:29:35Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![pwang](https://avatars.discourse-cdn.com/v4/letter/p/73ab20/32.png) [@pwang](https://discourse.slicer.org/u/pwang)\
**Post date:** [September 18, 2017, 3:29pm UTC](https://discourse.slicer.org/t/how-to-convert-volume-to-segmentation/1081/1 "2017-09-18T15:29:36Z")

</div>

Operating system: Win7  
Slicer version: 4.7.0  
The original segmentation needs to be registered by deformable image registration (DIR) vector field generated from CT1 to CT2 DIR. My solution is: 1. convert segmentation to volume, 2. perform the DIR from CT1 to CT2, 3. deform seg volume using the vector field from step 2. However, the volume is considered to be one object, which doesn’t have the seg info, such as heart, liver, etc. Is there a way to conver the volume back to segmentation and keep the seg info? Thanks a lot.

---

<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:** [September 19, 2017, 12:59am UTC](https://discourse.slicer.org/t/how-to-convert-volume-to-segmentation/1081/2 "2017-09-19T00:59:47Z")

</div>

Import the labelmap volume to segmentation using Segmentations module.

---

<div class="post-metadata">

**Author:** ![pwang](https://avatars.discourse-cdn.com/v4/letter/p/73ab20/32.png) [@pwang](https://discourse.slicer.org/u/pwang)\
**Post date:** [September 19, 2017, 5:06pm UTC](https://discourse.slicer.org/t/how-to-convert-volume-to-segmentation/1081/3 "2017-09-19T17:06:51Z")

</div>

Thank you for your reply, Lassoan. But is there a more detail instruction on how to import the lablemap volume? I clicked the Import button, but nothing happened.

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/0/3/0374ab0c93ac8f3c611577e64da5b419b643a210.png). However, it doesn’t say how to select the node in the right square. Operation system: Win7. Version: 4.7.0. Thank you very much.

---

<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:** [September 19, 2017, 5:24pm UTC](https://discourse.slicer.org/t/how-to-convert-volume-to-segmentation/1081/4 "2017-09-19T17:24:01Z")

</div>

You can only import labelmap volumes. You have two options for having your volume interpreted as labelmap:

- Option A: Load your volume as a labelmap: in the `Add data` dialog click on `Show options` and check “LabelMap”.
- Option B: Convert your grayscale volume to labelmap in the `Volumes` module, `Volume information` section, `Convert to label map` row.

---

<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:** [September 19, 2017, 5:33pm UTC](https://discourse.slicer.org/t/how-to-convert-volume-to-segmentation/1081/5 "2017-09-19T17:33:20Z")

</div>

It seems to me you don’t have a segmentation node selected. Create one first on the very top. Then you can import the labelmap. You also didn’t select the labelmap; for that, see Andras’ comment just above.

---

<div class="post-metadata">

**Author:** ![pwang](https://avatars.discourse-cdn.com/v4/letter/p/73ab20/32.png) [@pwang](https://discourse.slicer.org/u/pwang)\
**Post date:** [September 20, 2017, 4:11pm UTC](https://discourse.slicer.org/t/how-to-convert-volume-to-segmentation/1081/6 "2017-09-20T16:11:03Z")

</div>

Thank you’ll for the quick reply. I have tried your suggested methods. They successfully convert the volume into segmentation. However the segmentation won’t be exported out. At first, I just exported the segmentation to dicom, there is the following error message. ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/b/c/bcf0a047d5ac87d42308a5ac6cc654d95e3f599b.png). But only CT set is exported and segmentation is not. Please help! Thank you.

---

<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:** [September 20, 2017, 5:02pm UTC](https://discourse.slicer.org/t/how-to-convert-volume-to-segmentation/1081/7 "2017-09-20T17:02:43Z")

</div>

1. A Subject needs to be created top-level, not a folder
2. A Study needs to be in the subject, not a folder
3. The CT and the segmentation need to be at the same level under the study

---

<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:** [September 20, 2017, 5:03pm UTC](https://discourse.slicer.org/t/how-to-convert-volume-to-segmentation/1081/8 "2017-09-20T17:03:50Z")

</div>

You may also want to consider filling out the DICOM tags on the right side: PatientID, PatientName, StudyDescription, etc.

---

<div class="post-metadata">

**Author:** ![pwang](https://avatars.discourse-cdn.com/v4/letter/p/73ab20/32.png) [@pwang](https://discourse.slicer.org/u/pwang)\
**Post date:** [September 20, 2017, 9:19pm UTC](https://discourse.slicer.org/t/how-to-convert-volume-to-segmentation/1081/9 "2017-09-20T21:19:42Z")

</div>

Thank you so much. It solved my problem! Much appreciated!

---

<div class="post-metadata">

**Author:** ![11114](https://avatars.discourse-cdn.com/v4/letter/1/49beb7/32.png) [@11114](https://discourse.slicer.org/u/11114)\
**Post date:** [March 10, 2019, 6:45am UTC](https://discourse.slicer.org/t/how-to-convert-volume-to-segmentation/1081/10 "2019-03-10T06:45:02Z")

</div>

Hi！ How can I segment the corresponding CT image by ROI?

---

<div class="post-metadata">

**Author:** ![dp1991](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/dp1991/32/3142_2.png) [@dp1991](https://discourse.slicer.org/u/dp1991)\
**Post date:** [March 10, 2019, 1:10pm UTC](https://discourse.slicer.org/t/how-to-convert-volume-to-segmentation/1081/11 "2019-03-10T13:10:24Z")

</div>

Hi

All Module— \> Simple Filter ---- \> Crop Image Filter  
and then set parameters
