[Insight-users] FW: How to convert VersorRigid3DTransform to
vtkTransform
Toon Huysmans
denhuys at hotmail.com
Wed May 25 09:33:37 EDT 2005
Hi,
I have registered two images and I have the result in a
VersorRigid3DTransform, now I would like to transform some vtkPolyData
using this transform. I believe that VersorRigid3DTransform contains a
rotation (the versor) and a translation, so I set up a 4x4 matrix,
containing the rotation and translation as follows:
| R11 R12 R13 Tx |
| R21 R22 R23 Ty |
| R31 R32 R33 Tz |
| 0 0 0 1 |
I get the rotation matrix R using VersorRigid3DTransform::
<file:///C:\Documents%20and%20Settings\Toon%20Huysmans\My%20Documents\Im
age-Mesh%20Processing\ITK\DoxygenInsightToolkit-2.0.0\a03144.html#a2>
GetRotationMatrix, and the translation part using
VersorRigid3DTransform::
<file:///C:\Documents%20and%20Settings\Toon%20Huysmans\My%20Documents\Im
age-Mesh%20Processing\ITK\DoxygenInsightToolkit-2.0.0\a03144.html#a1>
GetOffset. Then I use vtkTransform::SetMatrix to set the transform for
the polydata, and I use
vtkTransformPolyDataFilter to transform the polydata. But the result is
not as expected, i.e. the transformation is not correct.
Does anyone have any clues on how to do it the right way?
Many thanks,
Toon Huysmans.
г=====================================================┐
│ Postal Address: │
│ │
│ Vision Lab, Department of Physics │
│ University of Antwerp (CMI) │
│ Groenenborgerlaan 171 (U306) │
│ B-2020 Antwerp, Belgium │
│-----------------------------------------------------│
│ Tel: +32 (0) 3 265 32 24 │
│-----------------------------------------------------│
│ Fax: +32 (0) 3 265 33 18 │
│-----------------------------------------------------│
│ Email: <mailto:toon.huysmans at ua.ac.be> toon.huysmans at ua.ac.be
│
│-----------------------------------------------------│
│ Web: <http://webhost.ua.ac.be/visielab/staff/tohu/>
http://webhost.ua.ac.be/visielab/staff/tohu/ │
L=====================================================-
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/insight-users/attachments/20050525/2336768f/attachment-0001.htm
More information about the Insight-users
mailing list