# How to create 3D volumes of segmented vessels from .mhd/.raw?

**URL:** <https://discourse.slicer.org/t/how-to-create-3d-volumes-of-segmented-vessels-from-mhd-raw/28225>\
**Category:** Support\
**Tags:** volume-rendering\
**Created:** [March 7, 2023, 5:38pm UTC](https://discourse.slicer.org/t/how-to-create-3d-volumes-of-segmented-vessels-from-mhd-raw/28225 "2023-03-07T17:38:09Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![hoppymop](https://avatars.discourse-cdn.com/v4/letter/h/6f9a4e/32.png) [@hoppymop](https://discourse.slicer.org/u/hoppymop)\
**Post date:** [March 7, 2023, 5:38pm UTC](https://discourse.slicer.org/t/how-to-create-3d-volumes-of-segmented-vessels-from-mhd-raw/28225/1 "2023-03-07T17:38:09Z")

</div>

Hej,

My aim is to create 3D volumes of .mhd/.raw-files of segmented abdomen vessels (CT-images) and eventually extract the center-lines. The 3D volume of the segmented vessels looks like this:

 ![23027a52-2c93-4156-b3cf-d65d23e965fe](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/d/6/d6a3f0000c34a2900870c10ea1b5d9054b94c609.jpeg)

There is one CT-data set with segmented vessels in the same color, where I can easily use thresholding to create a 3D volume. The other CT-data set shows different colors for the vessel segmentation as shown in the image above.

How can I create 3D volumes of segmented vessels (.mhd/.raw) with different colors?

Thank you so much for your help!

How can I create a 3D volume of these differently colored segmented vessels?

---

<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:** [March 8, 2023, 3:51am UTC](https://discourse.slicer.org/t/how-to-create-3d-volumes-of-segmented-vessels-from-mhd-raw/28225/2 "2023-03-08T03:51:02Z")

</div>

> [@hoppymop](#):
>
> How can I create 3D volumes of segmented vessels (.mhd/.raw) with different colors?

You can use the Segment Editor module for this.

> [@hoppymop](#):
>
> How can I create a 3D volume of these differently colored segmented vessels?

If you save the segmentation then you get exactly that, a volume where each segment is represented by a different label (color).

---

<div class="post-metadata">

**Author:** ![hoppymop](https://avatars.discourse-cdn.com/v4/letter/h/6f9a4e/32.png) [@hoppymop](https://discourse.slicer.org/u/hoppymop)\
**Post date:** [March 8, 2023, 5:55am UTC](https://discourse.slicer.org/t/how-to-create-3d-volumes-of-segmented-vessels-from-mhd-raw/28225/3 "2023-03-08T05:55:30Z")

</div>

Which tool should I use in segment editor? That’s my problem. I can use threshold, but it allowed me to choose one label (color) at a time. I couldn’t choose all labels at once.

---

<div class="post-metadata">

**Author:** ![muratmaga](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/muratmaga/32/3622_2.png) [@muratmaga](https://discourse.slicer.org/u/muratmaga)\
**Post date:** [March 8, 2023, 6:42am UTC](https://discourse.slicer.org/t/how-to-create-3d-volumes-of-segmented-vessels-from-mhd-raw/28225/4 "2023-03-08T06:42:00Z")

</div>

@hoppymop  
Threshold the entire network as one segment.

Create blank segments for each of those branches.

Set the active segment to a blank one.

use the scissors tool in the fill mode, and set the editable area Inside Segment\_1 (or the name of the segment that contains the full network).

With scissors highlight the branch you want to separate in one cursor movement.  
Now that section will be in the new segment’s color.

Repeat for each of the branches.
