[vtkusers] registration in ITK and visualization in VTK - transform questions
Michael Schildt
michael.schildt at ifn-magdeburg.de
Fri Aug 24 04:14:53 EDT 2007
Hello Everybody!
I want to display the progress of a intermodal 3D registration with an
centered affine transform. So every iteration I catch the intermediate
transform parameters and want to display them with VTK. It was mentioned
often that way but i didn't find any concrete example.
// get transform parameter in ITK
AffineType::InputPointType C = transform->GetCenter();
AffineType::MatrixType M = transform->GetMatrix();
AffineType::OutputVectorType T = transform->GetTranslation();
I visualize the two datasets via outline filter as suggested in the ITK
documentation. But I ren into some issues because of the different
coordinate systems ITK(mathematical convetion - origin in the lower left
corner) and VTK (graphical convention - origin in the upper left corner)
are using:
1. I flipped the y-axis of both images using ITKs flip filter. By that
the origin's y coordinate changes too, but that is not intended or is it?
2. How to convert efficiently between the two coordinate systems for the
affine transform - perhaps just inverting the y-axis?
3. Related to 2. question how to put the data from ITK (center,
translation, matrix) into the VTK AffineTransform? I would build a VTK
4x4 Matrix from the ITK 3x3 matrix + transform. But how to integrade the
center of rotation and scaling?
At the Moment I set Origin and Translation only:
// vtk set transform parameter
// moving is a vtkActor
moving->SetOrigin(C[0],C[1],C[2]);
moving->SetPosition(T[0],T[1],T[2]);
renderwin->Render();
Greetings,
Michael Schildt
More information about the vtkusers
mailing list