Constrained Estimation of Intracranial Aneurysm Surface Deformation using 4D-CTA
Intracranial aneurysms are life-threatening vascular abnormalities, and their irregular surface pulsation patterns may be strongly associated with rupture risk. Accurately estimating aneurysm surface deformation from medical imaging data is crucial for clinical diagnosis and risk assessment.
This project implements the algorithm described in Xie et al., 2024 published in Computer Methods and Programs in Biomedicine. The method transforms surface deformation estimation into a constrained optimization problem, minimizing the error between model-estimated displacement and sparse data points extracted from 4D-CT angiography (4D-CTA) imaging.
The method solves a constrained optimization problem to estimate dense surface deformation from sparse 4D-CTA measurements:
min ||K^(-1) * f||² + λ||H*f - y||²
Where:
K: Surface stiffness matrix (cotangent Laplacian-based)f: Unknown force field driving deformationH: Sparse sampling operatory: Observed displacement at sparse pointsλ: Regularization weight balancing smoothness and data fidelity
-
CPD-based Point Tracking (CPD.py)
- Uses Coherent Point Drift (CPD) algorithm for deformable registration
- Extracts sparse displacement measurements from multi-phase 4D-CTA meshes
- Handles topology preservation across cardiac phases
-
Constrained Estimation Solver (Constrained_Estimate.py)
- Builds surface stiffness matrix using cotangent weights
- Solves sparse linear system with regularization
- Reconstructs dense displacement field from sparse samples
-
Volumetric Analysis (Volume_Change.py)
- Computes aneurysm volume changes across cardiac cycle
- Validates deformation estimation accuracy
-
Mesh Processing Pipeline (toMesh.py, convert.py)
- DICOM to NIfTI conversion
- 3D mesh extraction from segmented 4D-CTA volumes
- Mesh cleaning and preprocessing
4dCTA-ConstrainedEstimate/
├── README.md
├── .gitignore
│
├── CPD.py # Coherent Point Drift registration
├── Constrained_Estimate.py # Core constrained optimization solver
├── Volume_Change.py # Volumetric analysis tools
│
├── toMesh.py # DICOM → mesh extraction
├── convert.py # Format conversion utilities
├── fix_dicom.py # DICOM preprocessing
├── compute_volume.py # Volume computation from meshes
│
├── find_params.py # Hyperparameter tuning
├── evaluate.py # Evaluation metrics
│
└── visualize_disp.mlx # MATLAB visualization script
- Python 3.7+
# Clone the repository
git clone https://github.com/clairexuu/4dCTA-ConstrainedEstimate.git
cd 4dCTA-ConstrainedEstimate
# Install dependencies
pip install numpy scipy trimesh pycpd nibabel pydicomYour input should be multi-phase 4D-CTA DICOM or segmented mesh files:
patient_data/
├── phase_0/ # Systole or reference phase
├── phase_5/
├── phase_10/
...
└── phase_95/python toMesh.py --input patient_data/ --output meshes/Extract sparse displacement measurements:
python CPD.pyEdit the main() function in CPD.py to specify:
ref_path: Reference mesh path (usually phase 0)mesh_dir: Directory containing all phase meshesoutput_dir: Output directory for displacement databeta,lamb: CPD smoothness parameters (default: 1.0, 3.0)
Reconstruct dense displacement field:
python Constrained_Estimate.pyEdit the main() function to configure:
mesh_path: Reference mesh for stiffness matrix constructiondisp_path: Sparse displacement from CPDn_samples: Number of sparse samples to useE: Young's modulus for stiffness (default: 1.4e6 Pa)
# Compute volume changes
python Volume_Change.py
# Evaluate accuracy
python evaluate.pyFor visualization, open visualize_disp.mlx in MATLAB.
@article{xie2024constrained,
title={Constrained estimation of intracranial aneurysm surface deformation using 4D-CTA},
author={Xie, Hujin and others},
journal={Computer Methods and Programs in Biomedicine},
volume={245},
pages={108031},
year={2024},
publisher={Elsevier},
doi={10.1016/j.cmpb.2024.108031}
}Original Paper: PubMed Link