# How to obtain the complete center lines using VMTK?

**URL:** https://discourse.vtk.org/t/how-to-obtain-the-complete-center-lines-using-vmtk/4425
**Category:** Support
**Created:** [October 15, 2020, 9:39am UTC](https://discourse.vtk.org/t/how-to-obtain-the-complete-center-lines-using-vmtk/4425 "2020-10-15T09:39:06Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![KaryLiang](https://discourse.vtk.org/user_avatar/discourse.vtk.org/karyliang/32/2239_2.png) [@KaryLiang](https://discourse.vtk.org/u/KaryLiang)
#### Post date: [October 15, 2020, 9:39am UTC](https://discourse.vtk.org/t/how-to-obtain-the-complete-center-lines-using-vmtk/4425/1 "2020-10-15T09:39:06Z")

</div>

I’m trying to obtain center lines from airway using VMTK. After dilating the pixels of airway, i got most of the center line, including from the small airway, looks like this:

 ![image](https://discourse.vtk.org/uploads/default/original/2X/4/4f6dd7a3c7a2e759841f4081c807ae74d410a57e.png)

my problem is, why the center lines are broken in the middle? and what would be the best way to get a complete center lines?

 ![image](https://discourse.vtk.org/uploads/default/original/2X/3/370d28f464ddfe82136be18d7ef13ad5b8ab0ba3.png)

A similar problem seems to be happened here, the extract lines are not joined:  
[[https://github.com/vmtk/vmtk/issues/355](https://github.com/vmtk/vmtk/issues/355)]

Please help or try to give some ideas how to achieve this. Thanks in advance.

---

<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: [October 15, 2020, 1:44pm UTC](https://discourse.vtk.org/t/how-to-obtain-the-complete-center-lines-using-vmtk/4425/2 "2020-10-15T13:44:22Z")

</div>

Please send questions about VMTK toolkit to the new [VMTK forum](https://discourse.slicer.org/c/community/vmtk/) (see [recent note from Luca Antiga](https://groups.google.com/g/vmtk-users/c/D_cw1WpRTJY)).
