[Paraview] Object Panel <-> Model Communication

Rafael March rafaelmarch3 at yahoo.com
Thu Dec 18 11:04:12 EST 2008


Utkarsh,

actually I would like to get vtkPointData from Server, the nodes global id's. I'm taking a look at the vtkPVDataSetAttributesInformation class, but I don't think it will provide this information, am I right ? As a meta data, I can't get really the data, just some information about it...

Regards,
Rafael.
--- On Wed, 12/17/08, Utkarsh Ayachit <utkarsh.ayachit at kitware.com> wrote:
From: Utkarsh Ayachit <utkarsh.ayachit at kitware.com>
Subject: Re: [Paraview] Object Panel <-> Model Communication
To: rafaelmarch3 at yahoo.com
Cc: paraview at paraview.org
Date: Wednesday, December 17, 2008, 9:32 PM

Rafael,

It is possible to get the output of a filter in a custom panel. But it
most certainly is not recommended. Fetching data from the output of
any filter/source should be done only by views such as the render
view/xy line plot view/ spreadsheet view etc. However if you insist on
getting the data to the client side create a client-delivery
representation. Look at the implementation of "Fetch()" function  in
Utilities/VTKPythonWrapping/paraview/servermanager.py for details.
However I'd still recommend to rethink -- do you really need the full
data or just some meta-data that can be obtained from the
vtkPVDataInformation associated with the input?

Utkarsh

On Wed, Dec 17, 2008 at 10:58 AM, Rafael March <rafaelmarch3 at yahoo.com>
wrote:
> Thanks a lot Utkarsh,
>
> I'm already testing and learning about the Information Properties, and
I
> realized this is exactly what I need, concerning the Client/Server
> Communication.
>
> Let me try to explain what I asked about the visualization pipeline:
> Suppose I have an unstructured grid.Then, my filter associate an integer
> number, from 0 to 6, to each cell, according to an algorithm. My filter
also
> implements a custom object panel. Then I clip my model, through the Clip
> Filter. Is it possible to get the output of the Clip (that is, the nodes
> that weren't cutted off )from my custom filter code (which stays
before the
> Clip filter in the pipeline) ?
>
> Regards,
> Rafael March.
>
> --- On Tue, 12/16/08, Utkarsh Ayachit <utkarsh.ayachit at kitware.com>
wrote:
>
> From: Utkarsh Ayachit <utkarsh.ayachit at kitware.com>
> Subject: Re: [Paraview] Object Panel <-> Model Communication
> To: rafaelmarch3 at yahoo.com
> Cc: paraview at paraview.org
> Date: Tuesday, December 16, 2008, 2:17 PM
>
> 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
>>
>>
>
>
> _______________________________________________
> ParaView mailing list
> ParaView at paraview.org
> http://www.paraview.org/mailman/listinfo/paraview
>
>



      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.paraview.org/pipermail/paraview/attachments/20081218/4984f8e3/attachment.htm>


More information about the ParaView mailing list