# Automatically find pipeline model endpoints

**URL:** <https://discourse.slicer.org/t/automatically-find-pipeline-model-endpoints/30277>\
**Category:** Support\
**Tags:** python\
**Created:** [June 28, 2023, 11:08am UTC](https://discourse.slicer.org/t/automatically-find-pipeline-model-endpoints/30277 "2023-06-28T11:08:43Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![yangxw](https://avatars.discourse-cdn.com/v4/letter/y/d07c76/32.png) [@yangxw](https://discourse.slicer.org/u/yangxw)\
**Post date:** [June 28, 2023, 11:08am UTC](https://discourse.slicer.org/t/automatically-find-pipeline-model-endpoints/30277/1 "2023-06-28T11:08:43Z")

</div>

![微信图片_20230628185315](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/1/7/1745f02f4f878c71d92762b763cabfd48f2c1a7f.png)  
About the automatic extraction of endpoints as shown in the figure, how to implement it in code, I want to use this endpoint to extract the centerline of VMTK。  
I checked the source code of the VMTK-slicer extension package and found that it calls a lot of slicer methods. My intention was to load an STL pipeline with code that automatically gets the endpoints and later extracts the model centerline
