A plurality of medical images showing transverse cross-sections of vertebrae that have been imaged in advance are obtained. A spinal-cord region in at least one of the plurality of medical images is detected. A spinal-cord center-line based on a center point in the detected spinal-cord region is generated. A longitudinal cross-sectional image of the vertebrae is generated. Further, a center-line of the vertebrae is obtained based on a positional relationship between the spinal-cord center-line and the vertebrae.