# How to Get skeleton of pulmonary vascular system

**URL:** <https://discourse.slicer.org/t/how-to-get-skeleton-of-pulmonary-vascular-system/13502>\
**Category:** Support\
**Created:** [September 16, 2020, 2:00pm UTC](https://discourse.slicer.org/t/how-to-get-skeleton-of-pulmonary-vascular-system/13502 "2020-09-16T14:00:55Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![shahrokh](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/shahrokh/32/1499_2.png) [@shahrokh](https://discourse.slicer.org/u/shahrokh)\
**Post date:** [September 16, 2020, 2:00pm UTC](https://discourse.slicer.org/t/how-to-get-skeleton-of-pulmonary-vascular-system/13502/1 "2020-09-16T14:00:55Z")

</div>

Hello Dear Developers and Users

Excuse me for asking a question that might be obvious to many:  
Is there a difference between **Skeleton** and **Centerline**?

I want to extract a skeleton of the pulmonary vascular system (vascular tree) .

To do this, I did the following steps:

1- Segment pulmonary vascular system (tree) using _Frangi filter_ on **VMTK** with _vmtkimagevesselenhancement_.

2- Convert it to labelMapVolume

3- In the last step, I want to use the **Extract Skeleton** module to extract _the skeleton of vascular tree_.

I have the following questions about this module:

A. What is the difference between tow modes **1D** and **2D** in **Skeleton Type**?

B. This module does not finish when I select **Skeleton Type** in **2D** mode.

Although I select the number of 100 in the **Number Of Points** section, I see the coordinates of fewer points (about 40) in the **skeleton.txt** file. Why?

Why am I not able to get/see the **Skeleton** of these vessels in 3D view?

The image below is a demonstration of these pulmonary vessels in the type of **Model**.

 ![vessels](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/2/2/22a7807e2bfd0c176b63aeed6f86009fff30af9a.jpeg)

Please guide me.  
Thanks a lot.  
Shahrokh.

---

<div class="post-metadata">

**Author:** ![shahrokh](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/shahrokh/32/1499_2.png) [@shahrokh](https://discourse.slicer.org/u/shahrokh)\
**Post date:** [September 17, 2020, 7:26am UTC](https://discourse.slicer.org/t/how-to-get-skeleton-of-pulmonary-vascular-system/13502/2 "2020-09-17T07:26:14Z")

</div>

Hello  
I hope I have explained what I mean clearly.  
I do not understand why the **Extract Skeleton** module cannot extract the skeleton.  
Is this node (LabelMapVolume node) too complicated?

As can be seen in the following image, some parts of the vessels are disconnected and not connected to each other. Does this prevent this module from extracting the skeleton of vascular tree?

 ![SceneView](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/6/c/6c3dd751f47e10542459934969f266dd57c0bc00.jpeg)

Can I have to isotropic spacing CT images at the beginning of processing?

Please guide me.  
Thanks a lot.  
Shahrokh

---

<div class="post-metadata">

**Author:** ![shahrokh](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/shahrokh/32/1499_2.png) [@shahrokh](https://discourse.slicer.org/u/shahrokh)\
**Post date:** [September 21, 2020, 3:44pm UTC](https://discourse.slicer.org/t/how-to-get-skeleton-of-pulmonary-vascular-system/13502/3 "2020-09-21T15:44:43Z")

</div>

To do this, I did the following steps.  
The following steps were performed to extract the skeleton of pulmonary vascular system, respectively.

1- Segment the lung region from the chest CT image

2- Segment the pulmonary vessels by applying the **Frangi filter** (argument) in the command of **vmtkimagevesselenhancement**

3- Apply **Threshold Effect** in the module of **Segment Editor**

4- Removal of the outer edge of the lung region and the common border between the lung and the heart by the **Sobel filter** in the module of **Simple Fiters**

5- Split segmented vessel tree by **Island Effect** ( **Split islands to segments** ) in the module of **Segment Editor**

6- Convert the result of the previous step to **Model** and save them in **vtp** format

7- Merge vessel component models by the **MergeModels** (CLI)

The following image is shown in the result of above steps.

 ![1](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/0/3/037e40e06f19a9bcef5b152a4f0e9e693a01d75c.jpeg)

As you can be seen in the following image, the centerline of some parts of the vessels has not been extracted. Why?

 ![2](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/4/5/4577681fb957e21ad865404f8bed00283bf3f277.jpeg)

In these regions, I extracted the centerlines using the module of **Extract Centerline**.

Please guide me.  
Thanks a lot.  
Shahrokh

---

<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 21, 2020, 6:36pm UTC](https://discourse.slicer.org/t/how-to-get-skeleton-of-pulmonary-vascular-system/13502/4 "2020-09-21T18:36:51Z")

</div>

> [@shahrokh](#):
>
> Is there a difference between **Skeleton** and **Centerline**?

No difference, they both refer to the same thing: medial line or surface.

> [@shahrokh](#):
>
> What is the difference between tow modes **1D** and **2D** in **Skeleton Type**?

1D enforces extraction of a line (medial line), 2D extracts a surface (medial surface).

> [@shahrokh](#):
>
> This module does not finish when I select **Skeleton Type** in **2D** mode.

Computation time may be very long for 2D mode.

> [@shahrokh](#):
>
> Although I select the number of 100 in the **Number Of Points** section, I see the coordinates of fewer points (about 40) in the **skeleton.txt** file.

Number of points specifies the maximum. If your image has lower resolution and the centerline is short then the line may be represented with less points than what you have requested. If you need more points then you can get arbitrarily resampling of the curve using markups module.

> [@shahrokh](#):
>
> Why am I not able to get/see the **Skeleton** of these vessels in 3D view?

Result of “Extract skeleton” module is a labelmap volume. You can use volume rendering or you can import it into Segmentation to visualize in 3D views.

> [@shahrokh](#):
>
> Can I have to isotropic spacing CT images at the beginning of processing?

If the difference between spacing along different axis is more than a few ten percent then I would recommend to use Crop volume to crop and resample the volume using isotropic spacing.

> [@shahrokh](#):
>
> Split segmented vessel tree by **Island Effect** ( **Split islands to segments** ) in the module of **Segment Editor**
> 
> 6- Convert the result of the previous step to **Model** and save them in **vtp** format
> 
> 7- Merge vessel component models by the **MergeModels** (CLI)

This is unnecessarily complicated and slow way of removing small islands. You can achieve the same by using “Remove small islands” method in Islands effect.

> [@shahrokh](#):
>
> As you can be seen in the following image, the centerline of some parts of the vessels has not been extracted. Why?

Probably those branches are too small. If you share the scene that contains the segmentation that you created using Thresholding effect (but before Island effect applied or other further processing is done) then I may have a look.

---

<div class="post-metadata">

**Author:** ![shahrokh](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/shahrokh/32/1499_2.png) [@shahrokh](https://discourse.slicer.org/u/shahrokh)\
**Post date:** [September 23, 2020, 2:52pm UTC](https://discourse.slicer.org/t/how-to-get-skeleton-of-pulmonary-vascular-system/13502/5 "2020-09-23T14:52:19Z")

</div>

Dear Dr. Andras Lassoan

Thank you so much for your detailed explanation. Excuse me, but I do not understand how to share with you the scene that contains the segmentation. Do you mean a scene with .mrml extension (MRML scene) or .mrb extension (Medical Reality Bundle)? Where should I upload this file?

Best regards.  
Shahrokh

---

<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 23, 2020, 2:57pm UTC](https://discourse.slicer.org/t/how-to-get-skeleton-of-pulmonary-vascular-system/13502/6 "2020-09-23T14:57:24Z")

</div>

Upload the mrb file anywhere (dropbox, onedrive, google drive, …) and post the link here. Make sure not patient information is included.

---

<div class="post-metadata">

**Author:** ![shahrokh](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/shahrokh/32/1499_2.png) [@shahrokh](https://discourse.slicer.org/u/shahrokh)\
**Post date:** [September 24, 2020, 8:38pm UTC](https://discourse.slicer.org/t/how-to-get-skeleton-of-pulmonary-vascular-system/13502/7 "2020-09-24T20:38:15Z")

</div>

I upload .mrb file in dropbox.

> **[Scene.mrb](https://www.dropbox.com/s/c0avqviz6mhb6cz/Scene.mrb?dl=0)**
>
> Shared with Dropbox

Thanks a lot.  
Shahrokh.

---

<div class="post-metadata">

**Author:** ![Montes\_de\_Oca\_Delgad](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/montes_de_oca_delgad/32/16736_2.png) [@Montes\_de\_Oca\_Delgad](https://discourse.slicer.org/u/Montes_de_Oca_Delgad)\
**Post date:** [September 22, 2022, 5:32am UTC](https://discourse.slicer.org/t/how-to-get-skeleton-of-pulmonary-vascular-system/13502/8 "2022-09-22T05:32:10Z")

</div>

Hello.

I have a question. To which volume have you applied the filter? I have some problems with the segmentation of the vessels.

Thank you
