Hi,
When running sct_warp_template it always outputs the “spinal_levels” folder, whether you omit the ‘-s’ option or explicitly set ‘-s 0’.
Best wishes,
Jon
Hi,
When running sct_warp_template it always outputs the “spinal_levels” folder, whether you omit the ‘-s’ option or explicitly set ‘-s 0’.
Best wishes,
Jon
hum, that’s weird. Could you please copy/paste the full terminal output (including the command)? Thanks
Error 402: something went wrong in the space between the chair and keyboard.
I can’t replicate this. Please feel free to delete.
Apologies,
Jon
now officially part of #hall-of-fame-quotes
Hi!
Sorry to reopen this old post but i think Jon was right!
sct_warp_template -d $T1Image -w warp_template2anat.nii.gz
does warp the spinal levels, although in the documentation says that -s
is 0 by default.
Furthermore with the -s 0
flag it still warps them.
Here the output
sct_warp_template -d n4_T1.nii -w warp_template2anat.nii.gz -a 1 -s 0
--
Spinal Cord Toolbox (4.3)
Check parameters:
Working directory ........ /mnt/Images
Destination image ........ n4_T1.nii
Warping field ............ warp_template2anat.nii.gz
Path template ............ /home/extop/sct_4.3/data/PAM50
Output folder ............ label
WARP TEMPLATE:
/home/extop/sct_4.3/bin/isct_antsApplyTransforms -d 3 -i /home/extop/sct_4.3/data/PAM50/template/PAM50_t1.nii.gz -r n4_T1.nii -t warp_template2anat.nii.gz -o label/template/PAM50_t1.nii.gz -n Linear # in /mnt/Images
/home/extop/sct_4.3/bin/isct_antsApplyTransforms -d 3 -i /home/extop/sct_4.3/data/PAM50/template/PAM50_t2.nii.gz -r n4_T1.nii -t warp_template2anat.nii.gz -o label/template/PAM50_t2.nii.gz -n Linear # in /mnt/Images
/home/extop/sct_4.3/bin/isct_antsApplyTransforms -d 3 -i /home/extop/sct_4.3/data/PAM50/template/PAM50_t2s.nii.gz -r n4_T1.nii -t warp_template2anat.nii.gz -o label/template/PAM50_t2s.nii.gz -n Linear # in /mnt/Images
/home/extop/sct_4.3/bin/isct_antsApplyTransforms -d 3 -i /home/extop/sct_4.3/data/PAM50/template/PAM50_cord.nii.gz -r n4_T1.nii -t warp_template2anat.nii.gz -o label/template/PAM50_cord.nii.gz -n NearestNeighbor # in /mnt/Images
/home/extop/sct_4.3/bin/isct_antsApplyTransforms -d 3 -i /home/extop/sct_4.3/data/PAM50/template/PAM50_wm.nii.gz -r n4_T1.nii -t warp_template2anat.nii.gz -o label/template/PAM50_wm.nii.gz -n Linear # in /mnt/Images
/home/extop/sct_4.3/bin/isct_antsApplyTransforms -d 3 -i /home/extop/sct_4.3/data/PAM50/template/PAM50_gm.nii.gz -r n4_T1.nii -t warp_template2anat.nii.gz -o label/template/PAM50_gm.nii.gz -n Linear # in /mnt/Images
/home/extop/sct_4.3/bin/isct_antsApplyTransforms -d 3 -i /home/extop/sct_4.3/data/PAM50/template/PAM50_csf.nii.gz -r n4_T1.nii -t warp_template2anat.nii.gz -o label/template/PAM50_csf.nii.gz -n NearestNeighbor # in /mnt/Images
/home/extop/sct_4.3/bin/isct_antsApplyTransforms -d 3 -i /home/extop/sct_4.3/data/PAM50/template/PAM50_levels.nii.gz -r n4_T1.nii -t warp_template2anat.nii.gz -o label/template/PAM50_levels.nii.gz -n NearestNeighbor # in /mnt/Images
/home/extop/sct_4.3/bin/isct_antsApplyTransforms -d 3 -i /home/extop/sct_4.3/data/PAM50/template/PAM50_levels_continuous.nii.gz -r n4_T1.nii -t warp_template2anat.nii.gz -o label/template/PAM50_levels_continuous.nii.gz -n Linear # in /mnt/Images
/home/extop/sct_4.3/bin/isct_antsApplyTransforms -d 3 -i /home/extop/sct_4.3/data/PAM50/template/PAM50_label_body.nii.gz -r n4_T1.nii -t warp_template2anat.nii.gz -o label/template/PAM50_label_body.nii.gz -n Linear # in /mnt/Images
/home/extop/sct_4.3/bin/isct_antsApplyTransforms -d 3 -i /home/extop/sct_4.3/data/PAM50/template/PAM50_label_disc.nii.gz -r n4_T1.nii -t warp_template2anat.nii.gz -o label/template/PAM50_label_disc.nii.gz -n Linear # in /mnt/Images
/home/extop/sct_4.3/bin/isct_antsApplyTransforms -d 3 -i /home/extop/sct_4.3/data/PAM50/template/PAM50_label_discPosterior.nii.gz -r n4_T1.nii -t warp_template2anat.nii.gz -o label/template/PAM50_label_discPosterior.nii.gz -n Linear # in /mnt/Images
/home/extop/sct_4.3/bin/isct_antsApplyTransforms -d 3 -i /home/extop/sct_4.3/data/PAM50/template/PAM50_spine.nii.gz -r n4_T1.nii -t warp_template2anat.nii.gz -o label/template/PAM50_spine.nii.gz -n Linear # in /mnt/Images
/home/extop/sct_4.3/bin/isct_antsApplyTransforms -d 3 -i /home/extop/sct_4.3/data/PAM50/template/PAM50_centerline.nii.gz -r n4_T1.nii -t warp_template2anat.nii.gz -o label/template/PAM50_centerline.nii.gz -n Linear # in /mnt/Images
/home/extop/sct_4.3/bin/isct_antsApplyTransforms -d 3 -i /home/extop/sct_4.3/data/PAM50/template/PAM50_label_spinal_levels.nii.gz -r n4_T1.nii -t warp_template2anat.nii.gz -o label/template/PAM50_label_spinal_levels.nii.gz -n NearestNeighbor # in /mnt/Images
cp /home/extop/sct_4.3/data/PAM50/template/info_label.txt label/template
WARP ATLAS OF WHITE MATTER TRACTS:
/home/extop/sct_4.3/bin/isct_antsApplyTransforms -d 3 -i /home/extop/sct_4.3/data/PAM50/atlas/PAM50_atlas_00.nii.gz -r n4_T1.nii -t warp_template2anat.nii.gz -o label/atlas/PAM50_atlas_00.nii.gz -n Linear # in /mnt/Images
/home/extop/sct_4.3/bin/isct_antsApplyTransforms -d 3 -i /home/extop/sct_4.3/data/PAM50/atlas/PAM50_atlas_01.nii.gz -r n4_T1.nii -t warp_template2anat.nii.gz -o label/atlas/PAM50_atlas_01.nii.gz -n Linear # in /mnt/Images
/home/extop/sct_4.3/bin/isct_antsApplyTransforms -d 3 -i /home/extop/sct_4.3/data/PAM50/atlas/PAM50_atlas_02.nii.gz -r n4_T1.nii -t warp_template2anat.nii.gz -o label/atlas/PAM50_atlas_02.nii.gz -n Linear # in /mnt/Images
/home/extop/sct_4.3/bin/isct_antsApplyTransforms -d 3 -i /home/extop/sct_4.3/data/PAM50/atlas/PAM50_atlas_03.nii.gz -r n4_T1.nii -t warp_template2anat.nii.gz -o label/atlas/PAM50_atlas_03.nii.gz -n Linear # in /mnt/Images
/home/extop/sct_4.3/bin/isct_antsApplyTransforms -d 3 -i /home/extop/sct_4.3/data/PAM50/atlas/PAM50_atlas_04.nii.gz -r n4_T1.nii -t warp_template2anat.nii.gz -o label/atlas/PAM50_atlas_04.nii.gz -n Linear # in /mnt/Images
/home/extop/sct_4.3/bin/isct_antsApplyTransforms -d 3 -i /home/extop/sct_4.3/data/PAM50/atlas/PAM50_atlas_05.nii.gz -r n4_T1.nii -t warp_template2anat.nii.gz -o label/atlas/PAM50_atlas_05.nii.gz -n Linear # in /mnt/Images
/home/extop/sct_4.3/bin/isct_antsApplyTransforms -d 3 -i /home/extop/sct_4.3/data/PAM50/atlas/PAM50_atlas_06.nii.gz -r n4_T1.nii -t warp_template2anat.nii.gz -o label/atlas/PAM50_atlas_06.nii.gz -n Linear # in /mnt/Images
/home/extop/sct_4.3/bin/isct_antsApplyTransforms -d 3 -i /home/extop/sct_4.3/data/PAM50/atlas/PAM50_atlas_07.nii.gz -r n4_T1.nii -t warp_template2anat.nii.gz -o label/atlas/PAM50_atlas_07.nii.gz -n Linear # in /mnt/Images
/home/extop/sct_4.3/bin/isct_antsApplyTransforms -d 3 -i /home/extop/sct_4.3/data/PAM50/atlas/PAM50_atlas_08.nii.gz -r n4_T1.nii -t warp_template2anat.nii.gz -o label/atlas/PAM50_atlas_08.nii.gz -n Linear # in /mnt/Images
/home/extop/sct_4.3/bin/isct_antsApplyTransforms -d 3 -i /home/extop/sct_4.3/data/PAM50/atlas/PAM50_atlas_09.nii.gz -r n4_T1.nii -t warp_template2anat.nii.gz -o label/atlas/PAM50_atlas_09.nii.gz -n Linear # in /mnt/Images
/home/extop/sct_4.3/bin/isct_antsApplyTransforms -d 3 -i /home/extop/sct_4.3/data/PAM50/atlas/PAM50_atlas_10.nii.gz -r n4_T1.nii -t warp_template2anat.nii.gz -o label/atlas/PAM50_atlas_10.nii.gz -n Linear # in /mnt/Images
/home/extop/sct_4.3/bin/isct_antsApplyTransforms -d 3 -i /home/extop/sct_4.3/data/PAM50/atlas/PAM50_atlas_11.nii.gz -r n4_T1.nii -t warp_template2anat.nii.gz -o label/atlas/PAM50_atlas_11.nii.gz -n Linear # in /mnt/Images
/home/extop/sct_4.3/bin/isct_antsApplyTransforms -d 3 -i /home/extop/sct_4.3/data/PAM50/atlas/PAM50_atlas_12.nii.gz -r n4_T1.nii -t warp_template2anat.nii.gz -o label/atlas/PAM50_atlas_12.nii.gz -n Linear # in /mnt/Images
/home/extop/sct_4.3/bin/isct_antsApplyTransforms -d 3 -i /home/extop/sct_4.3/data/PAM50/atlas/PAM50_atlas_13.nii.gz -r n4_T1.nii -t warp_template2anat.nii.gz -o label/atlas/PAM50_atlas_13.nii.gz -n Linear # in /mnt/Images
/home/extop/sct_4.3/bin/isct_antsApplyTransforms -d 3 -i /home/extop/sct_4.3/data/PAM50/atlas/PAM50_atlas_14.nii.gz -r n4_T1.nii -t warp_template2anat.nii.gz -o label/atlas/PAM50_atlas_14.nii.gz -n Linear # in /mnt/Images
/home/extop/sct_4.3/bin/isct_antsApplyTransforms -d 3 -i /home/extop/sct_4.3/data/PAM50/atlas/PAM50_atlas_15.nii.gz -r n4_T1.nii -t warp_template2anat.nii.gz -o label/atlas/PAM50_atlas_15.nii.gz -n Linear # in /mnt/Images
/home/extop/sct_4.3/bin/isct_antsApplyTransforms -d 3 -i /home/extop/sct_4.3/data/PAM50/atlas/PAM50_atlas_16.nii.gz -r n4_T1.nii -t warp_template2anat.nii.gz -o label/atlas/PAM50_atlas_16.nii.gz -n Linear # in /mnt/Images
/home/extop/sct_4.3/bin/isct_antsApplyTransforms -d 3 -i /home/extop/sct_4.3/data/PAM50/atlas/PAM50_atlas_17.nii.gz -r n4_T1.nii -t warp_template2anat.nii.gz -o label/atlas/PAM50_atlas_17.nii.gz -n Linear # in /mnt/Images
/home/extop/sct_4.3/bin/isct_antsApplyTransforms -d 3 -i /home/extop/sct_4.3/data/PAM50/atlas/PAM50_atlas_18.nii.gz -r n4_T1.nii -t warp_template2anat.nii.gz -o label/atlas/PAM50_atlas_18.nii.gz -n Linear # in /mnt/Images
/home/extop/sct_4.3/bin/isct_antsApplyTransforms -d 3 -i /home/extop/sct_4.3/data/PAM50/atlas/PAM50_atlas_19.nii.gz -r n4_T1.nii -t warp_template2anat.nii.gz -o label/atlas/PAM50_atlas_19.nii.gz -n Linear # in /mnt/Images
/home/extop/sct_4.3/bin/isct_antsApplyTransforms -d 3 -i /home/extop/sct_4.3/data/PAM50/atlas/PAM50_atlas_20.nii.gz -r n4_T1.nii -t warp_template2anat.nii.gz -o label/atlas/PAM50_atlas_20.nii.gz -n Linear # in /mnt/Images
/home/extop/sct_4.3/bin/isct_antsApplyTransforms -d 3 -i /home/extop/sct_4.3/data/PAM50/atlas/PAM50_atlas_21.nii.gz -r n4_T1.nii -t warp_template2anat.nii.gz -o label/atlas/PAM50_atlas_21.nii.gz -n Linear # in /mnt/Images
/home/extop/sct_4.3/bin/isct_antsApplyTransforms -d 3 -i /home/extop/sct_4.3/data/PAM50/atlas/PAM50_atlas_22.nii.gz -r n4_T1.nii -t warp_template2anat.nii.gz -o label/atlas/PAM50_atlas_22.nii.gz -n Linear # in /mnt/Images
/home/extop/sct_4.3/bin/isct_antsApplyTransforms -d 3 -i /home/extop/sct_4.3/data/PAM50/atlas/PAM50_atlas_23.nii.gz -r n4_T1.nii -t warp_template2anat.nii.gz -o label/atlas/PAM50_atlas_23.nii.gz -n Linear # in /mnt/Images
/home/extop/sct_4.3/bin/isct_antsApplyTransforms -d 3 -i /home/extop/sct_4.3/data/PAM50/atlas/PAM50_atlas_24.nii.gz -r n4_T1.nii -t warp_template2anat.nii.gz -o label/atlas/PAM50_atlas_24.nii.gz -n Linear # in /mnt/Images
/home/extop/sct_4.3/bin/isct_antsApplyTransforms -d 3 -i /home/extop/sct_4.3/data/PAM50/atlas/PAM50_atlas_25.nii.gz -r n4_T1.nii -t warp_template2anat.nii.gz -o label/atlas/PAM50_atlas_25.nii.gz -n Linear # in /mnt/Images
/home/extop/sct_4.3/bin/isct_antsApplyTransforms -d 3 -i /home/extop/sct_4.3/data/PAM50/atlas/PAM50_atlas_26.nii.gz -r n4_T1.nii -t warp_template2anat.nii.gz -o label/atlas/PAM50_atlas_26.nii.gz -n Linear # in /mnt/Images
/home/extop/sct_4.3/bin/isct_antsApplyTransforms -d 3 -i /home/extop/sct_4.3/data/PAM50/atlas/PAM50_atlas_27.nii.gz -r n4_T1.nii -t warp_template2anat.nii.gz -o label/atlas/PAM50_atlas_27.nii.gz -n Linear # in /mnt/Images
/home/extop/sct_4.3/bin/isct_antsApplyTransforms -d 3 -i /home/extop/sct_4.3/data/PAM50/atlas/PAM50_atlas_28.nii.gz -r n4_T1.nii -t warp_template2anat.nii.gz -o label/atlas/PAM50_atlas_28.nii.gz -n Linear # in /mnt/Images
/home/extop/sct_4.3/bin/isct_antsApplyTransforms -d 3 -i /home/extop/sct_4.3/data/PAM50/atlas/PAM50_atlas_29.nii.gz -r n4_T1.nii -t warp_template2anat.nii.gz -o label/atlas/PAM50_atlas_29.nii.gz -n Linear # in /mnt/Images
/home/extop/sct_4.3/bin/isct_antsApplyTransforms -d 3 -i /home/extop/sct_4.3/data/PAM50/atlas/PAM50_atlas_30.nii.gz -r n4_T1.nii -t warp_template2anat.nii.gz -o label/atlas/PAM50_atlas_30.nii.gz -n Linear # in /mnt/Images
/home/extop/sct_4.3/bin/isct_antsApplyTransforms -d 3 -i /home/extop/sct_4.3/data/PAM50/atlas/PAM50_atlas_31.nii.gz -r n4_T1.nii -t warp_template2anat.nii.gz -o label/atlas/PAM50_atlas_31.nii.gz -n Linear # in /mnt/Images
/home/extop/sct_4.3/bin/isct_antsApplyTransforms -d 3 -i /home/extop/sct_4.3/data/PAM50/atlas/PAM50_atlas_32.nii.gz -r n4_T1.nii -t warp_template2anat.nii.gz -o label/atlas/PAM50_atlas_32.nii.gz -n Linear # in /mnt/Images
/home/extop/sct_4.3/bin/isct_antsApplyTransforms -d 3 -i /home/extop/sct_4.3/data/PAM50/atlas/PAM50_atlas_33.nii.gz -r n4_T1.nii -t warp_template2anat.nii.gz -o label/atlas/PAM50_atlas_33.nii.gz -n Linear # in /mnt/Images
/home/extop/sct_4.3/bin/isct_antsApplyTransforms -d 3 -i /home/extop/sct_4.3/data/PAM50/atlas/PAM50_atlas_34.nii.gz -r n4_T1.nii -t warp_template2anat.nii.gz -o label/atlas/PAM50_atlas_34.nii.gz -n Linear # in /mnt/Images
/home/extop/sct_4.3/bin/isct_antsApplyTransforms -d 3 -i /home/extop/sct_4.3/data/PAM50/atlas/PAM50_atlas_35.nii.gz -r n4_T1.nii -t warp_template2anat.nii.gz -o label/atlas/PAM50_atlas_35.nii.gz -n Linear # in /mnt/Images
/home/extop/sct_4.3/bin/isct_antsApplyTransforms -d 3 -i /home/extop/sct_4.3/data/PAM50/atlas/PAM50_atlas_36.nii.gz -r n4_T1.nii -t warp_template2anat.nii.gz -o label/atlas/PAM50_atlas_36.nii.gz -n Linear # in /mnt/Images
cp /home/extop/sct_4.3/data/PAM50/atlas/info_label.txt label/atlas
Done! To view results, type:
fsleyes n4_T1.nii -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 50.0 label/template/PAM50_wm.nii.gz -cm blue-lightblue -dr 0.4 1 -a 50.0 &
Peace,
Aran
Hi @Aran,
You need to look for the section “WARP SPINAL LEVELS:” which was not in your Terminal output above.
julien-macbook:~/sct_testing_data/mt $ sct_warp_template -d mt1.nii.gz -w warp_template2mt.nii.gz
--
Spinal Cord Toolbox (git-HEAD-9ea4c9b3a6a0c0aab75b45bfbf060820cf0f2ce4)
Check parameters:
Working directory ........ /Users/julien/sct_testing_data/mt
Destination image ........ mt1.nii.gz
Warping field ............ warp_template2mt.nii.gz
Path template ............ /Users/julien/code/sct/data/PAM50
Output folder ............ label
WARP TEMPLATE:
/Users/julien/code/sct/bin/isct_antsApplyTransforms -d 3 -i /Users/julien/code/sct/data/PAM50/template/PAM50_t1.nii.gz -r mt1.nii.gz -t warp_template2mt.nii.gz -o label/template/PAM50_t1.nii.gz -n Linear # in /Users/julien/sct_testing_data/mt
/Users/julien/code/sct/bin/isct_antsApplyTransforms -d 3 -i /Users/julien/code/sct/data/PAM50/template/PAM50_t2.nii.gz -r mt1.nii.gz -t warp_template2mt.nii.gz -o label/template/PAM50_t2.nii.gz -n Linear # in /Users/julien/sct_testing_data/mt
/Users/julien/code/sct/bin/isct_antsApplyTransforms -d 3 -i /Users/julien/code/sct/data/PAM50/template/PAM50_t2s.nii.gz -r mt1.nii.gz -t warp_template2mt.nii.gz -o label/template/PAM50_t2s.nii.gz -n Linear # in /Users/julien/sct_testing_data/mt
/Users/julien/code/sct/bin/isct_antsApplyTransforms -d 3 -i /Users/julien/code/sct/data/PAM50/template/PAM50_cord.nii.gz -r mt1.nii.gz -t warp_template2mt.nii.gz -o label/template/PAM50_cord.nii.gz -n NearestNeighbor # in /Users/julien/sct_testing_data/mt
/Users/julien/code/sct/bin/isct_antsApplyTransforms -d 3 -i /Users/julien/code/sct/data/PAM50/template/PAM50_wm.nii.gz -r mt1.nii.gz -t warp_template2mt.nii.gz -o label/template/PAM50_wm.nii.gz -n Linear # in /Users/julien/sct_testing_data/mt
/Users/julien/code/sct/bin/isct_antsApplyTransforms -d 3 -i /Users/julien/code/sct/data/PAM50/template/PAM50_gm.nii.gz -r mt1.nii.gz -t warp_template2mt.nii.gz -o label/template/PAM50_gm.nii.gz -n Linear # in /Users/julien/sct_testing_data/mt
/Users/julien/code/sct/bin/isct_antsApplyTransforms -d 3 -i /Users/julien/code/sct/data/PAM50/template/PAM50_csf.nii.gz -r mt1.nii.gz -t warp_template2mt.nii.gz -o label/template/PAM50_csf.nii.gz -n NearestNeighbor # in /Users/julien/sct_testing_data/mt
/Users/julien/code/sct/bin/isct_antsApplyTransforms -d 3 -i /Users/julien/code/sct/data/PAM50/template/PAM50_levels.nii.gz -r mt1.nii.gz -t warp_template2mt.nii.gz -o label/template/PAM50_levels.nii.gz -n NearestNeighbor # in /Users/julien/sct_testing_data/mt
/Users/julien/code/sct/bin/isct_antsApplyTransforms -d 3 -i /Users/julien/code/sct/data/PAM50/template/PAM50_levels_continuous.nii.gz -r mt1.nii.gz -t warp_template2mt.nii.gz -o label/template/PAM50_levels_continuous.nii.gz -n Linear # in /Users/julien/sct_testing_data/mt
/Users/julien/code/sct/bin/isct_antsApplyTransforms -d 3 -i /Users/julien/code/sct/data/PAM50/template/PAM50_label_body.nii.gz -r mt1.nii.gz -t warp_template2mt.nii.gz -o label/template/PAM50_label_body.nii.gz -n Linear # in /Users/julien/sct_testing_data/mt
/Users/julien/code/sct/bin/isct_antsApplyTransforms -d 3 -i /Users/julien/code/sct/data/PAM50/template/PAM50_label_disc.nii.gz -r mt1.nii.gz -t warp_template2mt.nii.gz -o label/template/PAM50_label_disc.nii.gz -n Linear # in /Users/julien/sct_testing_data/mt
/Users/julien/code/sct/bin/isct_antsApplyTransforms -d 3 -i /Users/julien/code/sct/data/PAM50/template/PAM50_label_discPosterior.nii.gz -r mt1.nii.gz -t warp_template2mt.nii.gz -o label/template/PAM50_label_discPosterior.nii.gz -n Linear # in /Users/julien/sct_testing_data/mt
/Users/julien/code/sct/bin/isct_antsApplyTransforms -d 3 -i /Users/julien/code/sct/data/PAM50/template/PAM50_spine.nii.gz -r mt1.nii.gz -t warp_template2mt.nii.gz -o label/template/PAM50_spine.nii.gz -n Linear # in /Users/julien/sct_testing_data/mt
/Users/julien/code/sct/bin/isct_antsApplyTransforms -d 3 -i /Users/julien/code/sct/data/PAM50/template/PAM50_centerline.nii.gz -r mt1.nii.gz -t warp_template2mt.nii.gz -o label/template/PAM50_centerline.nii.gz -n Linear # in /Users/julien/sct_testing_data/mt
/Users/julien/code/sct/bin/isct_antsApplyTransforms -d 3 -i /Users/julien/code/sct/data/PAM50/template/PAM50_label_spinal_levels.nii.gz -r mt1.nii.gz -t warp_template2mt.nii.gz -o label/template/PAM50_label_spinal_levels.nii.gz -n NearestNeighbor # in /Users/julien/sct_testing_data/mt
cp /Users/julien/code/sct/data/PAM50/template/info_label.txt label/template
WARP ATLAS OF WHITE MATTER TRACTS:
/Users/julien/code/sct/bin/isct_antsApplyTransforms -d 3 -i /Users/julien/code/sct/data/PAM50/atlas/PAM50_atlas_00.nii.gz -r mt1.nii.gz -t warp_template2mt.nii.gz -o label/atlas/PAM50_atlas_00.nii.gz -n Linear # in /Users/julien/sct_testing_data/mt
...
/Users/julien/code/sct/bin/isct_antsApplyTransforms -d 3 -i /Users/julien/code/sct/data/PAM50/atlas/PAM50_atlas_36.nii.gz -r mt1.nii.gz -t warp_template2mt.nii.gz -o label/atlas/PAM50_atlas_36.nii.gz -n Linear # in /Users/julien/sct_testing_data/mt
cp /Users/julien/code/sct/data/PAM50/atlas/info_label.txt label/atlas
Done! To view results, type:
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 50.0 label/template/PAM50_wm.nii.gz -cm blue-lightblue -dr 0.4 1 -a 50.0 &
julien-macbook:~/sct_testing_data/mt $ sct_warp_template -d mt1.nii.gz -w warp_template2mt.nii.gz -s 1
--
Spinal Cord Toolbox (git-HEAD-9ea4c9b3a6a0c0aab75b45bfbf060820cf0f2ce4)
Check parameters:
Working directory ........ /Users/julien/sct_testing_data/mt
Destination image ........ mt1.nii.gz
Warping field ............ warp_template2mt.nii.gz
Path template ............ /Users/julien/code/sct/data/PAM50
Output folder ............ label
WARP TEMPLATE:
/Users/julien/code/sct/bin/isct_antsApplyTransforms -d 3 -i /Users/julien/code/sct/data/PAM50/template/PAM50_t1.nii.gz -r mt1.nii.gz -t warp_template2mt.nii.gz -o label/template/PAM50_t1.nii.gz -n Linear # in /Users/julien/sct_testing_data/mt
/Users/julien/code/sct/bin/isct_antsApplyTransforms -d 3 -i /Users/julien/code/sct/data/PAM50/template/PAM50_t2.nii.gz -r mt1.nii.gz -t warp_template2mt.nii.gz -o label/template/PAM50_t2.nii.gz -n Linear # in /Users/julien/sct_testing_data/mt
/Users/julien/code/sct/bin/isct_antsApplyTransforms -d 3 -i /Users/julien/code/sct/data/PAM50/template/PAM50_t2s.nii.gz -r mt1.nii.gz -t warp_template2mt.nii.gz -o label/template/PAM50_t2s.nii.gz -n Linear # in /Users/julien/sct_testing_data/mt
/Users/julien/code/sct/bin/isct_antsApplyTransforms -d 3 -i /Users/julien/code/sct/data/PAM50/template/PAM50_cord.nii.gz -r mt1.nii.gz -t warp_template2mt.nii.gz -o label/template/PAM50_cord.nii.gz -n NearestNeighbor # in /Users/julien/sct_testing_data/mt
/Users/julien/code/sct/bin/isct_antsApplyTransforms -d 3 -i /Users/julien/code/sct/data/PAM50/template/PAM50_wm.nii.gz -r mt1.nii.gz -t warp_template2mt.nii.gz -o label/template/PAM50_wm.nii.gz -n Linear # in /Users/julien/sct_testing_data/mt
/Users/julien/code/sct/bin/isct_antsApplyTransforms -d 3 -i /Users/julien/code/sct/data/PAM50/template/PAM50_gm.nii.gz -r mt1.nii.gz -t warp_template2mt.nii.gz -o label/template/PAM50_gm.nii.gz -n Linear # in /Users/julien/sct_testing_data/mt
/Users/julien/code/sct/bin/isct_antsApplyTransforms -d 3 -i /Users/julien/code/sct/data/PAM50/template/PAM50_csf.nii.gz -r mt1.nii.gz -t warp_template2mt.nii.gz -o label/template/PAM50_csf.nii.gz -n NearestNeighbor # in /Users/julien/sct_testing_data/mt
/Users/julien/code/sct/bin/isct_antsApplyTransforms -d 3 -i /Users/julien/code/sct/data/PAM50/template/PAM50_levels.nii.gz -r mt1.nii.gz -t warp_template2mt.nii.gz -o label/template/PAM50_levels.nii.gz -n NearestNeighbor # in /Users/julien/sct_testing_data/mt
/Users/julien/code/sct/bin/isct_antsApplyTransforms -d 3 -i /Users/julien/code/sct/data/PAM50/template/PAM50_levels_continuous.nii.gz -r mt1.nii.gz -t warp_template2mt.nii.gz -o label/template/PAM50_levels_continuous.nii.gz -n Linear # in /Users/julien/sct_testing_data/mt
/Users/julien/code/sct/bin/isct_antsApplyTransforms -d 3 -i /Users/julien/code/sct/data/PAM50/template/PAM50_label_body.nii.gz -r mt1.nii.gz -t warp_template2mt.nii.gz -o label/template/PAM50_label_body.nii.gz -n Linear # in /Users/julien/sct_testing_data/mt
/Users/julien/code/sct/bin/isct_antsApplyTransforms -d 3 -i /Users/julien/code/sct/data/PAM50/template/PAM50_label_disc.nii.gz -r mt1.nii.gz -t warp_template2mt.nii.gz -o label/template/PAM50_label_disc.nii.gz -n Linear # in /Users/julien/sct_testing_data/mt
/Users/julien/code/sct/bin/isct_antsApplyTransforms -d 3 -i /Users/julien/code/sct/data/PAM50/template/PAM50_label_discPosterior.nii.gz -r mt1.nii.gz -t warp_template2mt.nii.gz -o label/template/PAM50_label_discPosterior.nii.gz -n Linear # in /Users/julien/sct_testing_data/mt
/Users/julien/code/sct/bin/isct_antsApplyTransforms -d 3 -i /Users/julien/code/sct/data/PAM50/template/PAM50_spine.nii.gz -r mt1.nii.gz -t warp_template2mt.nii.gz -o label/template/PAM50_spine.nii.gz -n Linear # in /Users/julien/sct_testing_data/mt
/Users/julien/code/sct/bin/isct_antsApplyTransforms -d 3 -i /Users/julien/code/sct/data/PAM50/template/PAM50_centerline.nii.gz -r mt1.nii.gz -t warp_template2mt.nii.gz -o label/template/PAM50_centerline.nii.gz -n Linear # in /Users/julien/sct_testing_data/mt
/Users/julien/code/sct/bin/isct_antsApplyTransforms -d 3 -i /Users/julien/code/sct/data/PAM50/template/PAM50_label_spinal_levels.nii.gz -r mt1.nii.gz -t warp_template2mt.nii.gz -o label/template/PAM50_label_spinal_levels.nii.gz -n NearestNeighbor # in /Users/julien/sct_testing_data/mt
cp /Users/julien/code/sct/data/PAM50/template/info_label.txt label/template
WARP ATLAS OF WHITE MATTER TRACTS:
/Users/julien/code/sct/bin/isct_antsApplyTransforms -d 3 -i /Users/julien/code/sct/data/PAM50/atlas/PAM50_atlas_00.nii.gz -r mt1.nii.gz -t warp_template2mt.nii.gz -o label/atlas/PAM50_atlas_00.nii.gz -n Linear # in /Users/julien/sct_testing_data/mt
...
/Users/julien/code/sct/bin/isct_antsApplyTransforms -d 3 -i /Users/julien/code/sct/data/PAM50/atlas/PAM50_atlas_36.nii.gz -r mt1.nii.gz -t warp_template2mt.nii.gz -o label/atlas/PAM50_atlas_36.nii.gz -n Linear # in /Users/julien/sct_testing_data/mt
cp /Users/julien/code/sct/data/PAM50/atlas/info_label.txt label/atlas
WARP SPINAL LEVELS:
/Users/julien/code/sct/bin/isct_antsApplyTransforms -d 3 -i /Users/julien/code/sct/data/PAM50/spinal_levels/spinal_level_01.nii.gz -r mt1.nii.gz -t warp_template2mt.nii.gz -o label/spinal_levels/spinal_level_01.nii.gz -n Linear # in /Users/julien/sct_testing_data/mt
/Users/julien/code/sct/bin/isct_antsApplyTransforms -d 3 -i /Users/julien/code/sct/data/PAM50/spinal_levels/spinal_level_02.nii.gz -r mt1.nii.gz -t warp_template2mt.nii.gz -o label/spinal_levels/spinal_level_02.nii.gz -n Linear # in /Users/julien/sct_testing_data/mt
/Users/julien/code/sct/bin/isct_antsApplyTransforms -d 3 -i /Users/julien/code/sct/data/PAM50/spinal_levels/spinal_level_03.nii.gz -r mt1.nii.gz -t warp_template2mt.nii.gz -o label/spinal_levels/spinal_level_03.nii.gz -n Linear # in /Users/julien/sct_testing_data/mt
/Users/julien/code/sct/bin/isct_antsApplyTransforms -d 3 -i /Users/julien/code/sct/data/PAM50/spinal_levels/spinal_level_04.nii.gz -r mt1.nii.gz -t warp_template2mt.nii.gz -o label/spinal_levels/spinal_level_04.nii.gz -n Linear # in /Users/julien/sct_testing_data/mt
/Users/julien/code/sct/bin/isct_antsApplyTransforms -d 3 -i /Users/julien/code/sct/data/PAM50/spinal_levels/spinal_level_05.nii.gz -r mt1.nii.gz -t warp_template2mt.nii.gz -o label/spinal_levels/spinal_level_05.nii.gz -n Linear # in /Users/julien/sct_testing_data/mt
/Users/julien/code/sct/bin/isct_antsApplyTransforms -d 3 -i /Users/julien/code/sct/data/PAM50/spinal_levels/spinal_level_06.nii.gz -r mt1.nii.gz -t warp_template2mt.nii.gz -o label/spinal_levels/spinal_level_06.nii.gz -n Linear # in /Users/julien/sct_testing_data/mt
/Users/julien/code/sct/bin/isct_antsApplyTransforms -d 3 -i /Users/julien/code/sct/data/PAM50/spinal_levels/spinal_level_07.nii.gz -r mt1.nii.gz -t warp_template2mt.nii.gz -o label/spinal_levels/spinal_level_07.nii.gz -n Linear # in /Users/julien/sct_testing_data/mt
/Users/julien/code/sct/bin/isct_antsApplyTransforms -d 3 -i /Users/julien/code/sct/data/PAM50/spinal_levels/spinal_level_08.nii.gz -r mt1.nii.gz -t warp_template2mt.nii.gz -o label/spinal_levels/spinal_level_08.nii.gz -n Linear # in /Users/julien/sct_testing_data/mt
/Users/julien/code/sct/bin/isct_antsApplyTransforms -d 3 -i /Users/julien/code/sct/data/PAM50/spinal_levels/spinal_level_09.nii.gz -r mt1.nii.gz -t warp_template2mt.nii.gz -o label/spinal_levels/spinal_level_09.nii.gz -n Linear # in /Users/julien/sct_testing_data/mt
/Users/julien/code/sct/bin/isct_antsApplyTransforms -d 3 -i /Users/julien/code/sct/data/PAM50/spinal_levels/spinal_level_10.nii.gz -r mt1.nii.gz -t warp_template2mt.nii.gz -o label/spinal_levels/spinal_level_10.nii.gz -n Linear # in /Users/julien/sct_testing_data/mt
/Users/julien/code/sct/bin/isct_antsApplyTransforms -d 3 -i /Users/julien/code/sct/data/PAM50/spinal_levels/spinal_level_11.nii.gz -r mt1.nii.gz -t warp_template2mt.nii.gz -o label/spinal_levels/spinal_level_11.nii.gz -n Linear # in /Users/julien/sct_testing_data/mt
/Users/julien/code/sct/bin/isct_antsApplyTransforms -d 3 -i /Users/julien/code/sct/data/PAM50/spinal_levels/spinal_level_12.nii.gz -r mt1.nii.gz -t warp_template2mt.nii.gz -o label/spinal_levels/spinal_level_12.nii.gz -n Linear # in /Users/julien/sct_testing_data/mt
/Users/julien/code/sct/bin/isct_antsApplyTransforms -d 3 -i /Users/julien/code/sct/data/PAM50/spinal_levels/spinal_level_13.nii.gz -r mt1.nii.gz -t warp_template2mt.nii.gz -o label/spinal_levels/spinal_level_13.nii.gz -n Linear # in /Users/julien/sct_testing_data/mt
/Users/julien/code/sct/bin/isct_antsApplyTransforms -d 3 -i /Users/julien/code/sct/data/PAM50/spinal_levels/spinal_level_14.nii.gz -r mt1.nii.gz -t warp_template2mt.nii.gz -o label/spinal_levels/spinal_level_14.nii.gz -n Linear # in /Users/julien/sct_testing_data/mt
/Users/julien/code/sct/bin/isct_antsApplyTransforms -d 3 -i /Users/julien/code/sct/data/PAM50/spinal_levels/spinal_level_15.nii.gz -r mt1.nii.gz -t warp_template2mt.nii.gz -o label/spinal_levels/spinal_level_15.nii.gz -n Linear # in /Users/julien/sct_testing_data/mt
/Users/julien/code/sct/bin/isct_antsApplyTransforms -d 3 -i /Users/julien/code/sct/data/PAM50/spinal_levels/spinal_level_16.nii.gz -r mt1.nii.gz -t warp_template2mt.nii.gz -o label/spinal_levels/spinal_level_16.nii.gz -n Linear # in /Users/julien/sct_testing_data/mt
/Users/julien/code/sct/bin/isct_antsApplyTransforms -d 3 -i /Users/julien/code/sct/data/PAM50/spinal_levels/spinal_level_17.nii.gz -r mt1.nii.gz -t warp_template2mt.nii.gz -o label/spinal_levels/spinal_level_17.nii.gz -n Linear # in /Users/julien/sct_testing_data/mt
/Users/julien/code/sct/bin/isct_antsApplyTransforms -d 3 -i /Users/julien/code/sct/data/PAM50/spinal_levels/spinal_level_18.nii.gz -r mt1.nii.gz -t warp_template2mt.nii.gz -o label/spinal_levels/spinal_level_18.nii.gz -n Linear # in /Users/julien/sct_testing_data/mt
/Users/julien/code/sct/bin/isct_antsApplyTransforms -d 3 -i /Users/julien/code/sct/data/PAM50/spinal_levels/spinal_level_19.nii.gz -r mt1.nii.gz -t warp_template2mt.nii.gz -o label/spinal_levels/spinal_level_19.nii.gz -n Linear # in /Users/julien/sct_testing_data/mt
/Users/julien/code/sct/bin/isct_antsApplyTransforms -d 3 -i /Users/julien/code/sct/data/PAM50/spinal_levels/spinal_level_20.nii.gz -r mt1.nii.gz -t warp_template2mt.nii.gz -o label/spinal_levels/spinal_level_20.nii.gz -n Linear # in /Users/julien/sct_testing_data/mt
cp /Users/julien/code/sct/data/PAM50/spinal_levels/info_label.txt label/spinal_levels
Done! To view results, type:
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 50.0 label/template/PAM50_wm.nii.gz -cm blue-lightblue -dr 0.4 1 -a 50.0 &
Cheers,
Julien