How to render a live video inside a vtkWindow?


Are there any ways to render a live video inside a vtkWindow?
Probably this can be done with vtkVideoSource/vtkWin32VideoSource? But how to setup the pipeline? Can someone share some examples for the two classes?

Thanks in advance!

You can display video the same way as static images. Make sure you don’t change the pipeline or create/delete objects at each frame update - just update the image buffer content and re-render.

If you work on medical applications then you may find 3D Slicer’s 4D data infrastructure useful - it supports live display/recording/replay/compression/decompression/processing of RGB or RGBD image streams (and actually it works not just with images but with transforms, meshes, point sets, curves, etc., so you can record/replay entire procedures). A few examples (live reconstruction of 3D ultrasound volume from tracked 2D frames, synchronized RGB+D image acquisition and display):