[vtkusers] vtkRenderWindowInteractor and opencv

David Doria daviddoria at gmail.com
Fri Sep 9 09:04:18 EDT 2011


On Thu, Sep 8, 2011 at 9:37 PM, Anant Vemuri <ajar108 at gmail.com> wrote:
> Hi,
>
> I am using opencv with vtk and i have a loop for opencv to do some
> processing on images and using that information to modify the vtk window.
> However, I am not able to keep the interactor on vtk window while I run the
> opencv loop.
>
> When I do interactor->Start(), it starts an event loop by itself and any
> further processing is stopped until I click "q". But after I exit the
> interactor by clicking 'q' I cannot do any interaction in the window like
> zoom in and zoom out or rotate the scene.
>
> I browsed through the forums and some examples on VTK documentation and came
> across some ideas others have expressed.
>
> Using interactor->CreateRepeatingTimer()
> Using mutiple threads.
>
> I was wondering if anyone has some ideas on this matter, or encountered a
> similar issue.
>
> Thank you.
> Anant.

I would use a QVTKWidget inside of a Qt application. Then you never
enter the VTK main loop, and everything works much more as you would
expect. However, there is quite a bit of overhead in including Qt in
your project.

David



More information about the vtkusers mailing list