[ITK Community] [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://public.kitware.com/pipermail/community/attachments/20140212/697e2c1d/attachment-0002.html>
-------------- next part --------------
_____________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html

Kitware offers ITK Training Courses, for more information visit:
http://www.kitware.com/products/protraining.php

Please keep messages on-topic and check the ITK FAQ at:
http://www.itk.org/Wiki/ITK_FAQ

Follow this link to subscribe/unsubscribe:
http://www.itk.org/mailman/listinfo/insight-users


More information about the Community mailing list