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

T1w image and its manual segmentation does not match in 3 sub-brnoUhb scans #153

Closed
renelabounek opened this issue Dec 13, 2023 · 6 comments · Fixed by #159
Closed

T1w image and its manual segmentation does not match in 3 sub-brnoUhb scans #153

renelabounek opened this issue Dec 13, 2023 · 6 comments · Fixed by #159

Comments

@renelabounek
Copy link
Contributor

I see 3 scans where manual T1w segmentation mismatch T1w image on the latest database release. It seems like qform and sform matrices needs tobe matched.

See yourself:
cd data-multi-subject
fsleyes sub-brnoUhb02/anat/sub-*_T1w.nii.gz derivatives/labels/sub-brnoUhb02/anat/sub-*_T1w_seg-manual.nii.gz &
fsleyes sub-brnoUhb07/anat/sub-*_T1w.nii.gz derivatives/labels/sub-brnoUhb07/anat/sub-*_T1w_seg-manual.nii.gz &
fsleyes sub-brnoUhb08/anat/sub-*_T1w.nii.gz derivatives/labels/sub-brnoUhb08/anat/sub-*_T1w_seg-manual.nii.gz &

I have not checked T2w and T2star segmentation for these subjects. There may be the same issue.

This issue impacts quality of process_data.sh outcomes as noted here

@renelabounek
Copy link
Contributor Author

It is not just about transformation matrices. The images have different resolutions:

fslinfo sub-brnoUhb02/anat/sub-*_T1w.nii.gz
data_type INT16
dim1 188
dim2 512
dim3 512
dim4 1
datatype 4
pixdim1 0.999941
pixdim2 0.625000
pixdim3 0.625000
pixdim4 0.004784
cal_max 0.000000
cal_min 0.000000
file_type NIFTI-1+

fslinfo derivatives/labels/sub-brnoUhb02/anat/sub-*_T1w_seg-manual.nii.gz
filename derivatives/labels/sub-brnoUhb02/anat/sub-brnoUhb02_T1w_seg-manual.nii.gz
data_type UINT16
dim1 188
dim2 320
dim3 320
dim4 1
datatype 512
pixdim1 0.999941
pixdim2 1.000000
pixdim3 1.000000
pixdim4 0.000000
cal_max 0.000000
cal_min 0.000000
file_type NIFTI-1+

@renelabounek
Copy link
Contributor Author

T2w and T2star segmentations match. So the issue is only with T1w scans.

@jcohenadad
Copy link
Member

I suspect these issues came up when we had to re-upload the properly defaced images 082dd0d

@renelabounek
Copy link
Contributor Author

I suspect these issues came up when we had to re-upload the properly defaced images 082dd0d

That seems to be the cause. Luckily, only 3 scans seem affected. Do you need help to re-segment these 3 scans? Or is it easier to fix it directly in Montreal? Either ways are fine with me.

@jcohenadad
Copy link
Member

Do you need help to re-segment these 3 scans?

The segmentation should absolutely not be re-done. It is only a matter of resampling the T1w data so that it matches that of the segmentation. Given the large matrix of the T1w (512x512, due to post-acquisition oversampling by the proprietary MR software) I suspect during the early curation process we resampled all T1w scans to ~1mm iso. So in principle by applying this transformation we should be able to get the T1w in the space of the T1w_seg.

@jcohenadad
Copy link
Member

I also noticed the same issue (ie: mismatch of q/sform between image and segmentation) for T2w images. Eg: sub-cmrrb03_T2w_seg-manual.nii.gz. We should ideally resample/reorient the segmentations.

In the meantime, to properly use the segmentations, the native images should be preprocessed (reorientation, resampling) as instructed in the analysis pipeline:

https:/spine-generic/spine-generic/blob/master/process_data.sh#L150-L151

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants