Cross-sectional area (CSA)

This section demonstrates how to compute spinal cord cross-sectional area.

CSA (Averaged across vertebral levels)

First, we will start by computing the cord cross-sectional area (CSA) averaged across vertebral levels. As an example, we’ll choose the C3 and C4 vertebral levels, but you can specify any vertebral levels present in the vertebral level file.

sct_process_segmentation -i t2_seg.nii.gz -vert 3:4 -vertfile ./label/template/PAM50_levels.nii.gz -o csa_c3c4.csv
Input arguments
  • -i : The input segmentation file.

  • -vert : The vertebral levels to compute metrics across. Vertebral levels can be specified individually (3,4) or as a range (3:4).

  • -vertfile : The volume containing vertebral levels. Here, we use a PAM50 template object that had been previously warped to the same coordinate space as the input segmentation.

  • -o : The output CSV file.

Output files/folders
  • csa_c3c4.csv : A file containing the CSA values and other shape metrics. This file is partially replicated in the table below.

CSA values computed for C3 and C4 vertebral levels (Averaged)

Filename

Slice (I->S)

VertLevel

MEAN(area)

STD(area)

single_subject/data/t2/t2_seg.nii.gz

143:186

3:4

77.8531806229711

2.11559910195358

CSA (Per level)

Next, we will compute CSA for each individual vertebral level (rather than averaging).

sct_process_segmentation -i t2_seg.nii.gz -vert 3:4 -vertfile ./label/template/PAM50_levels.nii.gz -perlevel 1 -o csa_perlevel.csv
Input arguments
  • -i : The input segmentation file.

  • -vert : The vertebral levels to compute metrics across. Vertebral levels can be specified individually (3,4) or as a range (3:4).

  • -vertfile : The label file that specifies vertebral levels. Here, we use the PAM50 template object that had been previosuly warped to the same coordinate space as the T2 segmentation.

  • -perlevel : Set this option to 1 to turn on per-level computation.

  • -o : The output CSV file.

Output files/folders
  • csa_perlevel.csv : A file containing the CSA values and other shape metrics. This file is partially replicated in the table below.

CSA values computed for C3 and C4 vertebral levels

Filename

Slice (I->S)

VertLevel

MEAN(area)

STD(area)

single_subject/data/t2/t2_seg.nii.gz

143:164

4

78.0055017936352

2.53796742015513

single_subject/data/t2/t2_seg.nii.gz

165:186

3

77.7008594523071

1.56966143373016

CSA (Per axial slice)

Finally, to compute CSA for individual slices, set the -perslice argument to 1, and use -z argument to specify axial slice numbers or a range of slices. (For slice numbering, 0 represents the slice furthest towards the inferior direction.)

sct_process_segmentation -i t2_seg.nii.gz -z 30:35 -perslice 1 -o csa_perslice.csv
Input arguments
  • -i : The input segmentation file.

  • -perslice : Set this option to 1 to turn on per-slice computation.

  • -z : The Z-axis slices to compute metrics for. Slices can be specified individually (30,31,32,33,34,35) or as a range (30:35).

  • -o : The output CSV file.

Output files/folders
  • csa_perslice.csv : A file containing the CSA values and other shape metrics. This file is partially replicated in the table below.

CSA values across slices 30 to 35

Filename

Slice (I->S)

VertLevel

MEAN(area)

STD(area)

single_subject/data/t2/t2_seg.nii.gz

30

43.0447350807718

0

single_subject/data/t2/t2_seg.nii.gz

31

43.0291057456016

0

single_subject/data/t2/t2_seg.nii.gz

32

41.785705898265

0

single_subject/data/t2/t2_seg.nii.gz

33

42.3872181377957

0

single_subject/data/t2/t2_seg.nii.gz

34

43.036500716301

0

single_subject/data/t2/t2_seg.nii.gz

35

43.7560940584275

0

CSA (PMJ-based)

Although using vertebral levels as a reference to compute CSA gives an approximation of the spinal levels, a drawback of that method is that it doesn’t consider neck flexion and extension (Cadotte et al., 2015).

To overcome this limitation, the CSA can instead be computed as a function of the distance to a neuroanatomical reference point. Here, we use the pontomedullary junction (PMJ) as a reference for computing CSA, since the distance from the PMJ along the spinal cord will vary depending on the position of the neck.

Computing the PMJ-based CSA involves a 4-step process (Bedard & Cohen-Adad, 2022):

  1. The PMJ is detected using sct_detect_pmj.

  2. The spinal cord centerline is extracted using a segmentation of the spinal cord, then the centerline is extended to the position of the PMJ label using linear interpolation and smoothing.

  3. A mask is determined using two parameters: (1) distance along the centerline from the PMJ label, and (2) extent of the mask.

  4. The CSA is computed and averaged within this mask.

For this tutorial, we will compute CSA at a distance of 64 mm from the PMJ using a mask with a 30 mm extent. But, other values can be specified if you would like to alter the desired region to compute CSA.

https://raw.githubusercontent.com/spinalcordtoolbox/doc-figures/master/shape-metric-computation/csa-pmj-method.png

PMJ-based CSA at 64 mm using a 30 mm extent mask.

PMJ detection

First, we proceed to the detection of the PMJ.

sct_detect_pmj -i t2.nii.gz -c t2 -qc ~/qc_singleSubj
Input arguments
  • -i : Input image.

  • -c: Contrast of the input image.

  • -qc: Directory for Quality Control reporting.

Output files/folders
  • t2_pmj.nii.gz: An image containing the single-voxel PMJ label.

https://raw.githubusercontent.com/spinalcordtoolbox/doc-figures/master/shape-metric-computation/io-pmj-detection.PNG

PMJ detection for T2.

CSA computation

Second, we compute CSA from a distance from the PMJ.

sct_process_segmentation -i t2_seg.nii.gz -pmj t2_pmj.nii.gz -pmj-distance 64 -pmj-extent 30 \
                         -o csa_pmj.csv -qc ~/qc_singleSubj -qc-image t2.nii.gz
Input arguments
  • -i : The input segmentation file.

  • -pmj : The PMJ label file.

  • -pmj-distance: Distance (mm) from the PMJ to center the mask for CSA computation.

  • -pmj-extent: Extent (mm) for the mask to compute and average CSA.

  • -o : The output CSV file.

  • -qc: Directory for Quality Control reporting.

  • -qc-image: Image to display as the background in the QC report. Here, we supply the source anatomical image (t2.nii.gz) that was used to generate the spinal cord segmentation (t2_seg.nii.gz).

Output files/folders
  • csa_pmj.csv : A file containing the CSA values and other shape metrics. This file is partially replicated in the table below.

CSA values computed at 64 mm from the PMJ.

Filename

Slice (I->S)

DistancePMJ

MEAN(area)

STD(area)

single_subject/data/t2/t2_seg.nii.gz

164:200

64.0

73.59883713730028

1.9646306524757562