[vtkusers] vtkRenderWindowInteractor() in addition to other kind of interactors

Andreas Pedroni anpedroni at gmail.com
Tue Nov 6 16:14:38 EST 2018

Dear list

I am stuck with the following problem and did not find resources online to find my way. (I am new to vtk and using Python3). So I’d be very grateful for any advise.
What I am doing is:

I load a 3D object and render it in a window. At the same time I texture map a video on a plane and do some image analysis (with opencv2). The output of this image analysis moves the 3D object using SetPosition.
All this works smoothly, but I cannot interact with in the render window. The next step would be to be able to move the viewpoint and zoom in the render window (the functionality of a vtkRenderWindowInteractor()). If I set this up like this:

ren = vtk.vtkRenderer()
renWin = vtk.vtkRenderWindow()
iren = vtk.vtkRenderWindowInteractor()

...I can move in the window but the movie does is not mapped on the plane and the 3D object does not update the position accordingly. Is it possible to use the vtkRenderWindowInteractor() while allowing the actors in the window to interact with for instance input from opencv?

Thanks for any help and all the best


More information about the vtkusers mailing list