Skip to content

Commit aad711b

Browse files
Add lumbar data and steps from future lumbar registration tutorial (#17)
1 parent 6d84971 commit aad711b

3 files changed

Lines changed: 32 additions & 0 deletions

File tree

single_subject/batch_single_subject.sh

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,37 @@ sct_compute_compression -i t2_compressed_seg.nii.gz -vertfile t2_compressed_seg_
146146

147147

148148

149+
# Registering lumbar data to the PAM50 template
150+
# ======================================================================================================================
151+
cd ../t2_lumbar
152+
153+
# Crop full-body image to isolate the lumbar region (lowest 200 axial slices)
154+
sct_crop_image -i t2.nii.gz -zmax 200
155+
156+
# Use lumbar-specific `sct_deepseg` model to segment the spinal cord
157+
sct_deepseg -i t2_crop.nii.gz -task seg_lumbar_sc_t2w
158+
159+
160+
# Generate labels for the 2 spinal cord landmarks: cauda equinea ('99') and T9-T10 disc ('17')
161+
# Note: Normally this would be done manually using fsleyes' "Edit mode -> Create mask" functionality. (Uncomment below)
162+
#
163+
# fsleyes t2.nii.gz &
164+
#
165+
# However, since this is an automated script with example data, we will place the labels at known locations for the
166+
# sake of reproducing the results in the tutorial.
167+
sct_label_utils -i t2_crop.nii.gz -create 27,80,80,60 -o t2_crop_label.nii.gz
168+
sct_label_utils -i t2_crop_label.nii.gz -create-add 27,76,187,17 -o t2_crop_label.nii.gz
169+
170+
# Register the image to the template using segmentation and labels
171+
# TODO: Uncomment when https://github.com/spinalcordtoolbox/PAM50/pull/27 gets merged and a new PAM50 release is made.
172+
#sct_register_to_template -i t2_crop.nii.gz \
173+
# -s t2_crop_seg.nii.gz \
174+
# -ldisc t2_crop_label.nii.gz \
175+
# -c t2 -qc qc \
176+
# -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
177+
178+
179+
149180
# Registering additional MT data to the PAM50 template
150181
# ======================================================================================================================
151182

5.74 MB
Binary file not shown.

tutorial-datasets.csv

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ data_vertebral-labeling,single_subject/data/t2/t2_seg.nii.gz
55
data_template-registration,single_subject/data/t2/t2.nii.gz
66
data_template-registration,single_subject/data/t2/t2_seg.nii.gz
77
data_template-registration,single_subject/data/t2/t2_labels_vert.nii.gz
8+
data_lumbar-registration,single_subject/data/t2_lumbar/t2.nii.gz
89
data_shape-metric-computation,single_subject/data/t2/t2_seg.nii.gz
910
data_shape-metric-computation,single_subject/data/t2/label/template/PAM50_levels.nii.gz
1011
data_compression,single_subject/data/t2_compression/t2_compressed.nii.gz

0 commit comments

Comments
 (0)