[Paraview] Object Panel <-> Model Communication

Utkarsh Ayachit utkarsh.ayachit at kitware.com
Tue Dec 16 09:17:02 EST 2008


To get back "values" from the server, you can use either "information
properties" or "information objects".

Information properties are properites with information_only="1" set in
the XML (eg. in Servers/ServerManager/Resources/rendering.xml the
"Camera" proxy has "CameraPositionInfo" as an information property).
Such properties need an "InformationHelper" which knows how to obtain
the values from the server. For simple Get*() methods, you can use the
<SimpleDoubleInformationHelper/> or <SimpleIntInformationHelper />
etc. based on the type of the property. Complex information helpers
can be written as well. Look at TimeStepsInformationHelper
(vtkSMTimeStepsInformationHelper.h|cxx) as an example.

Information objects are used to get data from server which cannot be
simply put in a property for example information about the data object
produced by a filter (vtkPVDataInformation). These are
vtkPVInformation subclasses. You can create you own vtkPVInformation
subclass that knows how to collect information and then
serialize/deserialize it for transfer to the client from the server
(if needed). To gather such information, one uses
vtkProcessModule::GatherInformation(vtkIdType connectionID,
vtkTypeUInt32 serverFlags, vtkPVInformation* info, vtkClientServerID
id) where "id" is vtkSMProxy::GetID() returned for the proxy from
which you want to collect the information.

In your case, information property may be an easier solution -- if I
understand your problem correctly.

There is a pqServerManagerModel instance accessible as
pqApplicationCore::instance()->getServerManagerModel() that can be
used to access sources/filters their representations, views etc. Take
a look at Qt/Core/pqServerManagerModel.h for the API. That should help
you access the visualization pipeline.

"How to get, for instance, the ids of the nodes which are displayed
after the application of a filter to the model ?"
Not sure I understand what you mean by that. Can you please elaborate?

Utkarsh

On Tue, Dec 16, 2008 at 6:38 AM, Rafael March <rafaelmarch3 at yahoo.com> wrote:
> Hey all,
>
> I'm programming a filter with a custom Object Panel,
> and I'm feeling a little bit lost about the ParaView architecture and
> code design.
>
> My great problem is the comunication between the
> Object Panel and the Model. I know I can't have a pointer to my
> vtkUnstructuredGrid displayed, 'cause they are not necessarily at the
> same machine or process. I also know that I'm able to send information
> to the model through properties, since I can get the vtkSMProxy in my
> panel. But what about the way back ? Is there a way to send information
> from the display view to the panel ? How can I display in a QTable, for
> instance, the nodes of my model which have some property equals to 1 ?
>
> Another problem is the Visualization Pipeline: is there a way to "walk" on
> it ?
> I mean, if I have a filter name, am I able to get the the filter no
> matter where it is in the Pipeline ?
>
> Sorry for the mess with the questions. I hope I made it clear and someone
> can help me ! :)
>
> Regards,
> Rafael March.
>
> _______________________________________________
> ParaView mailing list
> ParaView at paraview.org
> http://www.paraview.org/mailman/listinfo/paraview
>
>


More information about the ParaView mailing list