.. _spinelocalization: Spine Localization and Classification ===================================== .. image:: SpineLocalizationAndClassification.png Summary ------- Detects, segments and classifies vertebrae in a calibrated CT or MRI volume. Use this to obtain a :doc:`SpineData <../SpineData>` with vertebra positions, anatomical types (e.g., cervical/thoracic/lumbar) and levels, label maps and / or surface meshes of vertebrae, illium, sacrum and vertebral discs (MRI only). Input ----- - Single-volume ``SharedImageSet`` (CT/MRI), multi-volume inputs are not supported. Ensure the modality is correctly set for the input; otherwise modality can be set manually. - Optionally a label image or existing :doc:`SpineData <../SpineData>` can be provided. Output ------ - :doc:`SpineData <../SpineData>` with vertebra entries containing surface mesh, body center and pedicle keypoints, and vertebra label maps. Controller capabilities ----------------------- - Model selection: choose model set/version if needed. This can be used to select the preferred Machine Learning engine and the set (version) of machine learning models. - Export: save state (including current :doc:`SpineData <../SpineData>`), export label maps and segmentation images after segmentation. Workflow -------- 1) Load a CT or MRI image and (optionally) define a region of interest/bounds. 2) Localize Vertebrae: predict bounds, set bounds, detect vertebra landmarks, and classify types to create initial :doc:`SpineData <../SpineData>` entries. 3) (Optional) Edit vertebrae: - Add Vertebra: place body/left/right keypoints to add a vertebra. - Remove Vertebra: delete selected vertebra; classification updates accordingly. - Pin/Correct Types: pin type for selected vertebra; re-run classification. 4) (Optional) Segment structures: - Segment Vertebrae: segment all vertebrae; review meshes. - Segment Sacrum and Ilium: segment pelvis structures where supported. - Segment Discs (MRI only): run disc segmentation for MRI inputs. - Export Label Map: export a multi-label volume assembled from current segmentations. 5) (Optional) Context and masking: - Run Context Model: compute anatomical context predictions and add them to the data model when available. This aids the classification model in the assignment of anatomical types. - Apply Mask: create/apply a spine mask to the original source image. 6) (Optional) Save/Load: persist or restore the algorithm state (includes :doc:`SpineData <../SpineData>`). See :ref:`spinedata-save-load`.