Create and save model as an STL file

Hi Experts,

I’d like convert labels in a nifti volume into a model, then save the model as an STL file–all on the command line. I was able to create the model using the cli-module: ModelMaker. However, I don’t see a module with a flag that I could use for saving the model out as an STL file. I’d prefer to use the cli-modules, as I am not very versed in python.

Many thanks in advance,
Eun Young

All the code that is needed for this is available in the script repository. However, you probably don’t need to actually write any code yourself for straightforward tasks like these but you can ask ChatGPT, Microsoft Copilot or other AI assistant to write it for you. If there are any errors then you can ask the chtabot to fix it. If you get stuck you can copy the code here and we can help you.