@@ -63,12 +63,16 @@ sct_deepseg -h
6363# Vertebral labeling
6464# ======================================================================================================================
6565
66+ # Vertebral disc labeling
67+ sct_deepseg totalspineseg -step1-only -i t2.nii.gz -qc ~ /qc_singleSubj
68+
69+ # TODO: Replace the command below with `-discfile`-based shape analysis
6670# Vertebral labeling
6771sct_label_vertebrae -i t2.nii.gz -s t2_seg.nii.gz -c t2 -qc ~ /qc_singleSubj
6872# Check QC report: Go to your browser and do "refresh".
6973# Note: Here, two files are output: t2_seg_labeled, which represents the labeled segmentation (i.e., the value
7074# corresponds to the vertebral level), and t2_seg_labeled_discs, which only has a single point for each
71- # inter -vertebral disc level. The convention is: Value 3 —> C2-C3 disc, Value 4 —> C3-C4 disc, etc.
75+ # intersct_deepseg spinalcord -i t2.nii.gz -vertebral disc level. The convention is: Value 3 —> C2-C3 disc, Value 4 —> C3-C4 disc, etc.
7276
7377# OPTIONAL: If automatic labeling did not work, you can initialize with manual identification of C2-C3 disc:
7478# sct_label_utils -i t2.nii.gz -create-viewer 3 -o label_c2c3.nii.gz -msg "Click at the posterior tip of C2/C3 inter-vertebral disc"
@@ -132,9 +136,9 @@ sct_label_utils -i t2_seg_labeled.nii.gz -vert-body 3,9 -o t2_labels_vert.nii.gz
132136sct_qc -i t2.nii.gz -s t2_labels_vert.nii.gz -p sct_label_utils -qc ~ /qc_singleSubj
133137
134138# OPTIONAL: You might want to completely bypass sct_label_vertebrae and do the labeling manually. In that case, we
135- # provide a viewer to do so conveniently. In the example command below, we will create labels at the inter-vertebral
136- # discs C2-C3 (value=3), C3-C4 (value=4) and C4-C5 (value=5).
137- # sct_label_utils -i t2.nii.gz -create-viewer 3,4,5 -o labels_disc.nii.gz -msg "Place labels at the posterior tip of each inter-vertebral disc. E.g. Label 3: C2/C3, Label 4: C3/C4, etc."
139+ # provide a viewer to do so conveniently. In the example command below, we will create labels at the inter-vertebral
140+ # discs C2-C3 (value=3), C3-C4 (value=4) and C4-C5 (value=5).
141+ # sct_label_utils -i t2.nii.gz -create-viewer 3,4,5 -o labels_disc.nii.gz -msg "Place labels at the posterior tip of each inter-vertebral disc. E.g. Label 3: C2/C3, Label 4: C3/C4, etc."
138142
139143# Register t2->template.
140144sct_register_to_template -i t2.nii.gz -s t2_seg.nii.gz -l t2_labels_vert.nii.gz -c t2 -qc ~ /qc_singleSubj
@@ -226,6 +230,9 @@ sct_deepseg sc_lumbar_t2 -i t2_lumbar.nii.gz -qc ~/qc_singleSubj
226230# sake of reproducing the results in the tutorial.
227231sct_label_utils -i t2_lumbar.nii.gz -create 27,76,187,17:27,79,80,60 -o t2_lumbar_labels.nii.gz -qc ~ /qc_singleSubj
228232
233+ # generate a QC report for the lumbar labels
234+ sct_qc -i t2_lumbar.nii.gz -s t2_lumbar_labels.nii.gz -p sct_label_utils -qc ~ /qc_singleSubj
235+
229236# Register the image to the template using segmentation and labels
230237sct_register_to_template -i t2_lumbar.nii.gz -s t2_lumbar_seg.nii.gz -ldisc t2_lumbar_labels.nii.gz -c t2 -qc ~ /qc_singleSubj -param step=1,type=seg,algo=centermassrot:step=2,type=seg,algo=bsplinesyn,metric=MeanSquares,iter=3,slicewise=0:step=3,type=im,algo=syn,metric=CC,iter=3,slicewise=0
231238
@@ -387,7 +394,7 @@ sct_smooth_spinalcord -i t1.nii.gz -s t1_seg.nii.gz
387394# Tips: use flag "-sigma" to specify smoothing kernel size (in mm)
388395
389396# Second-pass segmentation using the smoothed anatomical image
390- sct_deepseg_sc -i t1_smooth.nii.gz -c t1 -qc ~ /qc_singleSubj
397+ sct_deepseg spinalcord -i t1_smooth.nii.gz -qc ~ /qc_singleSubj
391398
392399# Align the spinal cord in the right-left direction using slice-wise translations.
393400sct_flatten_sagittal -i t1.nii.gz -s t1_seg.nii.gz
@@ -414,7 +421,8 @@ sct_analyze_lesion -m t2_lesion_seg.nii.gz -s t2_sc_seg.nii.gz -qc ~/qc_singleSu
414421# Lesion analysis using PAM50 (the -f flag is used to specify the folder containing the atlas/template)
415422# Note: You must go through the "Register to Template" steps (labeling, registration) first
416423# This is because `sct_warp_template` is required to generate the `label` folder used for `-f`
417- # sct_analyze_lesion -m t2_lesion_seg.nii.gz -s t2_sc_seg.nii.gz -f label -qc ~/qc_singleSubj
424+ sct_warp_template -d t2.nii.gz -w ../t2/warp_template2anat.nii.gz
425+ sct_analyze_lesion -m t2_lesion_seg.nii.gz -s t2_sc_seg.nii.gz -f label -qc ~ /qc_singleSubj
418426
419427# Segment the spinal cord on gradient echo EPI data
420428cd ../fmri/
@@ -425,6 +433,8 @@ cd ../t2
425433sct_deepseg sc_canal_t2 -i t2.nii.gz -qc ~ /qc_singleSubj
426434# Check results using FSLeyes
427435fsleyes t2.nii.gz -cm greyscale t2_canal_seg_seg.nii.gz -cm red -a 70.0 &
436+ # Use canal segmentation to compute aSCOR
437+ sct_compute_ascor -i-SC t2_seg.nii.gz -i-canal t2_canal_seg.nii.gz -perlevel -1 -o ascor.csv
428438
429439# Full spinal segmentation (Vertebrae, Intervertebral discs, Spinal cord and Spinal canal)
430440# Segment using totalspineseg
0 commit comments