# Picking centerline endpoints via command line

**URL:** <https://discourse.slicer.org/t/picking-centerline-endpoints-via-command-line/26358>\
**Category:** VMTK\
**Created:** [November 21, 2022, 8:30pm UTC](https://discourse.slicer.org/t/picking-centerline-endpoints-via-command-line/26358 "2022-11-21T20:30:12Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![nlbrown62](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/nlbrown62/32/17415_2.png) [@nlbrown62](https://discourse.slicer.org/u/nlbrown62)\
**Post date:** [November 21, 2022, 8:30pm UTC](https://discourse.slicer.org/t/picking-centerline-endpoints-via-command-line/26358/1 "2022-11-21T20:30:12Z")

</div>

Hello,

I have been using centerline and network extraction in VMTK through the Python interface. For centerlines, I have been using the pickpoint GUI to set the start and endpoints for vessels, and I want to switch to specifying these points on the command line. I have tried passing in coordinates (in voxels and millimeters) to points in the vessel via the “pointlist” option, but the centerline fails to generate. Is there another option I should be using, or is there a specific format that the seeds need to be in?

If the seeds are required to be on the vessel surface and not just anywhere in/on the vessel, is there a way to get the closest point to the specified seed on the surface?

Thank you in advance!  
Nicole

---

<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:** [November 21, 2022, 9:10pm UTC](https://discourse.slicer.org/t/picking-centerline-endpoints-via-command-line/26358/2 "2022-11-21T21:10:32Z")

</div>

> [@nlbrown62](#):
>
> command line

What do you mean by ‘command line’ here ? Is it system console command line interface ? Python console inside Slicer ?  
And how do you determine the endpoint coordinates ?

---

<div class="post-metadata">

**Author:** ![nlbrown62](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/nlbrown62/32/17415_2.png) [@nlbrown62](https://discourse.slicer.org/u/nlbrown62)\
**Post date:** [November 22, 2022, 3:28pm UTC](https://discourse.slicer.org/t/picking-centerline-endpoints-via-command-line/26358/3 "2022-11-22T15:28:30Z")

</div>

The command line would be a system console (Git Bash on Windows in my case); I am running the centerline extraction from a Python script using functions from vmtkscripts. The endpoint coordinates were landmarks labeled in advance using Slicer fiducials.

---

<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:** [November 22, 2022, 4:44pm UTC](https://discourse.slicer.org/t/picking-centerline-endpoints-via-command-line/26358/4 "2022-11-22T16:44:51Z")

</div>

> [@nlbrown62](#):
>
> a system console

Ok, I won’t be of help here,

> [@nlbrown62](#):
>
> on Windows

and even less here, sorry.
