[vtkusers] problem with interaction in two render windows

Cristina Oyarzun coyarzunlaura at googlemail.com
Wed May 18 10:01:41 EDT 2011


Hello,

I have two images. One of them is one part of the other image. They have
both different size, spacing, origin... but they overlap each other. I want
to render them in two separate vtkRenderWindows and I want to interact with
them so that when i click somewhere in the complete image an actor appears
in the corresponding position of the other image (on the other render
window).

When both images have same origin, spacing... everything works fine. However
when they have those properties different the point appears somewhere else.

I am getting the clicked position in world coordinates and adding an actor
in the second render window in the same world coordinates.

I am wondering if the problem comes when I add the images in each render
window. I add the complete image as a vtkImageActor and the other image as a
surface using a vtkPolyDataMapper into and vtkActor.

Am I missing something about the way in which vtk places the actors inside
the renderers? Is it not just taking the origin of the image an placing it
accordingly? I am having this problem only when the spacing, origin, size...
of both images differs...

Thank you!

Cristina
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20110518/9d252cf7/attachment.htm>


More information about the vtkusers mailing list