Convert vessel centerline model to image volume

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.

You can access the centerline point positions from Python using slicer.util.arrayFromModelPoints().

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.

Hi @lassoan, I appreciate your answer. But it seems that there’s something wrong.
1 2
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?