<br><br><div><span class="gmail_quote">On 11/19/07, <b class="gmail_sendername">Michael Schildt</b> <<a href="mailto:michael.schildt@ifn-magdeburg.de">michael.schildt@ifn-magdeburg.de</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hello Karthik Krishnan!<br><br>Your advice help me a lot. Creating the new transform seems to work now.<br>It's easier than i thought :)<br>But i have a question reguarding the fact of R = R'. <br>Is this correct?
</blockquote><div><br>yes <br></div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">And is the conclusion correct that a different center of rotation does
<br>not affect the offset and the matrix just the center itself and<br>translation differ?</blockquote><div><br>(Offset = T + C - RC).<br><br>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.
<br><br>Translation and Center dominate over Offset.<br><br>So if you have <br>SetTranslation( t );<br>SetCenter( c );<br>......<br>SetCenter( c2 ); // This will modify the Offset to maintain the center.<br><br>As a rule of thumb, Don't use offset. Use Only Translation and Center. Don't use both.
<br>If you must use Offset, don't use Translation and Center...<br>Otherwise it can get confusing.<br><br><br>bye<br>-- <br>Karthik Krishnan<br>R&D Engineer,<br>Kitware Inc.<br><br><br></div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Reguards,<br> Michael Schildt<br><br><br>Karthik Krishnan schrieb:<br>> Michael:<br>><br>> Its simple. Derive it yourself :-)<br>><br>> For a centered transform (with parameters : C = Center, T=<br>> Translation. R= Rotation matrix.), given a point 'p'
<br>><br>> TransformedPoint = R (p - C) + C + T<br>><br>> Now if you want your own Center C', let's find the parameters R' and T'<br>><br>> R (p - C) + C + T = R' (p - C') + C' + T'
<br>><br>> The result is<br>> R' = R<br>> T' = T + (C-C') - R (C-C')<br>><br>> ie. You will contruct a new transform with the same rotation matrix,<br>> your center and the new translation is given by the above equation.
<br>><br>> Hope this helps.<br>> --<br>> karthik<br>><br>> On 11/16/07, *Michael Schildt* <<a href="mailto:michael.schildt@ifn-magdeburg.de">michael.schildt@ifn-magdeburg.de</a><br>> <mailto:<a href="mailto:michael.schildt@ifn-magdeburg.de">
michael.schildt@ifn-magdeburg.de</a>>> wrote:<br>><br>> Hello!<br>><br>> I got a rigid transform of an itk registration with a certain<br>> center of<br>> rotation. But for further processing i need to use an other center. Is
<br>> it possible to recompute the matrix of a rigid/affine transform for a<br>> different center? Because, just setting a new center will result in a<br>> different transform.<br>><br>> Here are some numbers:
<br>><br>> TransformMatrix = -0.0183916 0.938708 -0.344223 -0.0411616 -0.3447<br>> -0.93781 -0.998983 -0.00307907 0.0449783<br>> Offset = 5.64609 -44.9436 -0.107986<br>> CenterOfRotation = 1.09089
6.36365 -2.33333<br>><br>> I need to have a new center at [127.5, 127.5, 127.5].<br>><br>> Any hints are welcome :)<br>><br>><br>> Best reguards,<br>> Michael Schildt<br>> _______________________________________________
<br>> Insight-users mailing list<br>> <a href="mailto:Insight-users@itk.org">Insight-users@itk.org</a> <mailto:<a href="mailto:Insight-users@itk.org">Insight-users@itk.org</a>><br>> <a href="http://www.itk.org/mailman/listinfo/insight-users">
http://www.itk.org/mailman/listinfo/insight-users</a><br>><br></blockquote></div><br><br clear="all"><br>