# Vessel tree centerline branch extraction using VMTK

**URL:** <https://discourse.slicer.org/t/vessel-tree-centerline-branch-extraction-using-vmtk/11867>\
**Category:** Support\
**Tags:** vmtk\
**Created:** [June 4, 2020, 7:49pm UTC](https://discourse.slicer.org/t/vessel-tree-centerline-branch-extraction-using-vmtk/11867 "2020-06-04T19:49:45Z")\
**Posts on this page:** 1\
**Showing post:** 23

<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 9, 2021, 5:48pm UTC](https://discourse.slicer.org/t/vessel-tree-centerline-branch-extraction-using-vmtk/11867/23 "2021-03-09T17:48:24Z")

</div>

You see the straight lines if path cannot be found to a point. It is almost always happens because the endpoint is on the surface mesh, while the full centerline extraction searches along the Voronoi diagram, which is inside the mesh.

You can fix the error easily by moving the endpoints inside the mesh. It would be easy to automate this by snapping the endpoint to the closest point on the Voronoi surface. It would be great if you could implement this and send a pull request.

---

_[View the full topic](https://discourse.slicer.org/t/vessel-tree-centerline-branch-extraction-using-vmtk/11867)._
