Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update batch_single_subject.sh and process_data.sh to match changes to 2024 SCT Course Slides #25

Merged
merged 41 commits into from
Dec 9, 2024
Merged
Show file tree
Hide file tree
Changes from 21 commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
614f2a8
`batch_single_subject.sh`: `sct_deepseg_sc` -> `sct_deepseg`
joshuacwnewton Nov 26, 2024
3d98151
`batch_single_subject.sh`: Move `sct_label_utils` to registration sec…
joshuacwnewton Nov 26, 2024
fdaf976
`batch_single_subject.sh`: Move new features to end of script
joshuacwnewton Nov 26, 2024
ad7880c
`batch_single_subject.sh`: Add missing `-normalize-PAM50` command
joshuacwnewton Nov 26, 2024
3989683
`batch_single_subject.sh`: Update Compression title
joshuacwnewton Nov 26, 2024
51ab7ac
`batch_single_subject.sh`: Add missing registration commands
joshuacwnewton Nov 26, 2024
78e10b1
`batch_single_subject.sh`: Replace `sct_deepseg_sc` with contrast agn…
joshuacwnewton Nov 26, 2024
d9bab73
`batch_single_subject.sh`: Remove algo=dl section (no longer in course)
joshuacwnewton Nov 26, 2024
70e1482
`batch_single_subject.sh`: Fix GM-informed MT1 reg comments
joshuacwnewton Nov 26, 2024
3c7323d
`batch_single_subject.sh`: Add missing `sct_analyze_lesion -f` command
joshuacwnewton Nov 26, 2024
04234a8
`batch_single_subject.sh`: Add missing totalspineseg command
joshuacwnewton Nov 26, 2024
4e9553a
`batch_single_subject.sh`: Add missing MS lesion commands
joshuacwnewton Nov 26, 2024
576828a
`batch_single_subject.sh`: Add missing canal seg command
joshuacwnewton Nov 26, 2024
dea569b
`batch_single_subject.sh`: Comment out -f command (needs reg)
joshuacwnewton Nov 26, 2024
bb812ed
`process_data.sh`: Replace `sct_deepseg_sc` with `sct_deepseg`
joshuacwnewton Nov 27, 2024
abbc08d
`batch_single_subject.sh`: Apply rewording suggestions for comments
joshuacwnewton Nov 28, 2024
9ade09f
`batch_single_subject.sh`: `t2_seg.nii.gz` -> `t2_rootlets.nii.gz`
joshuacwnewton Nov 28, 2024
7708ee2
Added missing `-vertfile` flag
SomeoneInParticular Nov 28, 2024
3ecf314
batch_single_subject.sh; updated lumbar-specific label_utils target p…
SomeoneInParticular Nov 28, 2024
73e874c
batch_single_subject.sh: Removed '-f cylinder' which is no longer use…
SomeoneInParticular Nov 28, 2024
a6d684c
batch_single_subject.sh: Added missing second-pass segmentation using…
SomeoneInParticular Nov 28, 2024
ce7466d
`process_data.sh`: Preserve `-p sct_deepseg_sc`
joshuacwnewton Nov 29, 2024
1a104c4
`process_data.sh`: Remove now-unneeded `contrast` argument
joshuacwnewton Nov 29, 2024
d54a612
`batch_single_subject.sh`: Remove rootlets/lesion sections
joshuacwnewton Nov 29, 2024
ee5d8dd
`batch_single_subject.sh`: Fix `-qc qc` -> `-qc ~/qc_singleSubj`
joshuacwnewton Nov 29, 2024
4034ad1
`batch_single_subject.sh`: Add missing `-qc ~/qc_singleSubj`
joshuacwnewton Nov 29, 2024
255ecf4
`batch_single_subject.sh`: Update "test" command to match slides
joshuacwnewton Dec 6, 2024
35acbd6
`batch_single_subject.sh`: Update section titles
joshuacwnewton Dec 6, 2024
0ade35a
`batch_single_subject.sh`: Compress lumbar reg command to 1 line
joshuacwnewton Dec 6, 2024
fba69f5
`batch_single_subject.sh`: Update `-sub` command to use `-thr 0`
joshuacwnewton Dec 6, 2024
4893e6f
`batch_single_subject.sh`: Update dmri/fmri reg to use T2 warps
joshuacwnewton Dec 6, 2024
07bd03d
`batch_single_subject.sh`: Add TSNR QC commands
joshuacwnewton Dec 6, 2024
953db59
`batch_single_subject.sh`: Move lesion analysis after MS seg
joshuacwnewton Dec 6, 2024
c286c24
`batch_single_subject.sh`: Reorder the "new features" section
joshuacwnewton Dec 6, 2024
23da235
`run_batch_script.yml`: Temporarily allow warnings
joshuacwnewton Dec 6, 2024
f0370b9
`batch_single_subject.sh`: Revert fMRI back to PAM50_t2.nii.gz
joshuacwnewton Dec 7, 2024
0897e68
`batch_single_subject.sh`: Change script version to v6.5
joshuacwnewton Dec 7, 2024
feff833
`data_multi_subject.sh`: Add note about commented-out commands
joshuacwnewton Dec 7, 2024
263189b
`run_batch_script.yml`: Split error checking into multiple steps
joshuacwnewton Dec 7, 2024
81d0f6a
`run_batch_script.yml`: Fix `grep` checks by adding `!`
joshuacwnewton Dec 7, 2024
0338ba6
`batch_single_subject.sh`: Add missing qc commands to lumbar sec.
joshuacwnewton Dec 9, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions multi_subject/process_data.sh
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,11 @@ segment_if_does_not_exist() {
if [[ -e "${FILESEGMANUAL}" ]]; then
echo "Found! Using manual segmentation."
rsync -avzh "${FILESEGMANUAL}" "${FILESEG}".nii.gz
sct_qc -i "${file}".nii.gz -s "${FILESEG}".nii.gz -p sct_deepseg_sc -qc "${PATH_QC}" -qc-subject "${SUBJECT}"
sct_qc -i "${file}".nii.gz -s "${FILESEG}".nii.gz -p sct_deepseg -qc "${PATH_QC}" -qc-subject "${SUBJECT}"
joshuacwnewton marked this conversation as resolved.
Show resolved Hide resolved
else
echo "Not found. Proceeding with automatic segmentation."
# Segment spinal cord
sct_deepseg_sc -i "${file}".nii.gz -c "${contrast}" -qc "${PATH_QC}" -qc-subject "${SUBJECT}"
sct_deepseg -task seg_sc_contrast_agnostic -i "${file}".nii.gz -qc "${PATH_QC}" -qc-subject "${SUBJECT}"
fi
}

Expand Down
143 changes: 97 additions & 46 deletions single_subject/batch_single_subject.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,21 @@ fi
# Spinal cord segmentation
# ======================================================================================================================

# Go to T2 contrast
# Go to T2 folder
cd data/t2
# Spinal cord segmentation (
sct_deepseg_sc -i t2.nii.gz -c t2 -qc ~/qc_singleSubj
# Spinal cord segmentation (using the new 2024 contrast-agnostic method)
sct_deepseg -task seg_sc_contrast_agnostic -i t2.nii.gz -qc ~/qc_singleSubj
# The default output is t2_seg.nii.gz
# You can also choose your own output filename using the “-o” argument
joshuacwnewton marked this conversation as resolved.
Show resolved Hide resolved
# sct_deepseg -task seg_sc_contrast_agnostic -i t2.nii.gz -o t2_seg_test.nii.gz

# To check the QC report, use your web browser to open the file qc_singleSubj/qc/index.html, which has been created in
# your home directory

# View the rest of the `sct_deepseg` tasks
sct_deepseg -h
# See also: https://spinalcordtoolbox.com/stable/user_section/command-line/sct_deepseg.html



# Vertebral labeling
Expand All @@ -59,17 +67,6 @@ sct_label_vertebrae -i t2.nii.gz -s t2_seg.nii.gz -c t2 -qc ~/qc_singleSubj
#sct_label_utils -i t2.nii.gz -create-viewer 3 -o label_c2c3.nii.gz -msg "Click at the posterior tip of C2/C3 inter-vertebral disc"
#sct_label_vertebrae -i t2.nii.gz -s t2_seg.nii.gz -c t2 -initlabel label_c2c3.nii.gz -qc ~/qc_singleSubj

# Create labels at C3 and T2 mid-vertebral levels. These labels are needed for template registration.
sct_label_utils -i t2_seg_labeled.nii.gz -vert-body 3,9 -o t2_labels_vert.nii.gz
# Generate a QC report to visualize the two selected labels on the anatomical image
sct_qc -i t2.nii.gz -s t2_labels_vert.nii.gz -p sct_label_utils -qc ~/qc_singleSubj

# OPTIONAL: You might want to completely bypass sct_label_vertebrae and do the labeling manually. In that case, we
# provide a viewer to do so conveniently. In the example command below, we will create labels at the inter-vertebral
# discs C2-C3 (value=3), C3-C4 (value=4) and C4-C5 (value=5).
#sct_label_utils -i t2.nii.gz -create-viewer 3,4,5 -o labels_disc.nii.gz -msg "Place labels at the posterior tip of each inter-vertebral disc. E.g. Label 3: C2/C3, Label 4: C3/C4, etc."




# Computing shape metrics
Expand All @@ -80,7 +77,7 @@ sct_process_segmentation -i t2_seg.nii.gz -vert 3:4 -vertfile t2_seg_labeled.nii
# Aggregate CSA value per level
sct_process_segmentation -i t2_seg.nii.gz -vert 3:4 -vertfile t2_seg_labeled.nii.gz -perlevel 1 -o csa_perlevel.csv
# Aggregate CSA value per slices
sct_process_segmentation -i t2_seg.nii.gz -z 30:35 -perslice 1 -o csa_perslice.csv
sct_process_segmentation -i t2_seg.nii.gz -z 30:35 -vertfile t2_seg_labeled.nii.gz -perslice 1 -o csa_perslice.csv

# A drawback of vertebral level-based CSA is that it doesn’t consider neck flexion and extension.
# To overcome this limitation, the CSA can instead be computed using the distance to a reference point.
Expand All @@ -90,13 +87,17 @@ sct_detect_pmj -i t2.nii.gz -c t2 -qc ~/qc_singleSubj
# Check the QC to make sure PMJ was properly detected, then compute CSA using the distance from the PMJ:
sct_process_segmentation -i t2_seg.nii.gz -pmj t2_pmj.nii.gz -pmj-distance 64 -pmj-extent 30 -o csa_pmj.csv -qc ~/qc_singleSubj -qc-image t2.nii.gz

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


# Computing normalized shape metrics for compressed data

# Quantifying spinal cord compression using maximum spinal cord compression (MSCC) and normalizing with database of healthy controls
# ======================================================================================================================
cd ../t2_compression
# Segment the spinal cord of the compressed spine
sct_deepseg_sc -i t2_compressed.nii.gz -c t2 -qc ~/qc_singleSubj
sct_deepseg -task seg_sc_contrast_agnostic -i t2_compressed.nii.gz -qc ~/qc_singleSubj
# Label the vertebrae using the compressed spinal cord segmentation
sct_label_vertebrae -i t2_compressed.nii.gz -s t2_compressed_seg.nii.gz -c t2 -qc ~/qc_singleSubj
# Generate labels for each spinal cord compression site.
Expand Down Expand Up @@ -146,10 +147,33 @@ fsleyes t2.nii.gz -cm greyscale t2_seg.nii.gz -cm subcortical -a 70.0 &
# Registering T2 data to the PAM50 template
# ======================================================================================================================
cd ../t2

# Create labels at C3 and T2 mid-vertebral levels. These labels are needed for template registration.
sct_label_utils -i t2_seg_labeled.nii.gz -vert-body 3,9 -o t2_labels_vert.nii.gz
# Generate a QC report to visualize the two selected labels on the anatomical image
sct_qc -i t2.nii.gz -s t2_labels_vert.nii.gz -p sct_label_utils -qc ~/qc_singleSubj

# OPTIONAL: You might want to completely bypass sct_label_vertebrae and do the labeling manually. In that case, we
# provide a viewer to do so conveniently. In the example command below, we will create labels at the inter-vertebral
# discs C2-C3 (value=3), C3-C4 (value=4) and C4-C5 (value=5).
#sct_label_utils -i t2.nii.gz -create-viewer 3,4,5 -o labels_disc.nii.gz -msg "Place labels at the posterior tip of each inter-vertebral disc. E.g. Label 3: C2/C3, Label 4: C3/C4, etc."

# Register t2->template.
sct_register_to_template -i t2.nii.gz -s t2_seg.nii.gz -l t2_labels_vert.nii.gz -c t2 -qc ~/qc_singleSubj
# Note: By default the PAM50 template is selected. You can also select your own template using flag -t.

joshuacwnewton marked this conversation as resolved.
Show resolved Hide resolved
# 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

# 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

# Register t2->template in compressed cord (example command)
# In case of highly compressed cord, the algo columnwise can be used, which allows for more deformation than bsplinesyn.
# NB: In the example below, the registration is done in the subject space (no straightening) using a single label point at disc C3-C4 (<LABEL_DISC>).
# sct_register_to_template -i <IMAGE> -s <SEGMENTATION> -ldisc <LABEL_DISC> -ref subject -param step=1,type=seg,
# algo=centermassrot:step=2,type=seg,algo=columnwise

# Warp template objects (T2, cord segmentation, vertebral levels, etc.). Here we use -a 0 because we don’t need the
# white matter atlas at this point.
sct_warp_template -d t2.nii.gz -w warp_template2anat.nii.gz -a 0 -qc ~/qc_singleSubj
Expand All @@ -167,7 +191,7 @@ fsleyes t2.nii.gz -cm greyscale -a 100.0 label/template/PAM50_t2.nii.gz -cm grey
# Go to mt folder
cd ../mt
# Segment cord
sct_deepseg_sc -i mt1.nii.gz -c t2 -qc ~/qc_singleSubj
sct_deepseg -task seg_sc_contrast_agnostic -i mt1.nii.gz -qc ~/qc_singleSubj

# Create a close mask around the spinal cord for more accurate registration (i.e. does not account for surrounding
# tissue which could move independently from the cord)
Expand Down Expand Up @@ -208,27 +232,6 @@ sct_compute_mtr -mt0 mt0_reg.nii.gz -mt1 mt1.nii.gz



# Contrast-agnostic registration
# ======================================================================================================================

# 1. T2w preprocessing (cropping around spinal cord)
cd ../t2
sct_deepseg_sc -i t2.nii.gz -c t2 -qc ~/qc_singleSubj
sct_create_mask -i t2.nii.gz -p centerline,t2_seg.nii.gz -size 35mm -f cylinder -o mask_t2.nii.gz
sct_crop_image -i t2.nii.gz -m mask_t2.nii.gz

# 2. T1w preprocessing (cropping around spinal cord)
cd ../t1
sct_deepseg_sc -i t1.nii.gz -c t1 -qc ~/qc_singleSubj
sct_create_mask -i t1.nii.gz -p centerline,t1_seg.nii.gz -size 35mm -f cylinder -o mask_t1.nii.gz
sct_crop_image -i t1.nii.gz -m mask_t1.nii.gz

# 3. Perform registration
# NB: `-dseg` is not necessary for registration, but is provided for the `-qc` reporting to help with spinal cord visualization
sct_register_multimodal -i t1_crop.nii.gz -d ../t2/t2_crop.nii.gz -param step=1,type=im,algo=dl -qc ~/qc_singleSubj -dseg ../t2/t2_seg.nii.gz



# Registering lumbar data to the PAM50 template
# ======================================================================================================================
cd ../t2_lumbar
Expand All @@ -243,7 +246,7 @@ sct_deepseg -i t2_lumbar.nii.gz -task seg_lumbar_sc_t2w
#
# However, since this is an automated script with example data, we will place the labels at known locations for the
# sake of reproducing the results in the tutorial.
sct_label_utils -i t2_lumbar.nii.gz -create 22,77,187,17:27,79,80,60 -o t2_lumbar_labels.nii.gz
sct_label_utils -i t2_lumbar.nii.gz -create 27,76,187,17:27,79,80,60 -o t2_lumbar_labels.nii.gz

# Register the image to the template using segmentation and labels
sct_register_to_template -i t2_lumbar.nii.gz \
joshuacwnewton marked this conversation as resolved.
Show resolved Hide resolved
Expand All @@ -262,7 +265,7 @@ cd ../t2s
# Segment gray matter (check QC report afterwards)
sct_deepseg_gm -i t2s.nii.gz -qc ~/qc_singleSubj
# Spinal cord segmentation
sct_deepseg_sc -i t2s.nii.gz -c t2s -qc ~/qc_singleSubj
sct_deepseg -task seg_sc_contrast_agnostic -i t2s.nii.gz -qc ~/qc_singleSubj
# Subtract GM segmentation from cord segmentation to obtain WM segmentation
sct_maths -i t2s_seg.nii.gz -sub t2s_gmseg.nii.gz -o t2s_wmseg.nii.gz

Expand Down Expand Up @@ -296,8 +299,9 @@ sct_register_multimodal -i "${SCT_DIR}"/data/PAM50/template/PAM50_t2s.nii.gz -is
# Warp template
sct_warp_template -d t2s.nii.gz -w warp_template2t2s.nii.gz -qc ~/qc_singleSubj

# Register another metric while reusing newly-created GM-informed warping fields
cd ../mt
# Register template->mt via t2s to account for GM segmentation
# Register template->mt using `-initwarp` with t2s to account for GM segmentation
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
# Warp template
sct_warp_template -d mt1.nii.gz -w warp_template2mt.nii.gz -qc ~/qc_singleSubj
Expand Down Expand Up @@ -330,16 +334,16 @@ cd ../dmri
sct_dmri_separate_b0_and_dwi -i dmri.nii.gz -bvec bvecs.txt
# Segment SC on mean dMRI data
# Note: This segmentation does not need to be accurate-- it is only used to create a mask around the cord
sct_deepseg_sc -i dmri_dwi_mean.nii.gz -c dwi -qc ~/qc_singleSubj
sct_deepseg -task seg_sc_contrast_agnostic -i dmri_dwi_mean.nii.gz -qc ~/qc_singleSubj
# Create mask (for subsequent cropping)
sct_create_mask -i dmri_dwi_mean.nii.gz -p centerline,dmri_dwi_mean_seg.nii.gz -f cylinder -size 35mm
sct_create_mask -i dmri_dwi_mean.nii.gz -p centerline,dmri_dwi_mean_seg.nii.gz -size 35mm

# Motion correction (moco)
sct_dmri_moco -i dmri.nii.gz -m mask_dmri_dwi_mean.nii.gz -bvec bvecs.txt -qc ~/qc_singleSubj -qc-seg dmri_dwi_mean_seg.nii.gz
# Check results in the QC report

# Segment SC on motion-corrected mean dwi data (check results in the QC report)
sct_deepseg_sc -i dmri_moco_dwi_mean.nii.gz -c dwi -qc ~/qc_singleSubj
sct_deepseg -task seg_sc_contrast_agnostic -i dmri_moco_dwi_mean.nii.gz -qc ~/qc_singleSubj

# Register template->dwi via t2s to account for GM segmentation
# Tips: Here we use the PAM50 contrast t1, which is closer to the dwi contrast (although we are not using type=im in
Expand Down Expand Up @@ -392,15 +396,62 @@ sct_warp_template -d fmri_moco_mean.nii.gz -w warp_template2fmri.nii.gz -a 0 -qc

cd ../t1
# Segment T1-weighted image (to be used in later steps)
sct_deepseg_sc -i t1.nii.gz -c t1
sct_deepseg -task seg_sc_contrast_agnostic -i t1.nii.gz

# Smooth spinal cord along centerline (extracted from the segmentation)
sct_smooth_spinalcord -i t1.nii.gz -s t1_seg.nii.gz
# Tips: use flag "-sigma" to specify smoothing kernel size (in mm)

# Second-pass segmentation using the smoothed anatomical image
sct_deepseg_sc -i t1_smooth.nii.gz -c t1 -qc ~/qc_singleSubj

# Align the spinal cord in the right-left direction using slice-wise translations.
sct_flatten_sagittal -i t1.nii.gz -s t1_seg.nii.gz
# Note: Use for visualization purposes only



# New features (SCT v6.5, December 2024)
# ======================================================================================================================

# Lesion analysis for SCI and MS lesions
joshuacwnewton marked this conversation as resolved.
Show resolved Hide resolved
cd ../t2_lesion
# Segment the spinal cord and intramedullary lesion using the SCIsegV2 model
# Note: t2.nii.gz contains a fake lesion for the purpose of this tutorial
sct_deepseg -i t2.nii.gz -task seg_sc_lesion_t2w_sci -qc ~/qc_singleSubj
# Note: Two files are output:
# - t2_sc_seg.nii.gz: the spinal cord segmentation
# - t2_lesion_seg.nii.gz: the lesion segmentation
# Check results using FSLeyes
fsleyes t2.nii.gz -cm greyscale t2_sc_seg.nii.gz -cm red -a 70.0 t2_lesion_seg.nii.gz -cm blue-lightblue -a 70.0 &
# Compute various morphometric measures, such as number of lesions, lesion length, lesion volume, etc.
sct_analyze_lesion -m t2_lesion_seg.nii.gz -s t2_sc_seg.nii.gz -qc ~/qc_singleSubj

# Lesion analysis using PAM50 (the -f flag is used to specify the folder containing the atlas/template)
# Note: You must go through the "Register to Template" steps (labeling, registration) first
# sct_analyze_lesion -m t2_lesion_seg.nii.gz -s t2_sc_seg.nii.gz -f label -qc ~/qc_singleSubj

# Note: We also have a contrast-agnostic segmentation command for MS lesions, too:
sct_deepseg -i t2.nii.gz -task seg_ms_lesion -qc ~/qc_singleSubj
# As well as a segmentation command tailored to MP2RAGE MS lesions
sct_deepseg -i t2.nii.gz -task seg_ms_lesion_mp2rage -qc ~/qc_singleSubj

# Rootlets segmentation
cd ../t2
# Segment the spinal nerve rootlets
sct_deepseg -i t2.nii.gz -task seg_spinal_rootlets_t2w -qc ~/qc_singleSubj
# Check results using FSLeyes
fsleyes t2.nii.gz -cm greyscale t2_rootlets.nii.gz -cm subcortical -a 70.0 &
joshuacwnewton marked this conversation as resolved.
Show resolved Hide resolved

# Canal segmentation
sct_deepseg -i t2.nii.gz -task canal_t2w -qc ~/qc_singleSubj
# Check results using FSLeyes
fsleyes t2.nii.gz -cm greyscale t2_canal_seg_seg.nii.gz -cm red -a 70.0 &

# Full spinal segmentation (Vertebrae, Intervertebral discs, Spinal cord and Spinal canal)
# Segment using totalspineseg
sct_deepseg -i t2.nii.gz -task totalspineseg -qc ~/qc_singleSubj
# Check results using FSLeyes
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 &
# Return to parent directory
cd ..
Loading