[vtkusers] registration in ITK and visualization in VTK - transform questions

Michael Schildt michael.schildt at ifn-magdeburg.de
Mon Aug 27 08:46:35 EDT 2007


Hi!

Seems nobody is willing or beeing able to answer my questions. In the 
meantime i have read all threads related to "vtk itk transform", the VTK 
book transformsections and in the ITK-Guide too. And it is still 
confusing me. But i present the facts i collected. Maybe someone can 
comment on them, please.

1) ITK and VTK, both using right-hand coordinate systems ?
2) For ITK the x-axis goes to the left, the y-axis to the top and the 
z-axis to the front ?
3) For VTK the x-axis goes to the left, the y-axis to the bottom and the 
z-axis to the back ?
4) That means a 180° rotation (of the vtkCamera) around the x-axis will 
align both coordinate systems ?
5) in ITK transforms the physical to image space, while vtk transforms 
actor(image) to physical space ?
6) So most of the time, in ITK i use the inverse of the vtk transform, 
and vice versa ?

Best Requards,
    Michael Schildt

Michael Schildt schrieb:
> 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
>
> _______________________________________________
> This is the private VTK discussion list. Please keep messages 
> on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
>



More information about the vtkusers mailing list