Using CurvedPlanarReformat without 3D Slicer GUI

I want to straighten some arteries using the curved planar reformat algorithm but I don’t want to use 3D Slicer GUI because my code has its own GUI and other parts. Now my question is which way is preferred for this purpose? Should I use Slicelet? If I wanted to just run a python script to use the Slicer’s CPR functions, I have to compile both Slicer and also the Sandbox extension and after that, will I be able to use those functions?

There are many ways to do this. For example, you can use run Slicer in a docker container and access its features as a web service using its REST API.