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

Utkarsh Ayachit utkarsh.ayachit at kitware.com
Wed Oct 23 06:43:10 EDT 2013


Cool. Glad to know it's working.

Utkarsh


On Tue, Oct 22, 2013 at 4:56 PM, Biddiscombe, John A. <biddisco at cscs.ch>wrote:

> Thanks utkarsh, the problem was at our end with a couple of bugs in the
> PVInformation class which caused problems. The RootOnly flag wasn't being
> overridden as intended and there wer also bugs in our stream insertion
> stuff, however, I now have histograms for pvservers appearing in the
> transfer function editors on the gui. All is well
>
> Many thanks as usual
>
> JB
>
> > -----Original Message-----
> > From: Utkarsh Ayachit [mailto:utkarsh.ayachit at kitware.com]
> > Sent: 22 October 2013 18:36
> > To: Biddiscombe, John A.
> > Cc: paraview-developers at paraview.org
> > Subject: Re: [Paraview-developers] Get data from server to client
> (helper?)
> >
> > John,
> >
> > I cannot reproduce the problem. Try the attached patch. With that, I have
> > added code to do GatherInformation() on a representation when it's
> > deleted. Try this:
> >
> > + Create Sphere
> > + Apply
> > + Delete Sphere
> >
> > You'll see an output on the terminal when CopyFromObject is called. In
> > built-in mode, I see the output on the client, while in client-server
> mode, I
> > only see it on the server, as expected.
> >
> > Utkarsh
> >
> > On Tue, Oct 22, 2013 at 12:25 PM, Utkarsh Ayachit
> > <utkarsh.ayachit at kitware.com> wrote:
> > > 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/paraview-developers/attachments/20131023/d21f9750/attachment.htm>


More information about the Paraview-developers mailing list