This repository contains the code, datasets, and supplementary materials for the study "Advancements in 3D Fracture Mapping: Integrating Pattern Clustering for Enhanced Tibial PCL Avulsion Fracture Analysis" by Ali Saeedi Rad et al. The study introduces a novel, open-source approach to analyzing tibial posterior cruciate ligament (PCL) avulsion fractures by combining 3D fracture mapping with advanced pattern clustering techniques.
This study leverages:
- 3D Fracture Mapping: Extracting fracture lines and mapping them onto a standard tibial model.
- Pattern Clustering: Utilizing Fréchet distance and Procrustes analysis combined with hierarchical clustering to identify distinct fracture patterns.
The dataset comprises 58 tibial PCL avulsion fracture cases, processed to extract and cluster fracture curves into distinct morphological groups.
Key outcomes include:
- Four primary fracture pattern groups visualized using Kernel Density Estimation (KDE).
- An open-source framework implemented in Python to promote reproducibility.
.
├── Dataset/ # Contains fracture data in .txt and .stl formats
│ ├── Curves/ # Extracted fracture curves
│ ├── Sample/ # Sample STL model
│ └── STL/ # Tibial and fracture segmentations
├── figures/ # Scripts for generating visualizations paper
├── output/ # Clustered outputs and similarity matrices
├── pc/ # Python scripts for clustering and similarity computation
├── output_vtks/ # VTK outputs for 3D visualizations
├── uv.lock # Poetry dependency lockfile
├── pyproject.toml # Poetry project configuration
└── main.py # Main script to execute the workflow
-
Similarity Computation:
- Fréchet Distance
- Procrustes Analysis
- Combined similarity metrics
-
Clustering:
- Hierarchical clustering algorithm for grouping fracture patterns.
-
Visualization:
- Kernel Density Estimation (KDE) for fracture density maps.
- Cluster visualization using ParaView and Python.
-
Open Source:
- Reproducible framework built with Python and SciPy.
python = "^3.10"tqdm = "^4.67.1"numpy = "^2.2.1"scipy = "^1.14.1"similaritymeasures = "^1.2.0"scikit-image = "^0.25.0"numpy-stl = "^3.2.0"matplotlib = "^3.10.0"seaborn = "^0.13.2"vtk = "^9.4.1"
- Clone this repository:
git clone https://github.com/AliSaeeidiRad/Fracture-Insights
cd Fracture-Insights-
Install Python 3.10.6 using one of the following methods:
Option A: Using
asdfEnsure
asdfis installed, then use the.tool-versionsfile in the repository:
asdf install
python -m venv .env
source .env/bin/activate # On Windows: .env\Scripts\activateOption B: Using conda
Ensure conda is installed, then:
conda create -n fracture-insights python=3.10
conda activate fracture-insightsOption C: Using uv
Ensure uv is installed, then:
uv venv- Install package and dependencies:
pip install -e .-
Run the Main Script: Execute the data processing and clustering pipeline:
python main.py --dir-curves Dataset/Curves --t 4 --alpha 1.0 --beta 1.0 --output output --sample-stl Dataset/Sample/Sample.stl
Additional flags:
--only-export: Enable this if you just need VTK exports with results of the previous analysis.--only-plots: Enable this if you just need plots from previous analysis.
-
Explore the Outputs:
- Clustering results:
output/ - VTK files for 3D visualization:
output_vtks/
- Clustering results:
This project is licensed under the GNU General Public License v3.0. See the LICENSE file for details.
For further inquiries, feel free to contact or open an issue.