Hi guys, I’ve tried many different ways to transform a vtkRenderWindow into an OpenCV Mat but I could get it and the python wrap documentation is not very solid (or am I missing some websites?).
The documentation highlights the unusual behavior of that class:
A vtkWindow doesn’t behave like other parts of the VTK pipeline: its modification time doesn’t get updated when an image is rendered. As a result, naive use of vtkWindowToImageFilter will produce an image of the first image that the window rendered, but which is never updated on subsequent window updates. This behavior is unexpected and in general undesirable. To force an update of the output image, callvtkWindowToImageFilter’s Modified() method after rendering to the window.