[vtkusers] vtkRenderWindowInteractor() in addition to other kind of interactors
Andreas Pedroni
anpedroni at gmail.com
Fri Nov 9 09:26:16 EST 2018
Dear list
I am stuck in interacting with the render window in VTK. I am using VTK with pyhton and opencv2 on a mac.
Specifically, I load a 3D object and render it . At the same time I map a video on a plane and in parallel do some image analysis (with opencv2). The output of this image analysis moves the rendered 3D object using SetPosition.
All this works smoothly, but I cannot interact with the render window in the default way (e.g. moving around the viewpoint and zooming) using the vtkRenderWindowInteractor(). If I start it as follows:
ren = vtk.vtkRenderer()
renWin = vtk.vtkRenderWindow()
renWin.AddRenderer(ren)
iren = vtk.vtkRenderWindowInteractor()
iren.SetRenderWindow(renWin)
iren.Initialize()
iren.Start()
...I can move in the window but then 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
Andreas
More information about the vtkusers
mailing list