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

Biddiscombe, John A. biddisco at cscs.ch
Tue Sep 24 14:10:34 EDT 2013


Thanks Utkarsh.

If necessary I could put the stuff into a filter separate from other places so that I can do a getoutput and return a vtkImageData. Would there be improved efficiency doing it that way using ClientServerMoveData?

JB

-----Original Message-----
From: Utkarsh Ayachit [mailto:utkarsh.ayachit at kitware.com] 
Sent: 24 September 2013 19:20
To: Biddiscombe, John A.
Cc: paraview-developers at paraview.org
Subject: Re: [Paraview-developers] Get data from server to client (helper?)

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