<br>Hi Oscar,<br><br>What you have mentioned is close enough...<br><br><br>The matrix that you want is actually the Axis of the Moving image <br>multiplied by the inverse of the Axis of the Fixed image.<br><br>You may want to look at the code of the file:<br>
<br> Insight/Code/Common/itkCenteredVersorTransformInitializer.txx<br><br>(attached to this email for your convenience).<br><br>Note also, that we just fixed this file in CVS, after looking at your email,<br>Therefore, if you want to look at the ITK source code version, you should<br>
get an updated CVS checkout.<br><br><br> Regards,<br><br><br> Luis<br><br><br>----------------------------------------------------<br><div class="gmail_quote">On Tue, Aug 11, 2009 at 7:56 AM, Oscar Esteban Sanz-Dranguet <span dir="ltr"><<a href="mailto:oesteban@die.upm.es">oesteban@die.upm.es</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi all,<br>
<br>
I'm registering RM-SPECT pairs, using centered transforms and moments initialization. I would like to improve the initialization not only using the centers of masses of the two images. I thought that aligning the Principal Axes would work, but I don't understand the implementation as well as I need to code it.<br>
<br>
I've read the documentation of itk::ImageMomentsCalculator<>::GetPrincipalAxes(), but I can't find out how to compute the matrix that I should apply to the moving image in order to make the correct rotation.<br>
<br>
I think that I should calculate the inverse of the principal axes matrix of the moving image. Then, multiply it with the principal axes matrix of the fixed image. Isn't it?<br>
<br>
Thanks in advance. Best Regards.<br>
<br>
-- <br>
Oscar Esteban<br>
BIT - UPM (<a href="http://www.die.upm.es/im/" target="_blank">http://www.die.upm.es/im/</a>)<br>
+34 913 366 827 ext.4248<br>
<br>
_____________________________________<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>
Please keep messages on-topic and check the ITK FAQ at: <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>
</blockquote></div><br>