<br><br><div><span class="gmail_quote">On 11/19/07, <b class="gmail_sendername">Michael Schildt</b> &lt;<a href="mailto:michael.schildt@ifn-magdeburg.de">michael.schildt@ifn-magdeburg.de</a>&gt; 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&#39;s easier than i thought :)<br>But i have a question reguarding the fact of R = R&#39;. <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&#39;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&#39;t use offset. Use Only Translation and Center. Don&#39;t use both.
<br>If you must use Offset, don&#39;t use Translation and Center...<br>Otherwise it can get confusing.<br><br><br>bye<br>-- <br>Karthik Krishnan<br>R&amp;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>&nbsp;&nbsp;&nbsp;&nbsp;Michael Schildt<br><br><br>Karthik Krishnan schrieb:<br>&gt; Michael:<br>&gt;<br>&gt; Its simple. Derive it yourself :-)<br>&gt;<br>&gt; For a centered transform (with parameters : C = Center, T=<br>&gt; Translation. R= Rotation matrix.), given a point &#39;p&#39;
<br>&gt;<br>&gt; TransformedPoint = R (p - C)&nbsp;&nbsp;+ C&nbsp;&nbsp;+ T<br>&gt;<br>&gt; Now if you want your own Center C&#39;, let&#39;s find the parameters R&#39; and T&#39;<br>&gt;<br>&gt; R (p - C)&nbsp;&nbsp;+ C&nbsp;&nbsp;+ T&nbsp;&nbsp;= R&#39; (p - C&#39;)&nbsp;&nbsp;+ C&#39;&nbsp;&nbsp;+ T&#39;
<br>&gt;<br>&gt; The result is<br>&gt;&nbsp;&nbsp; R&#39; = R<br>&gt;&nbsp;&nbsp; T&#39; = T + (C-C&#39;) - R (C-C&#39;)<br>&gt;<br>&gt; ie. You will contruct a new transform with the same rotation matrix,<br>&gt; your center and the new translation is given by the above equation.
<br>&gt;<br>&gt; Hope this helps.<br>&gt; --<br>&gt; karthik<br>&gt;<br>&gt; On 11/16/07, *Michael Schildt* &lt;<a href="mailto:michael.schildt@ifn-magdeburg.de">michael.schildt@ifn-magdeburg.de</a><br>&gt; &lt;mailto:<a href="mailto:michael.schildt@ifn-magdeburg.de">
michael.schildt@ifn-magdeburg.de</a>&gt;&gt; wrote:<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; Hello!<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; I got a rigid transform of an itk registration with a certain<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; center of<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; rotation. But for further processing i need to use an other center. Is
<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; it possible to recompute the matrix of a rigid/affine transform for a<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; different center? Because, just setting a new center will result in a<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; different transform.<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; Here are some numbers:
<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; TransformMatrix = -0.0183916 0.938708 -0.344223 -0.0411616 -0.3447<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; -0.93781 -0.998983 -0.00307907 0.0449783<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; Offset = 5.64609 -44.9436 -0.107986<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; CenterOfRotation = 1.09089
 6.36365 -2.33333<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; I need to have a new center at [127.5, 127.5, 127.5].<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; Any hints are welcome :)<br>&gt;<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; Best reguards,<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Michael Schildt<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; _______________________________________________
<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; Insight-users mailing list<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; <a href="mailto:Insight-users@itk.org">Insight-users@itk.org</a> &lt;mailto:<a href="mailto:Insight-users@itk.org">Insight-users@itk.org</a>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; <a href="http://www.itk.org/mailman/listinfo/insight-users">
http://www.itk.org/mailman/listinfo/insight-users</a><br>&gt;<br></blockquote></div><br><br clear="all"><br>