artorg-unibe-ch/spline_mesher: Publication release with license
Creators
Description
Spline-based structured conformal hexahedral meshing
A Python package for generating GMSH meshes from SCANCO HR-pQCT images.
👷🏼 Simone Poncioni
🦴 Musculoskeletal Biomechanics Group
🎓 ARTORG Center for Biomedical Engineering Research, University of Bern
📝 Introduction
A Python package for generating GMSH meshes from SCANCO HR-pQCT images. Import a voxel-based model and convert it to a geometrical simplified representation through the use of splines for each slice in the transverse plane.
💡 Method
- Structured Mesh: Provides greater simplicity, efficiency, and lower memory usage due to implicit connectivity with neighboring elements. Ensures topologically identical models for easy comparison between patients or across longitudinal
- Contour Extraction & Smoothing: Utilizes scikit-image for periosteal and endosteal contour extraction, followed by Douglas-Ramer-Peucker simplification and 3rd-order periodic BSplines for smooth geometry
- Sanity Check: Ensures a minimum cortical thickness of 0.5 mm, allowing space for at least three elements and continuity in thin
- Mesh Generation: The simplified geometry is imported into GMSH via the OpenCASCADE kernel. Transfinite techniques and the Winslow untangler are used for optimal mesh
- Quality Assessment: Mesh quality is evaluated using the Dice similarity coefficient (DSC) with a minimum value of 95%, and the (signed-) inverse conditioning number ((S-) ICN) to ensure matrix conditioning and simulation stability.
For more examples, please refer to the Documentation: https://artorg-unibe-ch.github.io/spline_mesher/
🔧 Installation
To get a local copy up and running follow these simple example steps.
1. Clone the repo
git clone https://github.com/artorg-unibe-ch/spline_mesher.git
2. Install dependencies
conda create -n meshenv python=3.9 --file requirements.txt
conda activate meshenv
python setup.py build_ext --inplace
python setup.py install
3. For developers: install the package in editable mode and install requirements for testing
pip install -e .
pip install -r requirements-dev.txt
Files
artorg-unibe-ch/spline_mesher-v1.0.1.zip
Files
(1.3 MB)
Name | Size | Download all |
---|---|---|
md5:adafd66275e26e70b8f3cd4ca0e95e2d
|
1.3 MB | Preview Download |
Additional details
Related works
- Is published in
- Publication: 10.1016/j.bone.2025.117394 (DOI)
- Is supplement to
- Software: https://github.com/artorg-unibe-ch/spline_mesher/tree/v1.0.1 (URL)
Software
- Repository URL
- https://github.com/artorg-unibe-ch/spline_mesher
- Programming language
- Python, Cython
- Development Status
- Active