Applying the centerline extraction to a batch of models

Hi,

I am trying to perform centerline extraction and quantifiaction using the slicer VMTK extension.
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 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,