[vtkusers] Problem with vtk-transform to itk-transform

Carola Schmidt carola.schmidt at igd.fraunhofer.de
Tue Sep 23 05:21:24 EDT 2008


Hi, vtk users,

I want to generate a mean atlas and therefore I have calculated an 
icptransformation in vtk between two images. From that calculation I can 
get a vtkMatrix4x4 by vtkMatrix4x4 * matrix = icpTransform->GetMatrix();.

Now I want to overlay both images as itk images. So I want to use the 
calculated vtkMatrix4x4 on one itk image. For that I use a resampler:

   typedef itk::ResampleImageFilter<ImageType,ImageType > 
ResampleFilterType;
   ResampleFilterType::Pointer resampler = ResampleFilterType::New();
   resampler->SetInput( image );
   resampler->SetTransform(transform);
   ....

My problem is now to give my vtkMatrix4x4 to an adequate transformation. 
For example, I have tried to use Rigid3DTransform but by setMatrix(...) 
I can only commit a 3x3 Matrix.
Does someone know a solution for this problem? Is there an adequate 
transform which takes a 4x4matrix? Or is there a simple way to read a 
rotation matrix and a translation vector out of my 4x4matrix? Perhaps 
there are other ways to convert a vtktransform to an itktransform?

Thank you for an answer.

Ciao,
Caro





More information about the vtkusers mailing list