Hi,
I have a polygonal 3d model file and I want to import it to the scene. I can do it through user interface but I wanted to know how can I achieve this through code.
Thanks,
Hadi
Hi,
I have a polygonal 3d model file and I want to import it to the scene. I can do it through user interface but I wanted to know how can I achieve this through code.
Thanks,
Hadi
Hi:
slicer.util.loadModel("/path/to/file.ext") will work for this purpose.
See: https://www.slicer.org/wiki/Documentation/Nightly/Developers/IO#How_to_load_files_programmatically
Supported data formats can be found here:
https://www.slicer.org/wiki/Documentation/4.10/SlicerApplication/SupportedDataFormat