[Paraview] Re: Plugin access to render window

clinton at elemtech.com clinton at elemtech.com
Wed Nov 28 15:37:10 EST 2007


On Tuesday 06 November 2007 5:42:09 pm Thomas D. Uram wrote:
> Hi:
>
> I'm writing a plugin for Paraview3 that wants to get access to pixel
> data from the render window.  I've been looking for some way to get a
> pointer to the render window so I could add an observer with something like
>
> renderWindowPointer->AddObserver("EndEvent",myRenderEventHandler)
>
> I've tried to find a mechanism for getting a pointer to the render
> window (e.g., retrieve a vtkSMRenderModuleProxy from the
> vtkSMProxyManager), but so far have not had any luck.
>
> I'd be grateful for suggestions as to how I should proceed.


Have you tried:

// application core (manager of managers) for paraview
pqApplicationCore* appCore = pqApplicationCore::instance();
// server manager model for querying items in the server manager
pqServerManagerModel* smModel = appCore->getServerManagerModel();
// get all the pqRenderView instances.
QList<pqRenderView*> renderViews = smModel->findItems<pqRenderView>();

The pqRenderView gives you access to the vtkSMRenderViewProxy and the 
QVTKWidget attached to it, as well as image capture routines.

Clint


More information about the ParaView mailing list