[Paraview-developers] Get data from server to client (helper?)
Utkarsh Ayachit
utkarsh.ayachit at kitware.com
Tue Oct 22 12:25:22 EDT 2013
I don;t see anything wrong with what you're doing. Let me try it out
to see if there's something broken/missing.
Utkarsh
On Tue, Oct 22, 2013 at 12:17 PM, Biddiscombe, John A. <biddisco at cscs.ch> wrote:
> Utkarsh
>
>> 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())
>
> When we do this, the GatherInformation call is executing on the client. I've experimented with
> repr->getProxy()->GatherInformation(info.GetPointer(), vtkPVSession::RENDER_SERVER);
> but the CopyFromObject() call inside the information is copying on the client, and so results are wrong. I had assumed it would CopyFromObject on the root node of the server, and then CopyToStream and on the client do a CopyDromStream.
>
> Is there another step I need perhaps to trigger it to do this the way I expect?
>
> thanks
>
> JB
More information about the Paraview-developers
mailing list