Purpose: A method for automatic computation of global spinal alignment (GSA) metrics is presented to mitigate the high variability of manual definitions in radiographic images. The proposed algorithm segments vertebral endplates in CT as a basis for automatic computation of metrics of global spinal morphology. The method is developed as a potential tool for intraoperative guidance in deformity correction surgery, and/or automatic definition of GSA in large datasets for analysis of surgical outcome. Methods: The proposed approach segments vertebral endplates in spine CT images using vertebral labels as input. The segmentation algorithm extracts vertebral boundaries using a continuous max-flow algorithm and segments the vertebral endplate surface by region-growing. The point cloud of the segmented endplate is forward-projected as a digitally reconstructed radiograph (DRR), and a linear fit is computed to extract the endplate angle in the radiographic plane. Two GSA metrics (lumbar lordosis and thoracic kyphosis) were calculated using these automatically measured endplate angles. Experiments were performed in seven patient CT images acquired from Spineweb and accuracy was quantified by comparing automatically-computed endplate angles and GSA metrics to manual definitions. Results: Endplate angles were automatically computed with median accuracy = 2.7°, upper quartile (UQ) = 4.8°, and lower quartile (LQ) = 1.0° with respect to manual ground-truth definitions. This was within the measured intra-observer variability = 3.1° (RMS) of manual definitions. GSA metrics had median accuracy = 1.1° (UQ = 3.1°) for lumbar lordosis and median accuracy = 0.4° (UQ = 3.0°) for thoracic kyphosis. The performance of GSA measurements was also within the variability of the manual approach. Conclusions: The method offers a potential alternative to time-consuming, manual definition of endplate angles for GSA computation. Such automatic methods could provide a means of intraoperative decision support in correction of spinal deformity and facilitate data-intensive analysis in identifying metrics correlating with surgical outcomes.