-
Notifications
You must be signed in to change notification settings - Fork 0
Update the script to SCT v7.0 #27
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
base: main
Are you sure you want to change the base?
Conversation
thanks @KahinaBch maybe put the following information in the body of the PR instead of just commenting!
You could also add what command to run to test it out. Here is an example of a PR body: spinalcordtoolbox/spinalcordtoolbox#4948 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tested the PR running the command on the updated version of dcm-zurich:
sct_run_batch -path-data ~/datasets/dcm-zurich/ -path-out ~/process_results/dcm-zurich_kahina -script scripts/process_data_dcm-zurich.sh -jobs 1 -include sub-001
And got the following error:
1/ses-M0_*T2w.*' .
sending incremental file list
rsync: [sender] link_stat "/home/GRAMES.POLYMTL.CA/sebeda/datasets/dcm-zurich/sub-001/ses-M0/anat/sub-001/ses-M0_*T2w.*" failed: No such file or directory (2)
sent 19 bytes received 12 bytes 62.00 bytes/sec
total size is 0 speedup is 0.00
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1330) [sender=3.2.3]
Error: Processing of subject sub-001 failed
I think is because we did not have session in the previous version of dcm-zurich, on what version is the script for?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for these updates @KahinaBch ! I left some small comments,
We could also consider computing the compression metrics on the spinal canal too (sct_compute_compression
)
# Note: Updated to use sct_label_vertebrae -discfile instead of deprecated sct_label_utils -disc | ||
# Context: https://github.com/spinalcordtoolbox/spinalcordtoolbox/pull/4072 | ||
sct_label_utils -i ${file_t2_ax_seg}.nii.gz -disc ${file_t2_ax_labels}.nii.gz -o ${file_t2_ax_seg}_labeled.nii.gz | ||
sct_label_vertebrae -i ${file_t2_ax}.nii.gz -s ${file_t2_ax_seg}.nii.gz -discfile ${file_t2_ax_labels}.nii.gz -c t2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Migth also be worth testing using totalspineseg directly on the axial image and compare results!
scripts/process_data_dcm-zurich.sh
Outdated
|
||
# Check if vertebral-level metrics CSV already exists to avoid reprocessing | ||
# WOUld this name be the standard name for vertebral-level metrics CSV? | ||
vertebral_metrics_csv="${PATH_RESULTS}/vertebral_level_metrics.csv" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this variable is never used
I just committed a new version that should take new folder format into consideration. The default option is baseline and it should be able to consider a specified timepoints when passed as argument. |
@KahinaBch I just retested the PR on SCT 7.0, and the argument I would suggest to describe exactly how to test the script with following details in the PR body:
It would make it easier and making sure I am testing the right thing 😃 |
Removal of useless lines of code and correction of comments Co-authored-by: Sandrine Bédard <[email protected]>
Description
This PR aim is to update the script to the new sct v7.2 version. New metric computation were added: Spinal cord metrics (CSA, AP, RL), Canal metrics (CSA, AP, RL), Lesion metrics and aSCOR. Adapting to the new folder organization having different time points per individual, default is set as baseline (ses-M0).
How to test:
Test on
sub-001
with default session.Version of SCT : git-master-1e16eb489497137b0f2ce52c08663e4accdb270f
Version of dcm_zurich dataset : 34a6393d74
TODO: