[Insight-users] itkEuler2DTransform: modification to m_RotationMatrix during Compose is lost

Charl P. Botha c.p.botha at ewi.tudelft.nl
30 Mar 2004 15:46:43 +0200


I've reported the following as Bug #726:

The Python example below shows how an Euler2DTransform simply loses
rotation during a transform concatenation.  This is due to the fact that
itk::Rigid2DTransform::Compose() concatenates the m_RotationMatrix, but
that there's no code to set the new itk::Euler2DTransform::m_Angle from
the m_RotationMatrix.  In this way, the rotation is lost.

# create two Euler2D transforms and set to identity
a = itk.itkEuler2DTransform_New()
a.SetIdentity()

b = itk.itkEuler2DTransform_New()
b.SetIdentity()

# set and confirm rotation to 0.2
a.GetParameters().SetElement(0,0.2)
a.SetRotation(0.2)
a.GetParameters().GetElement(0)
0.20000000000000001

# concatenate b and a
b.Compose(a.GetPointer(),0)

# resultant rotation is 0.0!
b.GetParameters().GetElement(0)
0.0

-- 
charl p. botha http://cpbotha.net/ http://visualisation.tudelft.nl/