Hello Luis,<div><br></div><div>Thanks for the answer and sorry for the double post, I had some problems with my mail account. </div><div><br></div><div>I'm using "versorRigid3DTransform", and from what I've gathered all i need is to save the versor (1x6) and center of rotation (1x3) to perform the same transform again. A while back I tried to extract the rotation matrix and use that with the versorRigid3DTransform but from what I recall that was not allowed. Perhaps I misremember. Anyway was wondering if there is a way to only use the versors and center of rotation to combine the two transforms, without the extra step of dealing with matrices? </div>
<div><br></div><div>Thanks for the detailed explanation in your answer!</div><div><br></div><div>Regards, Patrik<br><br><div class="gmail_quote">2009/11/26 Luis Ibanez <span dir="ltr"><<a href="mailto:luis.ibanez@kitware.com">luis.ibanez@kitware.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Hi Patrik,<br>
<br>
Each Versor Transform does the equivalent of:<br>
<br>
P' = Transform(P) = M x P + T<br>
<br>
Where M is a rotation matrix computed from the Versor parameters,<br>
and T is the Translation vector.<br>
<br>
to be more precise,<br>
this Transform also has a Center of rotation "C",<br>
so the actual computation is:<br>
<br>
P' = Transform(P) = M x ( P - C ) + T + C<br>
<br>
Now, when you compose two Versor Transforms you should do:<br>
<br>
P" = Transform2( P' ) = Transform2( Transform1( P ) )<br>
<br>
This leads to:<br>
<br>
P" = M2 x ( P' - C2 ) + T2 + C2<br>
P" = M2 x ( M1 x ( P - C1 ) + T1 + C1 - C2 ) + T2 + C2<br>
<br>
which leads to<br>
<br>
P" = M2 x M1 x ( P - C1 ) + M2x(T1+C1-C2) + (T2+C2)<br>
<br>
You can get the matrix M from each transform by calling the<br>
method: GetMatrix(); the translation by calling GetTranslation();<br>
and the center C by calling the method GetCenter().<br>
<br>
<br>
<br>
Regards,<br>
<br>
<br>
Luis<br>
<br>
<br>
--------------------------------------------------------<br>
<div><div></div><div class="h5">On Thu, Nov 26, 2009 at 4:05 AM, Patrik Brynolfsson<br>
<<a href="mailto:patrik.brynolfsson@gmail.com">patrik.brynolfsson@gmail.com</a>> wrote:<br>
> Hello everyone,<br>
> I have a question I hope someone can clarify for me. I want to combine the<br>
> result from two versor transforms. From what I've gathered I shouldn't add<br>
> the elements of the two, but how then? Can someone please explain?<br>
> Thanks in advance!<br>
> --<br>
> Patrik Brynolfsson<br>
><br>
><br>
</div></div><div><div></div><div class="h5">> _____________________________________<br>
> Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
><br>
> Visit other Kitware open-source projects at<br>
> <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
><br>
> Kitware offers ITK Training Courses, for more information visit:<br>
> <a href="http://www.kitware.com/products/protraining.html" target="_blank">http://www.kitware.com/products/protraining.html</a><br>
><br>
> Please keep messages on-topic and check the ITK FAQ at:<br>
> <a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br>
><br>
> Follow this link to subscribe/unsubscribe:<br>
> <a href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">http://www.itk.org/mailman/listinfo/insight-users</a><br>
><br>
><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Patrik Brynolfsson<br><br><br>
</div>