[Insight-users] Bug? Angles orientation in Rigid2DTransform subclasses

Tom Vercauteren tom.vercauteren at gmail.com
Mon Feb 21 12:39:41 EST 2005


Hello everybody,

Sorry for posting this once more but I guess my previous message
didn't ring any bell because of the release of ITK 2.0.

It seems to me that the angles in Rigid2DTransform subclasses are
given with clockwise orientation instead of the usual
counter-clockwise one.
The following lines can be found in itkEuler2DTransform.txx,
itkCenteredRigid2DTransform.txx and itkSimilarity2DTransform.txx.
/////////////
const double ca = cos( angle );
const double sa = sin( angle );

this->m_RotationMatrix[0][0]= ca;    this->m_RotationMatrix[0][1]=-sa;
this->m_RotationMatrix[1][0]= sa;     this->m_RotationMatrix[1][1]= ca;
////////////////

In itkAffineTransform.txx (used in
Examples/Filtering/ResampleImageFilter3.cxx) the function Rotate2D is
using the usual orientation:
//////////////////////
trans[0][0] =  cos(angle);
trans[0][1] =  sin(angle);
trans[1][0] = -sin(angle);
trans[1][1] =  cos(angle);
/////////////////////

Am I missing something here or is it a real bug?

Best regards,

Tom Vercauteren


More information about the Insight-users mailing list