[Insight-users] inverse of affine transform using transform->GetInverseTransform();
John D
john.dz.eis at gmail.com
Wed Feb 12 12:40:28 EST 2014
Hello users,
I have a problem where I need to compute the inverse of an affine
transform in 2D.
I am seeing a problem in the results. Lets say my affine matrix has just
pure rotation at 45 degree.
So my A matrix is [cost(45) -sin(45); sin(45 cos(45)]. There is no
translation and so [Tx Ty] = [0 0]. I am trying to rotate a square that is
6000 on each side and my center of rotation is mid point of the square
[3000 3000]
When I use transform->GetInverseTransform() to find the inverse transform
I am getting the correct coordinates for the A matrix. However the returned
translations in the inverse matrix are wrong. I would have expected the Tx,
Ty to be [0 0] in the inverse also since rotation is wrt to the center.
However I am getting [Tx, Ty] = [3000, -1243]
What am I missing? Also when computing the inverse, will the center of
rotation get changed? How can I get the new center of rotation?
Thanks,
John
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20140212/697e2c1d/attachment.html>
More information about the Insight-users
mailing list