Automatize model remeshing using python

Dear all,

I would like to remesh a couple of model files in batch processing fashion.

The plan is to use “Surface Toolbox” Module, herein the “Uniform remesh” algorithm. And the
number of points set to 100k.

By now I could only make it till here:

modelFile = “…model.ply”
inputModel = slicer.util.loadModel(modelFile)
modelDisplayNode = inputModel.GetDisplayNode()

the remaining main steps like:

  • switch to the modul
  • set the parameters of the new mesh
  • perform remeshing
  • export remeshed model as *.stl

are the “tricky” parts… :frowning:

Could someone please advise and give me a hint how to proceed.

THANKS!

Best,
Markus