data-multi-subject
data-multi-subject copied to clipboard
Some subjects have different image and label dimensions and resolution
Some subjects have different image and label dimensions and resolution.
For example, for subject sub-beijingGE02
, T2w image has different dim
and pixdim
than T2w spinal cord segmentation:
$ sct_image -i sub-beijingGE02/anat/sub-beijingGE02_T2w.nii.gz -header | grep dim | head -2
dim [3, 56, 256, 256, 1, 1, 1, 1]
pixdim [1.0, 0.8, 1.0, 1.0, 0.0, 0.0, 0.0, 0.0]
$ sct_image -i derivatives/labels/sub-beijingGE02/anat/sub-beijingGE02_T2w_seg-manual.nii.gz -header | grep dim | head -2
dim [3, 56, 320, 320, 1, 1, 1, 1]
pixdim [-1.0, 0.799994, 0.8, 0.8, 1.0, 1.0, 1.0, 1.0]
This discrepancy probably originates from processing, where T2w
image was resampled and then segmented:
# T2
# ------------------------------------------------------------------------------
file_t2="${SUBJECT}_T2w"
# Reorient to RPI and resample to 0.8mm iso (supposed to be the effective resolution)
sct_image -i ${file_t2}.nii.gz -setorient RPI -o ${file_t2}_RPI.nii.gz
sct_resample -i ${file_t2}_RPI.nii.gz -mm 0.8x0.8x0.8 -o ${file_t2}_RPI_r.nii.gz
file_t2="${file_t2}_RPI_r"
# Segment spinal cord (only if it does not exist)
segment_if_does_not_exist $file_t2 "t2"
In other words, data-multi-subject contains the original non-resampled T2w image but SC seg obtained from resampled T2w image.
So far, I noticed this for sub-beijingGE
and sub-brnoUhb
subjects.