[Insight-users] Transfering Result of a vtkLandmarkTransform to a ITK-transformer

Luis Ibanez luis.ibanez at kitware.com
Sun Aug 5 11:07:49 EDT 2007


Hi Matthias,

You could convert the vtk 4x4 Matrix to an itk::AffineTransform.

Note that the 4x4 matrix will have components:

      R R R  T
      R R R  T
      R R R  T
      K K K  S



The ITK Affine transform will combine the "R,K,S" terms
in a single 3x3 matrix, and take the "T" terms in the
Translation component. This is because ITK does *not*
uses homogeneous coordinates.



BTW:  ITK uses a right-handed coordinate system.
        *and* so does VTK.




Note that the Transform will have to be passed to an
itk::ResampleImageFilter in order to transform your image.


You are *STRONGLY* encouraged to read the ITK Software Guide

    http://www.itk.org/ItkSoftwareGuide.pdf


In particular:


   A) Section 6.9.4 "Resample Image Filter"
      in pdf-pages 254-284


and

   B) Section 8.8 "Transforms"
      in pdf-pages 424-440




   Regards,


       Luis



--------------------------
Matthias Riechmann wrote:
> Hi,
> 
> I would like to use the 4x4-Matrix I get from a vtkLandmarkTransform to 
> transform an itk image. The reason I don't want to use the landmark 
> transformer build into ITK is because as far as I understand it doesn't 
> support scaling.
> 
> I was thinking about using ScalableAffineTransform and applying the 
> matrix directly. But the documentation says it is not recommended to do 
> so. What is the behaviour of the filter when using the methods for 
> setting translation, rotation and scaling separately? Which seqence is 
> recommended?
> 
> By the way: ITK uses a left-handed coordinate system like VTK, doesn't it?
> 
> Or am I completely wrong and another filter fits better to my purpose? I 
> would be really thankful if anybody could help me.
> 
> 
> Matthias
> 
> 
> 
> 
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users


More information about the Insight-users mailing list