An open-source modular pipeline for spinal cord segmentation from magnetic resonance imaging
Abstract
The simulation of spinal cord electrical stimulation using finite element models requires anatomically coherent three-dimensional geometries, as the distribution of the electric field depends sensitively on cord morphology and on the thickness of the perimedullary compartment. In this work, a computational pipeline was developed for the construction of spinal compartments from multi-contrast MRI images (T2-weighted and T2*-weighted), applied to a multicenter open-access dataset. Spinal cord and intramedullary compartment segmentation was performed using Spinal Cord Toolbox and integrated with registration to the PAM50 template, in order to obtain masks of cord, gray matter, white matter, and cerebrospinal fluid consistent within the subject’s anatomical space. Vertebral structures were segmented separately, generating complete geometric configurations within the same reference system, ready for use in electrophysiological simulations. In parallel, a comparative analysis was conducted among three automatic segmentation toolboxes (SpinePS, TotalSegmentator and TotalSpineSegmentator) applied to the same T2-weighted images. For each model, geometric parameters derived from the native spinal cord segmentation were computed, including total volume, cranio-caudal length, mean cross-sectional area, and vertebral canal-to-cord ratio. The comparison highlights systematic differences in the definition of anatomical boundaries across frameworks, resulting in variations in morphometric metrics. The results emphasize that the choice of segmentation algorithm represents a relevant methodological variable in the construction of geometries for numerical modeling. The proposed approach provides a reproducible procedure for generating spinal models intended for electrical stimulation simulations and, at the same time, a quantitative assessment of the influence of automatic segmentation tools on the geometric quantities employed in FEM models.
Fields of Study & Subjects
Medical Image Segmentation Techniques
Medical Imaging and Analysis
Advanced Neuroimaging Techniques and Applications
Publication details
- Journal / source
- AMS Degree Thesis (University of Bologna)
- Publication date
- 1 January 2026
- Language
- EN