[Insight-users] Changes in itkAffineTransform.txx from 181 to 201
Ashish Poddar
ahpoddar at gmail.com
Thu Apr 7 20:14:14 EDT 2005
Hi,
I was running a program that was working fine in ITK 1.8.1. Recently I
installed ITK 2.0.1 and it started behaving in unexpected way...
What I was doing : Rotating in 3D using Centered Affine Transform and
computing the metric to find an initial estimate for the angle
for (double angle=initangle; angle<=finalangle; angle+=stepsize)
{
double rot_angle = (angle) * PI / 180; // radians
transform->SetIdentity();
transform->SetCenter( center );
transform->SetTranslation(trans);
transform->Rotate3D( axis, rot_angle );
// some processing
}
in the new version it started giving me weird error saying image is
out of range!! so metric cant be computed ... I debugged it a bit to
find the cause... Rotate3D function was somehow assigning some weird
values for the translation !!
I traced the source of this error back to itkAffineTransform.txx...
and there was surely a change in the code
From:
......
// Compose rotation matrix with the existing matrix
if (pre)
{
m_Matrix = m_Matrix * trans;
}
else
{
m_Matrix = trans * m_Matrix;
m_Offset = trans * m_Offset;
}
RecomputeInverse();
return;
}
To:
......
// Compose rotation matrix with the existing matrix
if (pre)
{
m_Matrix = m_Matrix * trans;
}
else
{
m_Matrix = trans * m_Matrix;
m_Offset = trans * m_Offset;
}
this->ComputeTranslation();
m_MatrixMTime.Modified();
this->Modified();
return;
}
Why is Translation being computed in Rotate3D function?? is it by
design or some coverup for some other bug??
any idea on this would be highly appreciated
with regards,
Ashish.
--
Ashish Poddar
Have an acceptable reason for accepting anything.
Y:ashish_poddar | MSN:ashish_poddar at yahoo.comfor (double
angle=initangle; angle<=finalangle; angle+=stepsize)
--
Ashish Poddar
Have an acceptable reason for accepting anything.
Y:ashish_poddar | MSN:ashish_poddar at yahoo.com
More information about the Insight-users
mailing list