Closed valosekj closed 9 months ago
Okay, when checking the process_data.sh script more deeply, it turned out that T2w disc labels are brought to T1w image (instead of using git-annex T1w labels as I originaly thought in my previous comment):
Checking the corresponding log:
$ grep "sct_apply_transfo -i ./anat/sub-brnoUhb04_T2w_seg_labeled_discs.nii.gz -d ./anat/sub-brnoUhb04_T1w.nii.gz" ~/duke/projects/ivadomed/contrast-agnostic-seg/data_processed_sg_2023-03-10_NO_CROP/log/process_data_sub-brnoUhb04.log
+ sct_apply_transfo -i ./anat/sub-brnoUhb04_T2w_seg_labeled_discs.nii.gz -d ./anat/sub-brnoUhb04_T1w.nii.gz -w ./anat/warp_sub-brnoUhb04_T2w2sub-brnoUhb04_T1w.nii.gz -x label -o ./anat/sub-brnoUhb04_T1w_seg_labeled_discs.nii.gz
Something apparently happened during this transformation because the warped disc labels file (sub-brnoUhb04_T1w_seg_labeled_discs.nii.gz
) is empty:
$ cd ~/duke/projects/ivadomed/contrast-agnostic-seg/data_processed_sg_2023-03-10_NO_CROP/data_processed/sub-brnoUhb04/anat
$ sct_label_utils -i sub-brnoUhb04_T2w_seg_labeled_discs.nii.gz -display
--
Spinal Cord Toolbox (git-master-a11e9f1f5675fe6f25f3aceda4ceb5d13ad07c59)
sct_label_utils -i sub-brnoUhb04_T2w_seg_labeled_discs.nii.gz -display
--
Position=(27,159,225) -- Value= 1.0
Position=(29,160,194) -- Value= 2.0
Position=(29,160,177) -- Value= 3.0
Position=(28,160,155) -- Value= 4.0
Position=(29,159,131) -- Value= 5.0
Position=(28,154,109) -- Value= 6.0
Position=(28,148,92) -- Value= 7.0
Position=(28,136,70) -- Value= 8.0
Position=(29,122,48) -- Value= 9.0
Position=(29,105,26) -- Value= 10.0
All labels (useful syntax):
27,159,225,1.0:29,160,194,2.0:29,160,177,3.0:28,160,155,4.0:29,159,131,5.0:28,154,109,6.0:28,148,92,7.0:28,136,70,8.0:29,122,48,9.0:29,105,26,10.0 /1.5s
$ sct_label_utils -i sub-brnoUhb04_T1w_seg_labeled_discs.nii.gz -display
--
Spinal Cord Toolbox (git-master-a11e9f1f5675fe6f25f3aceda4ceb5d13ad07c59)
sct_label_utils -i sub-brnoUhb04_T1w_seg_labeled_discs.nii.gz -display
--
All labels (useful syntax):
It seems that the ./anat/warp_sub-brnoUhb04_T2w2sub-brnoUhb04_T1w.nii.gz
warping field is corrupted. Maybe since T1w and T2w images are not aligned?
Potential solution: use GT T1w labels from git-annex
Disc labels files produced by process_data.sh script are empty for
sub-brnoUhb
andsub-tokyo750w
sites. See, for example,sub-brnoUhb04
:Which is strange, because the git-annexed disc labels files seem fine: