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

Default qform/sform combination not according to NIFTI spec #63

Open
gdevenyi opened this issue Feb 4, 2020 · 1 comment
Open

Default qform/sform combination not according to NIFTI spec #63

gdevenyi opened this issue Feb 4, 2020 · 1 comment

Comments

@gdevenyi
Copy link
Contributor

gdevenyi commented Feb 4, 2020

According to the NIFTI spec:
https://nifti.nimh.nih.gov/nifti-1/documentation/nifti1fields/nifti1fields_pages/qsform.html

#define NIFTI_XFORM_UNKNOWN      0 /! Arbitrary coordinates (Method 1). /
#define NIFTI_XFORM_SCANNER_ANAT 1 /! Scanner-based anatomical coordinates /
#define NIFTI_XFORM_ALIGNED_ANAT 2 /! Coordinates aligned to another file's, or to anatomical "truth".            /
#define NIFTI_XFORM_TALAIRACH    3 /! Coordinates aligned to Talairach-Tournoux Atlas; (0,0,0)=AC, etc. /
#define NIFTI_XFORM_MNI_152      4 /! MNI 152 normalized coordinates. /

Given that bruker2nifti is converting from a scanner, I believe the default qform/sform code should both be 1.

@SebastianoF
Copy link
Owner

Thanks, I admit that the choice for a default is a bit arbitrary.

It could also be qform_code = 1 and sform_code = 0, as we may not want to repeat the same information twice.

Although having sform_code < 1 may lead to issues in some registration software considering the sform as initialisation, and applying coarse initialisation if the sform_code = 0. This was the reason why, as the images are converted, the scanner reference and the template reference coincides, considering the scanner origin as the template, which provided a good initialisation.

I'll keep this issue open open to further suggestions from users, and in mind for a next major release.

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

No branches or pull requests

2 participants