[Insight-users] Translation, Rotation and Scaling

Ramón Casero Cañas ramon.casero at comlab.ox.ac.uk
Sat Sep 5 17:58:11 EDT 2009


Yang, Jinzhong wrote:
> This is simply an affine transform itk::AffineTransform. 


Hi Jinzhong,

Am I wrong to say that the affine transform includes translation, 
rotation and anisotropic scaling, as John wants, but also shear, that he 
doesn't?

John, similarity transformations include isotropic scaling, and in 2D 
they have 4 degrees of freedom (2 for translation + 1 for scaling + 1 
for rotation).

Affine transformations have 6 degrees of freedom, while the 
transformation you want would have 5 parameters  (2 for translation + 2 
for scaling + 1 for rotation).

Maybe something you can do is combine an itk::ScaleTransform 
(anisotropic scaling) with an itk::Rigid2DTransform (translation and 
rotation).

http://www.itk.org/Doxygen/html/classitk_1_1ScaleTransform.html
http://www.itk.org/Doxygen/html/classitk_1_1Rigid2DTransform.html

although swapping from one optimization to the other may not be worth 
the hassle, and you are better off just using an affine transformation, 
as Jinzhong suggests.

Best regards,

Ramon.

-- 
Ramón Casero Cañas, DPhil

Computational Biology, Computing Laboratory
University of Oxford
Wolfson Building, Parks Rd
Oxford OX1 3QD

tlf     +44 (0) 1865 610807
web     http://web.comlab.ox.ac.uk/people/Ramon.CaseroCanas
photos  http://www.flickr.com/photos/rcasero/


More information about the Insight-users mailing list