# Automatic vessel endpoints detection

**URL:** https://discourse.slicer.org/t/automatic-vessel-endpoints-detection/16435
**Category:** VMTK
**Created:** [March 8, 2021, 7:48pm UTC](https://discourse.slicer.org/t/automatic-vessel-endpoints-detection/16435 "2021-03-08T19:48:31Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![fuentesdt](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/fuentesdt/32/9361_2.png) [@fuentesdt](https://discourse.slicer.org/u/fuentesdt)
#### Post date: [March 8, 2021, 7:48pm UTC](https://discourse.slicer.org/t/automatic-vessel-endpoints-detection/16435/1 "2021-03-08T19:48:31Z")

</div>

> [@Compute centerlines without choosing start points (subject independent)?](https://discourse.slicer.org/t/compute-centerlines-without-choosing-start-points-subject-independent/3487/2):
>
> VMTK extension’s centerline computation module requires only one root point as input and it returns all centerline endpoints as output

i started off with the VMTK package directly before I was aware of this VMTK slicer extension. Endpoints seemed to need to be manually chosen in the interface released with the original vmtk packages. What algorithm are you using to automagically select endpoints? This dramatically improves the usability of VMTK. perhaps also post the slicer extension to the vmtk website ? [http://www.vmtk.org/](http://www.vmtk.org/)

---

<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 8, 2021, 8:19pm UTC](https://discourse.slicer.org/t/automatic-vessel-endpoints-detection/16435/2 "2021-03-08T20:19:34Z")

</div>

> [@fuentesdt](#):
>
> What algorithm are you using to automagically select endpoints?

It is all VMTK under the hood - see implementation here: [SlicerExtension-VMTK/ExtractCenterline/ExtractCenterline.py at 3787ea4a300da28ec5f0824f0715f2713b631155 · vmtk/SlicerExtension-VMTK · GitHub](https://github.com/vmtk/SlicerExtension-VMTK/blob/3787ea4a300da28ec5f0824f0715f2713b631155/ExtractCenterline/ExtractCenterline.py#L746)

> [@fuentesdt](#):
>
> This dramatically improves the usability of VMTK. perhaps also post the slicer extension to the vmtk website ?

VMTK is a library, so to make it useful for end users you almost always need to add some more application-specific code on top of it. This higher-level code that does not have to be as generic as the library classes, may work with some assumptions, and apply heuristics, so it does not really belong to the library, but it could be added to the examples or documentation.

If you have any suggestions for changing VMTK code or documentation or adding more examples then please submit a pull request to the VMTK repository.
