Slicer source code for stl file extraction

I want to see 3d slicer source code for the STL file extraction of a multi label image in python.Where can i find it? I want to extract an aggregated mess for all labels.

Thank you in advance for your help,
Spyridoula Zagkou

The implementation is available here: Slicer/vtkBinaryLabelmapToClosedSurfaceConversionRule.cxx at master · Slicer/Slicer · GitHub

Note that you can use Slicer without graphical user interface in batch processing, you can run your processing script in Slicer’s Python environment or using Slicer as Jupyter Notebook kernel - so it should not be necessary to copy-paste code from Slicer. But if you have a use case that is not covered by these then let us know and we may give more specific advice.

Yes,I’m sorry for misunderstanding.I’m searching the python scrip for this process without GUI.


You can find lots of examples how to manipulate segmentations using Python scripting in the script repository.