Skip to content

Commit d23e531

Browse files
batch_single_subject.sh: Restore sct_warp_template commands
This is done to match the slides, even though the ordering is slightly different in the webpage tutorials.
1 parent 1fc8781 commit d23e531

1 file changed

Lines changed: 6 additions & 7 deletions

File tree

single_subject/batch_single_subject.sh

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -208,21 +208,20 @@ sct_extract_metric -i t2s.nii.gz -f t2s_gmseg.nii.gz -method bin -z 2:12 -o t2s_
208208
# Register template->t2s (using warping field generated from template<->t2 registration)
209209
# Tips: Here we use the WM seg for the iseg/dseg fields in order to account for both the cord and the GM shape.
210210
sct_register_multimodal -i "${SCT_DIR}/data/PAM50/template/PAM50_t2s.nii.gz" -iseg "${SCT_DIR}/data/PAM50/template/PAM50_wm.nii.gz" -d t2s.nii.gz -dseg t2s_wmseg.nii.gz -initwarp ../t2/warp_template2anat.nii.gz -initwarpinv ../t2/warp_anat2template.nii.gz -owarp warp_template2t2s.nii.gz -owarpinv warp_t2s2template.nii.gz -param step=1,type=seg,algo=rigid:step=2,type=seg,algo=bsplinesyn,slicewise=1,iter=3 -qc ~/qc_singleSubj
211+
# Warp template
212+
sct_warp_template -d t2s.nii.gz -w warp_template2t2s.nii.gz -qc ~/qc_singleSubj
211213

212214
cd ../mt
213215
# Register template->mt via t2s to account for GM segmentation
214216
sct_register_multimodal -i "${SCT_DIR}/data/PAM50/template/PAM50_t2.nii.gz" -iseg "${SCT_DIR}/data/PAM50/template/PAM50_cord.nii.gz" -d mt1.nii.gz -dseg mt1_seg.nii.gz -param step=1,type=seg,algo=centermass:step=2,type=seg,algo=bsplinesyn,slicewise=1,iter=3 -m mask_mt1.nii.gz -initwarp ../t2s/warp_template2t2s.nii.gz -owarp warp_template2mt.nii.gz -qc ~/qc_singleSubj
215-
216-
217+
# Warp template
218+
sct_warp_template -d mt1.nii.gz -w warp_template2mt.nii.gz -qc ~/qc_singleSubj
219+
# Check results
220+
fsleyes mt1.nii.gz -cm greyscale -a 100.0 label/template/PAM50_t2.nii.gz -cm greyscale -dr 0 4000 -a 100.0 label/template/PAM50_gm.nii.gz -cm red-yellow -dr 0.4 1 -a 100.0 label/template/PAM50_wm.nii.gz -cm blue-lightblue -dr 0.4 1 -a 100.0 &
217221

218222
# Atlas-based analysis (Extracting metrics (MTR) in gray/white matter tracts)
219223
# ======================================================================================================================
220224

221-
# In order to use the PAM50 atlas to extract/aggregate image data, the atlas must first be transformed to the MT space
222-
sct_warp_template -d mt1.nii.gz -w warp_template2mt.nii.gz -a 1 -qc ~/qc_singleSubj
223-
# Check results
224-
fsleyes mt1.nii.gz -cm greyscale -a 100.0 label/template/PAM50_t2.nii.gz -cm greyscale -dr 0 4000 -a 100.0 label/template/PAM50_gm.nii.gz -cm red-yellow -dr 0.4 1 -a 100.0 label/template/PAM50_wm.nii.gz -cm blue-lightblue -dr 0.4 1 -a 100.0 &
225-
226225
# Extract MTR for each slice within the white matter (combined label: #51)
227226
# Tips: To list all available labels, type: "sct_extract_metric"
228227
sct_extract_metric -i mtr.nii.gz -f label/atlas -method map -l 51 -o mtr_in_wm.csv

0 commit comments

Comments
 (0)