[Neuroimaging] How to apply an affine transform estimated from ITK?

François Rousseau francois.rousseau at telecom-bretagne.eu
Wed Jul 22 15:00:03 CEST 2015


Hi everyone,

I’m trying to apply an affine transform estimated from an ITK-based program onto a nifti image using nibabel.

The transform has to be applied in the world coordinate space. The issue lies in the transition from index space to world space.

Using nibabel, I’ve to apply the affine matrix (Img.affine) to the index point.
With ITK, I use this : Img->TransformIndexToPhysicalPoint() which does the same job.

However, the results are not the same. There is a minus sign for x and y. I don’t understand where the issue comes from. Any help?

Thank you,
François
PS : I’ve noticed something weird to me. When ITK indicates that the image is in RAS, nibabel says LPI !


More information about the Neuroimaging mailing list