- Using “stlread” - https://in.mathworks.com/help/matlab/ref/stlread.html
- The “importGeometry” function will create a DiscreteGeometry object of the STL file. Then, the ‘rotate’ function can be used to help align the 3D geometry. Here are some documentation links which may be of help: https://www.mathworks.com/help/pde/ug/pde.pdemodel.importgeometry.html https://www.mathworks.com/help/pde/ug/pde.discretegeometry.rotate.html?s_tid=doc_ta
- “import_stl_file” is also a another option for a faster version of “stlread”. Please refer to this MATLAB File Exchange link: https://www.mathworks.com/matlabcentral/fileexchange/30923-fast-stl-import-function
How to import STLs into MATLAB WHILE maintaining their coordinate system
16 views (last 30 days)
Show older comments
Hello, I have 3 STL files created through exporting different segmented areas as a surface mesh using ITK snap. I would like to import these into matlab so that they are aligned in the same way.
That way, when I convert into a binary map, I get a binary map with all 3 segmented areas aligned to each other
Thanks
0 Comments
Answers (1)
Raghava S N
on 12 Mar 2024
Hi Andrew,
STL files can be imported and aligned in the following methods –
Please refer to this MATLAB Answers post discussing alignment of STL Files - https://www.mathworks.com/matlabcentral/answers/1953324-how-to-aligning-stl-files-and-find-the-distance-between-them
Additional documentation that may be of use for alignment–
0 Comments
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!