[Paraview-developers] Get data from server to client (helper?)

Utkarsh Ayachit utkarsh.ayachit at kitware.com
Tue Sep 24 13:20:09 EDT 2013


The property approach is not the right way to do. Information
properties are not meant to get large (or anything more than a few
tens of values). If this was a pipeline output, you could have
directly used the (filters, ClientServerMoveData) filter to fetch data
from root node to client. That not being the case, you have to got the
vtkPVInformation route.

Create a new vtkPVInformation subclass with following points to note:

+ Override GetRootOnly() to return 1. Thus ParaView will only gather
the information from the root node.
+ Override CopyFromObject() to downcast to right type and call which
every method you want to get the data
+ Override CopyToStream and CopyFromStream to serialize the data
collected in CopyFromObject to/from a client-server stream.
+ AddInformation() is used to reduce the results in parallel. Since
you don't need that, I believe you can leave that empty.

Now, in your client code, to fetch the data you can do something as follows:

vtkNew<vtkMyNewInformationClass> instance;
repr->getProxy()->GatherInformation(instance.GetPointer())

Utkarsh


On Tue, Sep 24, 2013 at 12:21 PM, Biddiscombe, John A. <biddisco at cscs.ch> wrote:
> Utkarsh
>
>> How are you expecting this to work in parallel? Is the "Histogram"
>> supposed to fetched from the root node alone?
>
> Yes. exactly. The root node will hold the correct histo accumulated data and the client would hopefully get the proxy data from there
>
> JB


More information about the Paraview-developers mailing list