can we add a function which help us to preserve boundary while applying decimation on model .
There are a number of options to control what points are removed during decimation - see details in the filter’s documentation: https://vtk.org/doc/nightly/html/classvtkDecimatePro.html
Some of these options are exposed in Surface Toolbox module, but if you find additional options that would be useful to make adjustable by users then let us know.
fantastic! Surface toolbox is the thing i was looking for , tested in slicer editor its working as expected.
How can i call it using my scriptableModule script?
Edit: I got the code in reference , though you can drop me a snippet , may be it comes better than what i have now.
Thanks a ton
Surface toolbox is a Python scripted module, so just click “Edit” button to see/edit its source code (if you don’t see the button then enable Developer mode in application settings). If Edit does not bring up the source code then search SurfaceToolbox.py file manually.