[Insight-users] coniditions on initial regiatration transform
Karthik Krishnan
Karthik.Krishnan at kitware.com
Wed Jun 28 17:17:04 EDT 2006
The transform's behaviour is perfectly justified. (and you need to brush
up your math :) )
The transform you've instantiated in that test code is a
VersorRigid3DTransform, but the matrix you've supplied does not qualify
as a rotation matrix. For a rotation matrix. Given a Rotation matrix R
in column representation R = (u v w), the three column vectors are
mutually orthogonal,
ie: u x v = w; v x w = u; w x u = v;
Rick Shilling wrote:
> Hi Karthik-
>
> Attached is the source file (75 lines of code) that demonstrates the
> stated problem. You'll have to un/comment the two different matrices
> if you want to run it. In debug mode, when I stepped into
>
> MatrixOffsetTransformBase<TScalarType, NInputDimensions,
> NOutputDimensions>
> ::TransformPoint(const InputPointType &point) const
> {
> return m_Matrix * point + m_Offset;
> }
>
> with
> matrix[0][0]=0; matrix[0][1]=0; matrix[0][2]=-1; offset[0]=10;
> matrix[1][0]=0; matrix[1][1]=1; matrix[1][2]=0; offset[1]=20;
> matrix[2][0]=-1; matrix[2][1]=0; matrix[2][2]=0; offset[2]=30;
Replace this matrix with :
matrix[0][0]=0; matrix[0][1]=0; matrix[0][2]=+1; offset[0]=10;
matrix[1][0]=0; matrix[1][1]=1; matrix[1][2]=0; offset[1]=20;
matrix[2][0]=-1; matrix[2][1]=0; matrix[2][2]=0; offset[2]=30;
and you won't have that error.
------
SetMatrix is a dangerous call for users using the
VersorRigid3DTransform, you would be better off with initializing a
versor and setting that versor on the transform.
HTH
-karthik
>
> m_Matrix is the identity while the other matrix assignment (commented
> out) gives m_Matrix the value assigned. I ran it on VC++6.0. Let me
> know if you run the code & get the same result. Thanks.
>
> Rick
>
> */Karthik Krishnan <Karthik.Krishnan at kitware.com>/* wrote:
>
> On Fri, 2006-06-23 at 13:15 -0700, Rick Shilling wrote:
> > In itk registration , I provide an initial rigid transformation with
> > rotation in the itk registration object:
> >
> > 0 0 -1
> > 0 1 0
> > -1 0 0
> >
> > and offset:
> > 230
> > -110
> > 331
> >
> > I noticed that in MatrixOffsetTransformBase class when its
> > transforming points:
> >
> > MatrixOffsetTransformBase
> > NOutputDimensions>
> > ::TransformPoint(const InputPointType &point) const
> > {
> > return m_Matrix * point + m_Offset;
> > }
> >
> > m_Matrix is the indentity & not what was provided for in:
> >
> > transform->SetMatrix(matrix);
> >
> > Other times m_matrix uses the right values yet there is no
> difference
> > in code between the two cases. Is there any precondition on the
> > rotation matrix that is imposed by the registration process that
> > changes it the transform to the identity? Thanks.
>
> Can you write a minimal test to prove that ?
>
> >
> > Rick
> >
> >
> >
> >
> >
> ______________________________________________________________________
> > Yahoo! Messenger with Voice. PC-to-Phone calls for ridiculously low
> > rates.
> > _______________________________________________
> > Insight-users mailing list
> > Insight-users at itk.org
> > http://www.itk.org/mailman/listinfo/insight-users
>
>
> ------------------------------------------------------------------------
> How low will we go? Check out Yahoo! Messenger’s low PC-to-Phone call
> rates.
> <http://us.rd.yahoo.com/mail_us/taglines/postman8/*http://us.rd.yahoo.com/evt=39663/*http://voice.yahoo.com>
More information about the Insight-users
mailing list