# Applying the centerline extraction to a batch of models

**URL:** https://discourse.slicer.org/t/applying-the-centerline-extraction-to-a-batch-of-models/30144
**Category:** Support
**Tags:** python
**Created:** [June 20, 2023, 8:39am UTC](https://discourse.slicer.org/t/applying-the-centerline-extraction-to-a-batch-of-models/30144 "2023-06-20T08:39:33Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![mmonteiro](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/mmonteiro/32/18662_2.png) [@mmonteiro](https://discourse.slicer.org/u/mmonteiro)
#### Post date: [June 20, 2023, 8:39am UTC](https://discourse.slicer.org/t/applying-the-centerline-extraction-to-a-batch-of-models/30144/1 "2023-06-20T08:39:34Z")

</div>

Hi,

I am trying to perform centerline extraction and quantifiaction using the slicer [VMTK extension](https://github.com/vmtk/SlicerExtension-VMTK).  
Using the feature that auto-detects the end-points of the centerline, I want to perform the computation on a batch of surfaces contained in a folder automatically using python.  
Essentially, I want to be able to run the [following script](https://github.com/vmtk/SlicerExtension-VMTK/blob/master/ExtractCenterline/ExtractCenterline.py) over a set of surfaces telling slicer that the end-points should be auto-detected.  
Any pointers on how to go about this?

Thanks in advance,
