# Convert vessel centerline model to image volume

**URL:** <https://discourse.slicer.org/t/convert-vessel-centerline-model-to-image-volume/5906>\
**Category:** Support\
**Tags:** segmentation\
**Created:** [February 25, 2019, 1:31am UTC](https://discourse.slicer.org/t/convert-vessel-centerline-model-to-image-volume/5906 "2019-02-25T01:31:58Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![albert94](https://avatars.discourse-cdn.com/v4/letter/a/898d66/32.png) [@albert94](https://discourse.slicer.org/u/albert94)\
**Post date:** [February 25, 2019, 1:31am UTC](https://discourse.slicer.org/t/convert-vessel-centerline-model-to-image-volume/5906/1 "2019-02-25T01:31:58Z")

</div>

Hi all,

Is there a way to convert a 3D vessel centerline model into a 3D image volume? I segmented out the vascular centerline using 3D Slicer but I want to convert it into 3D image volume so that I could use use it in python as 3D array.  
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:** [February 25, 2019, 3:14am UTC](https://discourse.slicer.org/t/convert-vessel-centerline-model-to-image-volume/5906/2 "2019-02-25T03:14:59Z")

</div>

You can access the centerline point positions from Python using [`slicer.util.arrayFromModelPoints()`](http://slicer.readthedocs.io/en/latest/developer_guide/slicer.html#module-slicer.util).

To generate an image volume, you can create a tube model using “Markups to model” extension, import the generated model to a segmentation node, then export the segmentation to a labelmap volume node.

---

<div class="post-metadata">

**Author:** ![albert94](https://avatars.discourse-cdn.com/v4/letter/a/898d66/32.png) [@albert94](https://discourse.slicer.org/u/albert94)\
**Post date:** [February 26, 2019, 9:39am UTC](https://discourse.slicer.org/t/convert-vessel-centerline-model-to-image-volume/5906/3 "2019-02-26T09:39:51Z")

</div>

Hi @lassoan, I appreciate your answer. But it seems that there’s something wrong.  
 ![1](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/8/f/8fc4cb67c2138861fa58bd214a973a36c497d4eb.png)  
As you can see the endpoints of these lines are connected in the generated model by “Markups to model” extension. But this is not I wanted. Did I miss something?
