# VMTK - Branch points coordinates

**URL:** <https://discourse.slicer.org/t/vmtk-branch-points-coordinates/13173>\
**Category:** Support\
**Tags:** vmtk, centerlines\
**Created:** [August 26, 2020, 12:56pm UTC](https://discourse.slicer.org/t/vmtk-branch-points-coordinates/13173 "2020-08-26T12:56:24Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![janneke\_slicer](https://avatars.discourse-cdn.com/v4/letter/j/ebca7d/32.png) [@janneke\_slicer](https://discourse.slicer.org/u/janneke_slicer)\
**Post date:** [August 26, 2020, 12:56pm UTC](https://discourse.slicer.org/t/vmtk-branch-points-coordinates/13173/1 "2020-08-26T12:56:24Z")

</div>

Hello,

I am using the VMTK extension in Slicer 4.11.  
It works really well; however, I would like to extract the branch point coordinates of the centerline model in a fast way.  
I know this is possible by creating the centerline or network curves and reading the coordinates of the begin- or endpoint of these curves in the created table. However, my 3D model is pretty complex and it takes a lot of time to find the coordinates of certain branch points (for example, it is difficult to determine if the branch point I’m interested in is the begin- or end point of the curve).

Is it possible to get the branch points coordinates in a faster way? Ideally, I would click on a branch point and receive the coordinates of that point immediately.

Regards,  
Janneke

---

<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:** [August 26, 2020, 9:37pm UTC](https://discourse.slicer.org/t/vmtk-branch-points-coordinates/13173/2 "2020-08-26T21:37:38Z")

</div>

Yes, it is very easy to extract point coordinates of a selected branch. Add a markups curve, place two points near the begin/end points of the path you want to extract and then in Markups module/Curve settings, choose Curve type → Shortest distance on surface and select the centerline as model node as shown in this video:

[![](https://img.youtube.com/vi/WJQexDTiRRc/maxresdefault.jpg "Transform markups between original and straightened vessel") ](https://www.youtube.com/watch?v=WJQexDTiRRc)

You can get all curve point positions and the coordinates of first and last point in the Python console:

```auto
>>> a=slicer.util.arrayFromMarkupsCurvePoints(slicer.util.getNode('C'))
>>> a[0]
array([57.43868 , -31.754717, 0.], dtype=float32)
>>> a[-1]
array([-48.099056, -14.009434, 0.], dtype=float32)

```

---

<div class="post-metadata">

**Author:** ![janneke\_slicer](https://avatars.discourse-cdn.com/v4/letter/j/ebca7d/32.png) [@janneke\_slicer](https://discourse.slicer.org/u/janneke_slicer)\
**Post date:** [August 28, 2020, 9:26am UTC](https://discourse.slicer.org/t/vmtk-branch-points-coordinates/13173/3 "2020-08-28T09:26:19Z")

</div>

Thank you! This is indeed a faster method. 😀
