AnyBody plugin for high-fidelity reconstructing of 3D spinal alignment from biplanar radiographs.
Caimi et Rieger et al. (2026)
- About
- Features
- Methods Overview
- Installation
- Usage
- Repository structure
- Input Data
- Outputs
- How to cite
- Contributions
- Contact
This repository provides an AnyBody-based implementation of a spinal alignment reconstruction method. Using vertebral landmark annotations extracted from single- or biplanar radiographs, the model reconstructs the 3D spinal alignment, including vertebral centroid positions and segmental orientations.
The implementation provides an improved posture-reconstruction approach for researchers evaluating spine biomechanics through Musculoskeletal Modeling (MSK) based on single- or biplanar radiographs. It serves as a supplementary module to the AnyBody Modeling System and enables users to:
- Calibrate 3D spinal alignment models in AnyBody from sagittal or coronal radiographic projections
- Integrate subject-specific spinal alignments into downstream musculoskeletal simulations
- AnyBody Modeling System implementation (version 8.0+)
- Biplanar (coronal + sagittal) landmark-based posture reconstruction
- Automatic computation of global and segmental alignment parameters
- Example AnyBody input file
High-level pipeline:
- Input: Extracted landmarks of biplanar radiographs in sagittal and (optionally) coronal planes
- Anatomical Landmark definition: 2D coordinates of vertebral corner nodes (T1-L5), sacral endplate and bi-femoral head axis, as well as spinopelvic parameters Pelvic Incidence (PI), Pelvic Tilt (PT), Sacral Slope (SS) and Pelvic Obliquity (PO)
- Inputs: Vertebral inclinations and vertebral centroids coordinates, derrived from anatomical landmarks in the sagittal and coronal plane
- 3D reconstruction: Posture reconstruction drivers that integrate the degrees of freedom in the model setup
- Alignment metrics: Computation of sagittal and coronal angles, offsets, and global alignment parameters
- AnyBody Modeling System version 8.0 or higher
git clone https://github.com/Anybody/biplanar-spinal-alignment-reconstruction-method.git
cd biplanar-spinal-alignment-
Import Anybody input files:
- Place your input files in the InputAlignment folder. An example input file can be found in the repository documents (docs/input/Example_Patient.any).
Input folder directory:
Anybody_model/Application/Examples/ThoracicModel/Setup/InputAlignment -
Model Setup:
- Configurate your alignment representation mode in the UserDefinitions.any file. The user can specify whether to model spinal alignment using the Regional Measures method (AlignmentModeling off) or the Vertebral Inclination and Centroids Position method (AlignmentModeling on).
- If cervical annotations, i.e. vertebral inclinations and centroid positions, are available, the alignment representation method can be extended to these segments by enabling the IncludeNeckCalibration parameter.
- To enable a coronal alignment representation, the CoronalAlignment parameter has to be switched on in the respective Input file (see first line in the coronal alignment section).
User definition directory:
Anybody_model/Application/Examples/ThoracicModel/Setup/Model/UserDefinitions.any -
Run Simulation:
- Run biplanar-spinal-alignment-reconstruction-method.main.any to execute the Anybody Simulation script
Main file directory:
Anybody_model/Application/Examples/ThoracicModel/biplanar-spinal-alignment-reconstruction-method.main.any
biplanar-spinal-alignment/
├── Anybody_model/
│ └── Application/
│ └── Examples/
│ └── ThoracicModel/
│ ├── biplanar-spinal-alignment-reconstruction-method.main.any
│ └── Setup/
│ ├── InputAlignment/
│ │ └── Example_Patient.any
│ └── Model/
│ └── UserDefinitions.any
├── docs/
│ ├── images/
│ └── input/
│ └── Example_Patient.any
└── README.md
-
Patient-specific data:
- Patient-specific input parameters are extracted from annotated (bi-)planar X-ray landmarks. These include sagittal and coronal geometric descriptors, as well as patient-specific anthropometric data for model scaling, i.e. body height (BH - in m) and body mass (BM - in kg).
- The right-handed orthogonal reference frame is defined in the sagittal plane and originates at the posterior sacral reference point. The x-axis points in the anterior–posterior (AP) direction, the y-axis in the superior–inferior (Sup–Inf) direction, and the z-axis in the medial–lateral (ML) direction.
-
Sagittal plane landmarks (x–y plane):
- Sagittal landmarks consist of vertebral sagittal inclinations from T1 (Angle_T1) to L5 (Angle_L5), vertebral centroid coordinates from T1 (T1_x, T1_y) to L5 (L5_x, L5_y), anterior and posterior sacral reference points (S1_ant_x, S1_ant_y, S1_post_x, S1_post_y), the bi-femoral head axis (FH_x, FH_y), and the spinopelvic parameters Pelvic Incidence (PI) and Sacral Slope (SS).
-
Coronal plane landmarks (y–z plane):
- Coronal landmarks include vertebral coronal inclinations from T1 (CorAngle_T1) to L5 (CorAngle_L5), vertebral centroid z-coordinates from T1 (T1_z) to L5 (L5_z), the bi-femoral head axis (FH_z, FH_y), and the spinopelvic parameter Pelvic Obliquity (PelvicObl).
An example ANYBODY input file is provided here: docs/input/Example_Patient.any
Model outputs include (1) intervertebral joint reaction forces, (2) muscle forces and activities, (3) segmental rotations, (4) sagittal alignment parameters, (5) calculated centers of mass, and (6) radiographic conformity, i.e. deviations between the model alignment and input parameters.
-
Joint Reaction Forces:
- Compression force: L4L5CompressionForce (i.e. L4L5)
- AP Shear force: L4L5AnteroPosteriorShearForce
- ML Shear force: L4L5MedioLateralShearForce
-
Muscle Forces & Activities:
- Total muscle activity: AllMuscleMaxAct
- Total muscle force: AllMuscleTotalForce
- Individual muscle activities: ErectorSpinaeMaxAct (i.e. ErectorSpinae)
- Individual muscle force: MultifidusTotalForce (i.e. Multifidus)
-
Segmental rotations:
- Intervertebral joint angle:
- SegmentalRotationFlexion (i.e. sagittal plane)
- SegmentalRotationLateralBending (i.e. coronal plane)
- SegmentalRotationAxialRotation (i.e. transverse plane)
- Intervertebral joint angle:
-
Conventional alignment metrics:
- Postural measures: LL (i.e. Lumbar Lordosis)
-
Center of Mass:
- Center of mass measurements:
- CoM_x (i.e. anterio-posterior)
- CoM_y (i.e. superior-inferior)
- CoM_z (i.e. medio-lateral)
- Center of mass measurements:
-
Radiographic conformity metrics:
- Positional deviation vector: L4L5_error_pos (i.e. L4L5)
- Sagittal inclination deviation: L4L5_error_rotZ
- Coronal inclination deviation: L4L5_error_rotX
- Transversal inclination deviation: L4L5_error_rotY (essentially zero, as transversal rotations are not yet included)
Output files will be saved in .csv format to the following directory:
Anybody_model/Application/Examples/ThoracicModel/Setup/OutputData
A. Caimi, F. Rieger, K. Cybulski, F. Galbusera, S. Richner-Wunderlin, F. Kleinstück, D. Haschtmann, D. Jeszensky, T.F. Fekete, M. Loibl, F. Pellisé, I. Obeid, J. Pizones, A. Alanay, C. Yilgor, C. Netzer, S.J. Ferguson, D. Ignasiak, Sensitivity of musculoskeletal model-predicted loads to spinal alignment individualization in adult spinal deformity, Journal of Biomechanics, 2026, 113459, ISSN 0021-9290, https://doi.org/10.1016/j.jbiomech.2026.113459.
We thank Morten Enemark Lund for maintaining the AnyBody GitHub repository and for his help in setting up this page. Special thanks to all co-authors for their contributions, as well as the European Spine Study Group (ESSG) for constantly collecting clinically relevant data.
For questions about the method or collaborations, please contact:
Alice Caimi
ETH Zurich
Institute for Biomechanics
GLC H23.
Gloriastrasse 37 / 39.
8092 Zurich, Switzerland
alice.caimi@hest.ethz.ch
Florian Rieger
ETH Zurich
Institute for Biomechanics
GLC H23.
Gloriastrasse 37 / 39.
8092 Zurich, Switzerland
florian.rieger@hest.ethz.ch

