[Insight-users] changing Center of Rotation for MatrixOffsetTransformBase

Karthik Krishnan karthik.krishnan at kitware.com
Mon Nov 19 16:28:25 EST 2007


On 11/19/07, Michael Schildt <michael.schildt at ifn-magdeburg.de> wrote:
>
> Hello Karthik Krishnan!
>
> Your advice help me a lot. Creating the new transform seems to work now.
> It's easier than i thought :)
> But i have a question reguarding the fact of R = R'.
> Is this correct?


yes

And is the conclusion correct that a different center of rotation does
> not affect the offset and the matrix just the center itself and
> translation differ?


(Offset = T + C - RC).

A couple of years ago, a few changes were made to the
MatrixOffsetTransformBase. Given that Offset, Translation and Center of
rotation aren't linearly independent and that there is an API to specify
each of them independently, thereby causing scope for confusion, here is the
rule followed.

Translation and Center dominate over Offset.

So if you have
SetTranslation( t );
SetCenter( c );
......
SetCenter( c2 ); // This will modify the Offset to maintain the center.

As a rule of thumb, Don't use offset. Use Only Translation and Center. Don't
use both.
If you must use Offset, don't use Translation and Center...
Otherwise it can get confusing.


bye
-- 
Karthik Krishnan
R&D Engineer,
Kitware Inc.



Reguards,
>     Michael Schildt
>
>
> Karthik Krishnan schrieb:
> > Michael:
> >
> > Its simple. Derive it yourself :-)
> >
> > For a centered transform (with parameters : C = Center, T=
> > Translation. R= Rotation matrix.), given a point 'p'
> >
> > TransformedPoint = R (p - C)  + C  + T
> >
> > Now if you want your own Center C', let's find the parameters R' and T'
> >
> > R (p - C)  + C  + T  = R' (p - C')  + C'  + T'
> >
> > The result is
> >   R' = R
> >   T' = T + (C-C') - R (C-C')
> >
> > ie. You will contruct a new transform with the same rotation matrix,
> > your center and the new translation is given by the above equation.
> >
> > Hope this helps.
> > --
> > karthik
> >
> > On 11/16/07, *Michael Schildt* <michael.schildt at ifn-magdeburg.de
> > <mailto:michael.schildt at ifn-magdeburg.de>> wrote:
> >
> >     Hello!
> >
> >     I got a rigid transform of an itk registration with a certain
> >     center of
> >     rotation. But for further processing i need to use an other center.
> Is
> >     it possible to recompute the matrix of a rigid/affine transform for
> a
> >     different center? Because, just setting a new center will result in
> a
> >     different transform.
> >
> >     Here are some numbers:
> >
> >     TransformMatrix = -0.0183916 0.938708 -0.344223 -0.0411616 -0.3447
> >     -0.93781 -0.998983 -0.00307907 0.0449783
> >     Offset = 5.64609 -44.9436 -0.107986
> >     CenterOfRotation = 1.09089 6.36365 -2.33333
> >
> >     I need to have a new center at [127.5, 127.5, 127.5].
> >
> >     Any hints are welcome :)
> >
> >
> >     Best reguards,
> >         Michael Schildt
> >     _______________________________________________
> >     Insight-users mailing list
> >     Insight-users at itk.org <mailto:Insight-users at itk.org>
> >     http://www.itk.org/mailman/listinfo/insight-users
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/insight-users/attachments/20071119/7870509f/attachment.htm


More information about the Insight-users mailing list