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

Should we ensure transform is rigid on image load? #1364

jdtournier opened this Issue Jun 10, 2018 · 1 comment


None yet
2 participants
Copy link

jdtournier commented Jun 10, 2018

As discussed on #1363.

Suggestion to add checks to verify that the transform is rigid-body, and actually modify it to the nearest rigid transform on load (commit 0f41e46), reverted in 2f9c558). It's not obvious what to do here, especially if we want to handle NIfTI consistently (qform can only represent a rigid transform). Would this break the registration apps?

@jdtournier jdtournier added the question label Jun 10, 2018


This comment has been minimized.

Copy link

maxpietsch commented Jun 10, 2018

Currently, we warn when transforming the header with a non-orthonormal matrix and when viewing the image, if the voxel spacing is inconsistent.

mrtransform a.mif -linear Affines.txt at.nii  # [WARNING] the input linear transform is not orthonormal
mrview b.mif -overlay.load at.nii -overlay.opacity 0.3 # [WARNING] voxel spacings inconsistent

The above overlay uses the wrong transformation but It works for .mif files.

For Nifits, it might make sense to force rigid transformations in the header but I would not get rid of this feature for .mif. But this means we'd need to regrid .mif images when converting them to .nii. Also, I think we are not the only software package that allows applying non-rigid transformations to the header to avoid resampling. So, I'd keep things as they are, given that the user has been warned...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment