This MATLAB class provides a framework for geometric transformations and evaluation of 3D surface models. It was developed in the context of orthopaedic research to align and compare pelvis geometries, but can be applied to other anatomical or technical models as well.
Key Features:
1. Scaling: Scales mesh geometry and corresponding anatomical landmarks.
2. Translation: Translates mesh and landmarks to a specified reference point.
3. Transformation (Kabsch Algorithm):
- Computes optimal rigid body transformation (translation + rotation) between landmarks.
- Returns transformation matrix, translation vector, Euler angles, and landmark errors.
- Applies transformation to all mesh vertices.
4. Distance Measures
- Vertex-to-Nearest-Neighbour Distance: Evaluates vertex correspondence between two meshes, visualizable via colormap.
- Hausdorff Distance: Computes the bidirectional Hausdorff distance between two meshes.
How to Use
- Code structure: The Transformation Class can be integrated into a corresponding main script. The key parts of the code are extracted into individual functions for reuse.
- Import: Import your STL mesh and landmarks into MATLAB
- Apply transformation: Scaling, Translation, Transformation (Kabsch)
- Evaluate accuracy: vertex-to-nearest-neighbour distances, Hausdorff distances
- Results: for visualization or error mapping
Use Cases:
- Alignment of anatomical STL models (e.g., pelvis, femur, etc.)
- Quantitative evaluation of registration accuracy
- Mesh comparison and error visualization
Benefits
- Flexible: Works with any STL-based geometry.
- Quantitative evaluation: Provides Euclidean error, vertex distances, and Hausdorff distance
- Visualization-ready: Distance measures can be mapped onto mesh faces for intuitive color-coded analysis
Keywords
STL, transformation, mesh registration, rigid body alignment, Kabsch algorithm, Hausdorff distance, nearest neighbour, anatomical landmarks, pelvis
Compatibility:
This class is compatible with MATLAB and can easily be integrated into existing workflows for analysing the transformation of anatomical models. It is optimised for MATLAB 2024a but should be compatible with the most recent versions of MATLAB.
Disclaimer:
This MATLAB class is provided on the MATLAB File Exchange for educational and research purposes. Users should ensure that the class meets their specific analysis requirements and may need to adapt it accordingly. The code is provided "as-is," and the author assumes no responsibility for its use or any consequences thereof.
References:
- C. M. Micheler, J. J. Lang, N. J. Wilhelm, I. Lazic, F. Hinterwimmer, C. Fritz, R. V. Eisenhart-Rothe, M. F. Zäh, and R. H. Burgkart, ‘‘Scaling Methods of the Pelvis without Distortion for the Analysis of Bone Defects,’’ Current Directions in Biomedical Engineering, vol. 8, no. 2, pp.797–800, 2022.
- C. M. Micheler, ‘‘Anatomy Boundary Analysis,’’ MATLAB Central File Exchange, 2025. [Online]. Available: https://ww.mathworks.com/matlabcentral/fileexchange/157001-anatomy-boundary-analysis
- W. Kabsch, ‘‘A solution for the best rotation to relate two sets of vectors,’’ Acta Crystallographica Section A, vol. 32, no. 5, pp. 922–923, sep 1976. [Online].
- W. Kabsch, ‘‘A discussion of the solution for the best rotation to relate two sets of vectors,’’ Acta Crystallographica Section A, vol. 34, no. 5, pp.827–828, sep 1978. [Online].
- E. Schreiber, ‘‘Kabsch algorithm,’’ MATLAB Central File Exchange, 2025. [Online]. Available: https://de.mathworks.com/matlabcentral/fileexchange/25746-kabsch-algorithm
引用格式
Carina Micheler (2025). Anatomy Transformation Analysis (https://www.mathworks.com/matlabcentral/fileexchange/181345-anatomy-transformation-analysis), MATLAB Central File Exchange. 检索时间: .
MATLAB 版本兼容性
创建方式
R2024a
兼容任何版本
平台兼容性
Windows macOS Linux标签
致谢
参考作品: Kabsch algorithm, Anatomy Boundary Analysis, Anatomy Defect Analysis
启发作品: Anatomy Defect Analysis
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!