# VMTK: Problem about multiple source/target points for vtkvmtkPolyDataCenterlines

**URL:** https://discourse.vtk.org/t/vmtk-problem-about-multiple-source-target-points-for-vtkvmtkpolydatacenterlines/4136
**Category:** Support
**Created:** [September 3, 2020, 8:00am UTC](https://discourse.vtk.org/t/vmtk-problem-about-multiple-source-target-points-for-vtkvmtkpolydatacenterlines/4136 "2020-09-03T08:00:46Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![NeuZhangQiang](https://discourse.vtk.org/user_avatar/discourse.vtk.org/neuzhangqiang/32/2248_2.png) [@NeuZhangQiang](https://discourse.vtk.org/u/NeuZhangQiang)
#### Post date: [September 3, 2020, 8:00am UTC](https://discourse.vtk.org/t/vmtk-problem-about-multiple-source-target-points-for-vtkvmtkpolydatacenterlines/4136/1 "2020-09-03T08:00:46Z")

</div>

I am using vmtk to extract center lines from airway, and I need some help. For example, the airway looks like:

[![image](https://discourse.vtk.org/uploads/default/original/2X/2/25d90fcdbe2b0ab38a128b2fe50312719564c3ac.png)](https://user-images.githubusercontent.com/62534955/91920698-6a722280-ecfc-11ea-90ff-c0fb8aeb5981.png)

If the source point is 0, and target point is 1, the output is OK:

[![image](https://discourse.vtk.org/uploads/default/original/2X/a/ac2f9f07a7bc1bc3e01a943ab51665d80a97133e.png)](https://user-images.githubusercontent.com/62534955/91920788-9097c280-ecfc-11ea-9ee2-cb68c7ce2541.png)  
Fig. 1

If the source point is [1, 1], and target point is [2, 3], the output is also acceptable:

[![image](https://discourse.vtk.org/uploads/default/original/2X/a/a76f37bebdbdc2cc95f413957dab5a826e39e8f2.png)](https://user-images.githubusercontent.com/62534955/91920824-a3aa9280-ecfc-11ea-8cf3-291afcb7418b.png)  
Fig. 2

However, if I want to extract the three center lines, and set the source point as [0, 1, 1], target point is [1, 2, 3], the output is:

[![image](https://discourse.vtk.org/uploads/default/original/2X/a/a76f37bebdbdc2cc95f413957dab5a826e39e8f2.png)](https://user-images.githubusercontent.com/62534955/91920824-a3aa9280-ecfc-11ea-8cf3-291afcb7418b.png)  
Fig. 3

The line [0, 1] is missed. What is the reason to cause this problem?

Moreover, if I separately extract line (0, 1) and (1,2)/(1,3), the computation time would be double. How can I reduce the computation time for this situation?

Any suggestion is appreciated!

---

<div class="post-metadata">

### Author: ![lassoan](https://discourse.vtk.org/user_avatar/discourse.vtk.org/lassoan/32/50_2.png) [@lassoan](https://discourse.vtk.org/u/lassoan)
#### Post date: [September 3, 2020, 1:20pm UTC](https://discourse.vtk.org/t/vmtk-problem-about-multiple-source-target-points-for-vtkvmtkpolydatacenterlines/4136/2 "2020-09-03T13:20:04Z")

</div>

The question got answered here: [https://github.com/vmtk/vmtk/issues/355](https://github.com/vmtk/vmtk/issues/355)
