# Vmtk networkextraction algorithm

**URL:** <https://discourse.slicer.org/t/vmtk-networkextraction-algorithm/16611>\
**Category:** VMTK\
**Tags:** vmtk-centerline\
**Created:** [March 18, 2021, 11:04am UTC](https://discourse.slicer.org/t/vmtk-networkextraction-algorithm/16611 "2021-03-18T11:04:50Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Deepa](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/deepa/32/5634_2.png) [@Deepa](https://discourse.slicer.org/u/Deepa)\
**Post date:** [March 18, 2021, 11:04am UTC](https://discourse.slicer.org/t/vmtk-networkextraction-algorithm/16611/1 "2021-03-18T11:04:50Z")

</div>

Hi All, Could someone please let me know the name of the network extraction algorithm available in VMTK?

---

<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 26, 2021, 2:58am UTC](https://discourse.slicer.org/t/vmtk-networkextraction-algorithm/16611/2 "2021-03-26T02:58:03Z")

</div>

As far as I know, it is a new algorithm invented in VMTK. You can refer to it as “network extraction algorithm in VMTK” and cite the [VMTK paper](https://github.com/vmtk/vmtk/blob/master/doc/joss-paper/paper.md).

---

<div class="post-metadata">

**Author:** ![Deepa](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/deepa/32/5634_2.png) [@Deepa](https://discourse.slicer.org/u/Deepa)\
**Post date:** [March 26, 2021, 5:07am UTC](https://discourse.slicer.org/t/vmtk-networkextraction-algorithm/16611/3 "2021-03-26T05:07:24Z")

</div>

Thank you! I did the same 🙂

---

<div class="post-metadata">

**Author:** ![KaryLiang](https://avatars.discourse-cdn.com/v4/letter/k/9fc29f/32.png) [@KaryLiang](https://discourse.slicer.org/u/KaryLiang)\
**Post date:** [April 6, 2021, 1:59am UTC](https://discourse.slicer.org/t/vmtk-networkextraction-algorithm/16611/5 "2021-04-06T01:59:26Z")

</div>

Hi,  
I’ve got the ‘Radius’ array from network extraction algorithm [here](https://github.com/vmtk/SlicerExtension-VMTK/blob/3787ea4a300da28ec5f0824f0715f2713b631155/ExtractCenterline/ExtractCenterline.py#L605), can i think of this array as the true radius of the blood vessel?

---

<div class="post-metadata">

**Author:** ![Carlos\_Alberto\_Bulan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/carlos_alberto_bulan/32/8467_2.png) [@Carlos\_Alberto\_Bulan](https://discourse.slicer.org/u/Carlos_Alberto_Bulan)\
**Post date:** [April 6, 2021, 11:54am UTC](https://discourse.slicer.org/t/vmtk-networkextraction-algorithm/16611/6 "2021-04-06T11:54:47Z")

</div>

Hi,  
The radius computed by the filter is actually the “Maximum Sirunscrive Sphere Radius”, which is equal to the “real” cross-sectional radius in the case of a straight cylindrical pipe shape.  
The MSSRadius deviates from the real cross-sectional Radius when the shape of your artery deviates from the pipe. Usually overestimates at junctions and underestimates elsewhere.  
Depending on your application, the MSSRadius can be a good estimation of the real Radius.  
If you want more precision you could try vmtkcenterlinesections, which outputs the cross-sectional area at each centerline point (among other, potentially, useful data).  
Regards,  
Carlos

---

<div class="post-metadata">

**Author:** ![KaryLiang](https://avatars.discourse-cdn.com/v4/letter/k/9fc29f/32.png) [@KaryLiang](https://discourse.slicer.org/u/KaryLiang)\
**Post date:** [April 7, 2021, 8:12am UTC](https://discourse.slicer.org/t/vmtk-networkextraction-algorithm/16611/7 "2021-04-07T08:12:14Z")

</div>

Thanks Carlos. As you know, i want the cross-sectional radius actually. it’s so great that radius can compute using networkextraction. It help me a lot.  
I have one more question, the radius’s array, N\*1, what does N represent? network points number? if yes, what is the distance between the points?  
If vmtkcenterlinesections can get more accurate radius, i’ll try it later.

---

<div class="post-metadata">

**Author:** ![Carlos\_Alberto\_Bulan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/carlos_alberto_bulan/32/8467_2.png) [@Carlos\_Alberto\_Bulan](https://discourse.slicer.org/u/Carlos_Alberto_Bulan)\
**Post date:** [April 8, 2021, 12:17am UTC](https://discourse.slicer.org/t/vmtk-networkextraction-algorithm/16611/8 "2021-04-08T00:17:15Z")

</div>

You can use vmtkcenterlineresampling filter to resample the centerline spacing.

---

<div class="post-metadata">

**Author:** ![KaryLiang](https://avatars.discourse-cdn.com/v4/letter/k/9fc29f/32.png) [@KaryLiang](https://discourse.slicer.org/u/KaryLiang)\
**Post date:** [April 12, 2021, 8:54am UTC](https://discourse.slicer.org/t/vmtk-networkextraction-algorithm/16611/9 "2021-04-12T08:54:52Z")

</div>

I am trying to use vmtkcenterlines[(here)](https://github.com/vmtk/SlicerExtension-VMTK/blob/3787ea4a300da28ec5f0824f0715f2713b631155/ExtractCenterline/ExtractCenterline.py#L691) to get vessel center lines and MSSRadius. Before that, i already get endpoints from network algorithm.  
This is a detail of vmtkcenterlines input:

- tubePolyData = surfaceCapper.GetOutput().

- sourceIdLIst: the first point of the endpoints array (i not sure does this make sense).

- targetIdList: all point of endpoints expect the first one.

i meet some problem:  
 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/f/a/fa03ca6ae288110f4a26aa5716b1755fee80144b.png)

Please help or try to give some ideas to fix this.
