<DIV>Hi Luis,</DIV>
<DIV> </DIV>
<DIV>I am also trying to export the transform in ITK to other applications, but to SPM rather tan VTK.</DIV>
<DIV> </DIV>
<DIV>One question I want to ask is</DIV>
<DIV>can I simply use the a 4X4 matrix as follows to transform a image?</DIV>
<DIV>| last translationX |<BR>| GetRotationMatrix 3X3 last translationY |<BR>| last translationZ |<BR>| 0 0 0
1 |</DIV>
<DIV> </DIV>
<DIV>and you mentioned transpose, why do we need transpose?</DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV>Thank you!</DIV>
<DIV>Best regards,</DIV>
<DIV>Yu Qi</DIV>
<DIV><BR><BR><B><I>Luis Ibanez <luis.ibanez@kitware.com></I></B> дµÀ£º</DIV>
<BLOCKQUOTE class=replbq style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #1010ff 2px solid"><BR>Hi Toon,<BR><BR><BR>What you are doing seems to be reasonable.<BR><BR>The only thing that can be wrong in your process is<BR>that the Matrix may need to be transposed.<BR><BR><BR>However, before we go there, could you please<BR>share with us the evidence that lead you to think<BR>that the transformation is not correct ?<BR><BR><BR>If you are obtaining the Versor transform as the<BR>result of an image registration process in ITK,<BR>chances are that you are being confused by the<BR>direction in which Transforms are computed in ITK.<BR><BR><BR>Please let us know,<BR><BR><BR>Thanks<BR><BR><BR>Luis<BR><BR><BR>-------------------<BR>Toon Huysmans wrote:<BR><BR>> Hi,<BR>> <BR>> <BR>> <BR>> I have registered two images and I have the result in a <BR>> VersorRigid3DTransform, now I would like to transform some vtkPolyData <BR>> using this transform. I believe that
VersorRigid3DTransform contains a <BR>> rotation (the versor) and a translation, so I set up a 4x4 matrix, <BR>> containing the rotation and translation as follows:<BR>> <BR>> | R11 R12 R13 Tx |<BR>> <BR>> | R21 R22 R23 Ty |<BR>> <BR>> | R31 R32 R33 Tz |<BR>> <BR>> | 0 0 0 1 |<BR>> <BR>> <BR>> <BR>> I get the rotation matrix R using <BR>> VersorRigid3DTransform::GetRotationMatrix <BR>> <FILE: C:\Documents%20and%20Settings\Toon%20Huysmans\My%20Documents\Image-Mesh%20Processing\ITK\DoxygenInsightToolkit-2.0.0\a03144.html#a2>, <BR>> and the translation part using VersorRigid3DTransform::GetOffset <BR>> <FILE: C:\Documents%20and%20Settings\Toon%20Huysmans\My%20Documents\Image-Mesh%20Processing\ITK\DoxygenInsightToolkit-2.0.0\a03144.html#a1>. <BR>> Then I use vtkTransform::SetMatrix to set the transform for the <BR>> polydata, and I use<BR>> <BR>> vtkTransformPolyDataFilter to transform the polydata. But the result is
<BR>> not as expected, i.e. the transformation is not correct.<BR>> <BR>> <BR>> <BR>> Does anyone have any clues on how to do it the right way?<BR>> <BR>> <BR>> <BR>> Many thanks,<BR>> <BR>> <BR>> <BR>> Toon Huysmans.<BR>> <BR>> <BR>> <BR>> <BR>> <BR>> ¥ ?lt;br>> <BR>> ?Postal Address: ?lt;br>> <BR>> ? ?lt;br>> <BR>> ?Vision Lab, Department of Physics ?lt;br>> <BR>> ?University of Antwerp (CMI) ?lt;br>> <BR>> ?Groenenborgerlaan 171 (U306) ?lt;br>> <BR>> ?B-2020 Antwerp, Belgium ?lt;br>> <BR>> °€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€?lt;br>> <BR>> ?Tel: +32 (0) 3 265 32 24 ?lt;br>> <BR>> °€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€?lt;br>> <BR>> ?Fax: +32 (0) 3 265 33 18 ?lt;br>> <BR>> °€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€?lt;br>>
<BR>> ?Email: toon.huysmans@ua.ac.be <BR>> <mailto:toon.huysmans@ua.ac.be>?lt;br>> <BR>> °€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€?lt;br>> <BR>> ?Web: http://webhost.ua.ac.be/visielab/staff/tohu/ ?lt;br>> <BR>> « ?lt;br>> <BR>> <BR>> <BR>> <BR>> ------------------------------------------------------------------------<BR>> <BR>> _______________________________________________<BR>> Insight-users mailing list<BR>> Insight-users@itk.org<BR>> http://www.itk.org/mailman/listinfo/insight-users<BR><BR><BR><BR>_______________________________________________<BR>Insight-users mailing list<BR>Insight-users@itk.org<BR>http://www.itk.org/mailman/listinfo/insight-users<BR></BLOCKQUOTE></mailto:toon.huysmans@ua.ac.be><p><br><hr size=1><b>Do You Yahoo!?</b><br>
<a href="http://music.yisou.com" target=blank>150ÍòÇúMP3·è¿ñËÑ£¬´øÄú´³ÈëÒôÀÖµîÌÃ</a><br><a href="http://image.yisou.com" target=blank>ÃÀÅ®Ã÷ÐÇÓ¦Óо¡ÓУ¬ËѱéÃÀͼ¡¢ÑÞͼºÍ¿áͼ</a><br>
<a href="http://cn.rd.yahoo.com/mail_cn/tag/1g/*http://cn.mail.yahoo.com/event/mail_1g/" target=blank>1G¾ÍÊÇ1000Õ×£¬ÑÅ»¢µçÓÊ×ÔÖúÀ©ÈÝ£¡</a>