[Insight-users] changing Center of Rotation for
MatrixOffsetTransformBase
Michael Schildt
michael.schildt at ifn-magdeburg.de
Mon Nov 19 08:47:23 EST 2007
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'. While it is
intuitively clear for me that this needs to be the case, i wonder how to
proove it with mathematics.
Is it something like:
- I have to points p1 and p2, a rotation R and translation T
- v is p2-p1
- (v is independant of absolute position of p1 and p2 but the relative
postion of p1 and p2 needs to be constant to keep the size and direction
of v)
- p1' = R*p1+T, p2' = R*p2+T, v' = (p2'-p1') = R*p1-R*p2 = R*v
- so i ask, is there a rotation matrix (with all it constraints) R' != R
with Rv = R'v for all v in Vectorspace
- O = Rv-R'v = (R-R')v with O beeing the origin of the coordinate system
- this can only be true for arbitrary v if (R-R') is a zero matrix,
which means every element rij in R must be equal r'ij in R'
Is this correct?
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?
- F is offset
- F' is new offset
- F = T+C-RC
- F' = T'+C'-RC' with T' = T+(C-C')-R(C-C')
= T+C-R(C-C')-RC'
= T+C-RC+RC'-RC'
= T+C-RC
F' = F
So more general for rigid transform - for a given matrix and offset a
infinitive number of centers and corresponding translations can be
found. But for changing the rigid transform you need a certain
center/translation pair to update the offset after changing the rotation
matrix or the translaton vector.
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
>
More information about the Insight-users
mailing list