Automatation of Centerline

Hi all, I am looking to automate the vmtkcenterlines function in order to be able to run it on a server. It seems that my option is to have open profiles and use seed selector. This causes an issue because I need the entire processing to be automated, to open the profiles I would need to utilize something like vmtksurfaceclipper which requires a GUI. Is there any way to either automatically generate centerlines without open profiles or automatically clip ends to create open profiles?

You can have a look how it got fully automated in 3D Slicer’s Extract Centerline module. See source code here.