# VMTK：question about the input of vtkvmtkPolyDataCenterlines

**URL:** https://discourse.vtk.org/t/vmtk-question-about-the-input-of-vtkvmtkpolydatacenterlines/4088
**Category:** Support
**Created:** [August 28, 2020, 5:55am UTC](https://discourse.vtk.org/t/vmtk-question-about-the-input-of-vtkvmtkpolydatacenterlines/4088 "2020-08-28T05:55:29Z")
**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: [August 28, 2020, 5:55am UTC](https://discourse.vtk.org/t/vmtk-question-about-the-input-of-vtkvmtkpolydatacenterlines/4088/1 "2020-08-28T05:55:29Z")

</div>

I need to extract center lines from airway mask, and [VMTK](http://www.vmtk.org/tutorials/Centerlines.html) is a very good tool.

VMTK use vtkvmtkPolyDataCenterlines to extract the center lines, and the usage of vtkvmtkPolyDataCenterlines is:

```
    centerlineFilter = vtkvmtk.vtkvmtkPolyDataCenterlines()
    centerlineFilter.SetInputData(centerlineInputSurface)
    centerlineFilter.SetSourceSeedIds(inletSeedIds)
    centerlineFilter.SetTargetSeedIds(outletSeedIds)
    centerlineFilter.SetRadiusArrayName(self.RadiusArrayName)
    centerlineFilter.SetCostFunction(self.CostFunction)
    centerlineFilter.SetFlipNormals(self.FlipNormals)
    centerlineFilter.SetAppendEndPointsToCenterlines(self.AppendEndPoints)
    centerlineFilter.SetSimplifyVoronoi(self.SimplifyVoronoi)
    centerlineFilter.SetCenterlineResampling(self.Resampling)
    centerlineFilter.SetResamplingStepLength(self.ResamplingStepLength)
    centerlineFilter.Update()

```

The inletSeedIds/outletSeedIds indicate the ids of source and target points. My question is: how can centerlineFilter obtain the real coordinate (x, y, z)? How can we input the real coordinate to centerlineFilter? For example, if I have the coordinate of two bifurcation points (calculated by other method), how can I input the bifurcation points to centerlineFilter and extract the center line?

---

<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: [August 31, 2020, 8:23am UTC](https://discourse.vtk.org/t/vmtk-question-about-the-input-of-vtkvmtkpolydatacenterlines/4088/2 "2020-08-31T08:23:57Z")

</div>

Actually, we can use pointlist to input the real coordinate. More details can be found in `vmtkPointListSeedSelector` .
