Skip to content

Commit 9cc5975

Browse files
batch_single_subject.sh: Update totalspineseg syntax/output fname
1 parent dc8264a commit 9cc5975

1 file changed

Lines changed: 10 additions & 10 deletions

File tree

single_subject/batch_single_subject.sh

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -64,29 +64,29 @@ sct_deepseg -h
6464
# ======================================================================================================================
6565

6666
# Vertebral disc labeling
67-
sct_deepseg totalspineseg -step1-only 1 -i t2.nii.gz -qc ~/qc_singleSubj
67+
sct_deepseg spine -step1-only 1 -i t2.nii.gz -qc ~/qc_singleSubj
6868

6969
# Full spinal segmentation (Vertebrae, Intervertebral discs, Spinal cord and Spinal canal)
7070
# Segment using totalspineseg
71-
sct_deepseg totalspineseg -i t2.nii.gz -qc ~/qc_singleSubj
71+
sct_deepseg spine -i t2.nii.gz -qc ~/qc_singleSubj
7272
# Check results using FSLeyes
73-
fsleyes t2.nii.gz -cm greyscale t2_step1_canal.nii.gz -cm YlOrRd -a 70.0 t2_step1_cord.nii.gz -cm YlOrRd -a 70.0 t2_step1_levels.nii.gz -cm subcortical -a 70.0 t2_step1_output.nii.gz -cm subcortical -a 70.0 t2_step2_output.nii.gz -cm subcortical -a 70.0 &
73+
fsleyes t2.nii.gz -cm greyscale t2_step1_canal.nii.gz -cm YlOrRd -a 70.0 t2_step1_cord.nii.gz -cm YlOrRd -a 70.0 t2_totalspineseg_discs.nii.gz -cm subcortical -a 70.0 t2_step1_output.nii.gz -cm subcortical -a 70.0 t2_step2_output.nii.gz -cm subcortical -a 70.0 &
7474
# Check QC report: Go to your browser and do "refresh".
7575

7676
# Optionally, you can use the generated disc labels to create a labeled segmentation
77-
sct_label_utils -i t2_seg.nii.gz -project-centerline t2_step1_levels.nii.gz -o t2_seg_labeled.nii.gz
77+
sct_label_utils -i t2_seg.nii.gz -project-centerline t2_totalspineseg_discs.nii.gz -o t2_seg_labeled.nii.gz
7878

7979

8080

8181
# Shape-based analysis
8282
# ======================================================================================================================
8383

8484
# Compute cross-sectional area (CSA) of spinal cord and average it across levels C3 and C4
85-
sct_process_segmentation -i t2_seg.nii.gz -vert 3:4 -discfile t2_step1_levels.nii.gz -o csa_c3c4.csv
85+
sct_process_segmentation -i t2_seg.nii.gz -vert 3:4 -discfile t2_totalspineseg_discs.nii.gz -o csa_c3c4.csv
8686
# Aggregate CSA value per level
87-
sct_process_segmentation -i t2_seg.nii.gz -vert 3:4 -discfile t2_step1_levels.nii.gz -perlevel 1 -o csa_perlevel.csv
87+
sct_process_segmentation -i t2_seg.nii.gz -vert 3:4 -discfile t2_totalspineseg_discs.nii.gz -perlevel 1 -o csa_perlevel.csv
8888
# Aggregate CSA value per slices
89-
sct_process_segmentation -i t2_seg.nii.gz -z 30:35 -discfile t2_step1_levels.nii.gz -perslice 1 -o csa_perslice.csv
89+
sct_process_segmentation -i t2_seg.nii.gz -z 30:35 -discfile t2_totalspineseg_discs.nii.gz -perslice 1 -o csa_perslice.csv
9090

9191
# A drawback of vertebral level-based CSA is that it doesn’t consider neck flexion and extension.
9292
# To overcome this limitation, the CSA can instead be computed using the distance to a reference point.
@@ -98,7 +98,7 @@ sct_process_segmentation -i t2_seg.nii.gz -pmj t2_pmj.nii.gz -pmj-distance 64 -p
9898

9999
# The above commands will output the metrics in the subject space (with the original image's slice numbers)
100100
# However, you can get the corresponding slice number in the PAM50 space by using the flag `-normalize-PAM50 1`
101-
sct_process_segmentation -i t2_seg.nii.gz -discfile t2_step1_levels.nii.gz -perslice 1 -normalize-PAM50 1 -o csa_PAM50.csv
101+
sct_process_segmentation -i t2_seg.nii.gz -discfile t2_totalspineseg_discs.nii.gz -perslice 1 -normalize-PAM50 1 -o csa_PAM50.csv
102102

103103

104104

@@ -129,7 +129,7 @@ sct_compute_compression -i t2_compressed_seg.nii.gz -vertfile t2_compressed_seg_
129129
cd ../t2
130130

131131
# Create labels at C3 and T2 mid-vertebral levels. These labels are needed for template registration.
132-
sct_label_utils -i t2_step1_levels.nii.gz -keep 3,9 -o t2_labels_vert.nii.gz
132+
sct_label_utils -i t2_totalspineseg_discs.nii.gz -keep 3,9 -o t2_labels_vert.nii.gz
133133
# Generate a QC report to visualize the two selected labels on the anatomical image
134134
sct_qc -i t2.nii.gz -s t2_labels_vert.nii.gz -p sct_label_utils -qc ~/qc_singleSubj
135135

@@ -146,7 +146,7 @@ sct_register_to_template -i t2.nii.gz -s t2_seg.nii.gz -ldisc t2_labels_vert.nii
146146
sct_register_to_template -i t2.nii.gz -s t2_seg.nii.gz -ldisc t2_labels_vert.nii.gz -qc ~/qc_singleSubj -ofolder advanced_param -c t2 -param step=1,type=seg,algo=rigid:step=2,type=seg,metric=CC,algo=bsplinesyn,slicewise=1,iter=3:step=3,type=im,metric=CC,algo=syn,slicewise=1,iter=2
147147

148148
# Register t2->template with large FOV (e.g. C2-L1) using `-ldisc` option
149-
# sct_register_to_template -i t2.nii.gz -s t2_seg.nii.gz -ldisc t2_step1_levels.nii.gz -c t2
149+
# sct_register_to_template -i t2.nii.gz -s t2_seg.nii.gz -ldisc t2_totalspineseg_discs.nii.gz -c t2
150150

151151
# Register t2->template in compressed cord (example command)
152152
# In case of highly compressed cord, the algo columnwise can be used, which allows for more deformation than bsplinesyn.

0 commit comments

Comments
 (0)