Update batch_single_subject.sh for the 2025 SCT Course#33
Merged
joshuacwnewton merged 22 commits intomasterfrom Dec 4, 2025
Merged
Update batch_single_subject.sh for the 2025 SCT Course#33joshuacwnewton merged 22 commits intomasterfrom
batch_single_subject.sh for the 2025 SCT Course#33joshuacwnewton merged 22 commits intomasterfrom
Conversation
bf444c4 to
de70c96
Compare
batch_single_subject.sh for the 2025 SCT Course
a3cc1fa to
f6c9550
Compare
f6c9550 to
3a44440
Compare
3a44440 to
53665c3
Compare
2ed41f0 to
bfe9286
Compare
Keeping the old syntax will be better for ensuring backwards compatibility with the course data .zips, since we package up the _gmseg and _wmseg files to be used in other tutorials.
CSV generation will fail due to missing labeled seg file.
Superseded by totalspineseg.
9cc5975 to
1284fd9
Compare
1284fd9 to
8719e48
Compare
b21d177 to
4edd73c
Compare
4edd73c to
93cddf5
Compare
Member
Author
|
I'll follow up by creating a new dataset release and updating the link in the SCT repo. |
joshuacwnewton
commented
Jan 12, 2026
Comment on lines
147
to
+151
| # Register t2->template with modified parameters (advanced usage of `-param`) | ||
| sct_register_to_template -i t2.nii.gz -s t2_seg.nii.gz -l 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 | ||
| 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 | ||
|
|
||
| # Register t2->template with large FOV (e.g. C2-L1) using `-ldisc` option | ||
| # sct_register_to_template -i t2.nii.gz -s t2_seg.nii.gz -ldisc t2_seg_labeled_discs.nii.gz -c t2 | ||
| # sct_register_to_template -i t2.nii.gz -s t2_seg.nii.gz -ldisc t2_totalspineseg_discs.nii.gz -c t2 |
Member
Author
There was a problem hiding this comment.
Note to self re: spinalcordtoolbox/spinalcordtoolbox#5023 (comment): Not present in web tutorials? Add?
Member
Author
There was a problem hiding this comment.
Update: No. (This corresponds to the -ldisc page that we removed from the course material due to duplication with the regular -ldisc, and so this should be removed, I think. Large FOVs are already covered by the "how many labels should I use" page?)
joshuacwnewton
commented
Jan 12, 2026
Comment on lines
+440
to
+442
| # Compute aSCOR (Adapted Spinal Cord Occupation Ratio) | ||
| # i.e. Spinal cord to canal ratio using the canal seg | ||
| sct_compute_ascor -i-SC t2_seg.nii.gz -i-canal t2_canal_seg.nii.gz -perlevel 1 -o ascor.csv |
Member
Author
There was a problem hiding this comment.
Note to self re: spinalcordtoolbox/spinalcordtoolbox#5023 (comment): Not present in web tutorials? Add?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context
In preparation for the upcoming SCT Course, we need to test all of the commands in the SCT Course slide deck.
My approach to testing the commands is to:
batch_single_subject.shcontains exactly the same commands as the SCT Course slide deck.PR description
To make "step 1" easier, this PR adds:
sct_commands (from both the slides and the scripts) and compares them.