# VMTK, Centerline Extraction

**URL:** <https://discourse.slicer.org/t/vmtk-centerline-extraction/44027>\
**Category:** Support\
**Created:** [August 8, 2025, 3:11pm UTC](https://discourse.slicer.org/t/vmtk-centerline-extraction/44027 "2025-08-08T15:11:38Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Paria.M](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/paria.m/32/80791_2.png) [@Paria.M](https://discourse.slicer.org/u/Paria.M)\
**Post date:** [August 8, 2025, 3:11pm UTC](https://discourse.slicer.org/t/vmtk-centerline-extraction/44027/1 "2025-08-08T15:11:38Z")

</div>

Hi everyone,

I want to extract the centerline using VMTK. When I select the Endpoints, the extracted centerline does not cross the points properly, and its far from the Endpoints! Can anyone help me to see what is the problem.

Thank you.

 ![Screenshot (232)](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/0/f/0f2c9820dacfbf0397de86622c29c1997d07bb78.png)

---

<div class="post-metadata">

**Author:** ![chir.set](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/chir.set/32/66982_2.png) [@chir.set](https://discourse.slicer.org/u/chir.set)\
**Post date:** [August 8, 2025, 3:51pm UTC](https://discourse.slicer.org/t/vmtk-centerline-extraction/44027/2 "2025-08-08T15:51:13Z")

</div>

Near the end of the surface, the first/last computed centerline point will be away from the end of the surface by the maximum inscribed sphere’s radius at that point.

Either your get your end points further from the ends of the input surface or you extend the surface.

 ![last_centerline_point](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/4/a/4a1d76e6de64eb45a3254c57f67780b9724d77b1.png)

---

<div class="post-metadata">

**Author:** ![Paria.M](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/paria.m/32/80791_2.png) [@Paria.M](https://discourse.slicer.org/u/Paria.M)\
**Post date:** [August 8, 2025, 4:17pm UTC](https://discourse.slicer.org/t/vmtk-centerline-extraction/44027/3 "2025-08-08T16:17:02Z")

</div>

Thanks for your reply. You mean that I should consider the endpoints a little bit far from the desired endpoints?

---

<div class="post-metadata">

**Author:** ![chir.set](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/chir.set/32/66982_2.png) [@chir.set](https://discourse.slicer.org/u/chir.set)\
**Post date:** [August 8, 2025, 5:05pm UTC](https://discourse.slicer.org/t/vmtk-centerline-extraction/44027/4 "2025-08-08T17:05:53Z")

</div>

> [@Paria.M](#):
>
> a little bit far from the desired endpoints

Place the endpoints a little bit far from the ends of the tubular surface, at least by the maximum inscribed sphere’s radius.
