<div dir="ltr">Cool. Glad to know it's working.<div><br></div><div>Utkarsh</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Oct 22, 2013 at 4:56 PM, Biddiscombe, John A. <span dir="ltr"><<a href="mailto:biddisco@cscs.ch" target="_blank">biddisco@cscs.ch</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">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<br>
<br>
Many thanks as usual<br>
<div class="im HOEnZb"><br>
JB<br>
<br>
> -----Original Message-----<br>
> From: Utkarsh Ayachit [mailto:<a href="mailto:utkarsh.ayachit@kitware.com">utkarsh.ayachit@kitware.com</a>]<br>
</div><div class="im HOEnZb">> Sent: 22 October 2013 18:36<br>
> To: Biddiscombe, John A.<br>
> Cc: <a href="mailto:paraview-developers@paraview.org">paraview-developers@paraview.org</a><br>
> Subject: Re: [Paraview-developers] Get data from server to client (helper?)<br>
><br>
</div><div class="HOEnZb"><div class="h5">> John,<br>
><br>
> I cannot reproduce the problem. Try the attached patch. With that, I have<br>
> added code to do GatherInformation() on a representation when it's<br>
> deleted. Try this:<br>
><br>
> + Create Sphere<br>
> + Apply<br>
> + Delete Sphere<br>
><br>
> You'll see an output on the terminal when CopyFromObject is called. In<br>
> built-in mode, I see the output on the client, while in client-server mode, I<br>
> only see it on the server, as expected.<br>
><br>
> Utkarsh<br>
><br>
> On Tue, Oct 22, 2013 at 12:25 PM, Utkarsh Ayachit<br>
> <<a href="mailto:utkarsh.ayachit@kitware.com">utkarsh.ayachit@kitware.com</a>> wrote:<br>
> > I don;t see anything wrong with what you're doing. Let me try it out<br>
> > to see if there's something broken/missing.<br>
> ><br>
> > Utkarsh<br>
> ><br>
> > On Tue, Oct 22, 2013 at 12:17 PM, Biddiscombe, John A. <<a href="mailto:biddisco@cscs.ch">biddisco@cscs.ch</a>><br>
> wrote:<br>
> >> Utkarsh<br>
> >><br>
> >>> Create a new vtkPVInformation subclass with following points to note:<br>
> >>><br>
> >>> + Override GetRootOnly() to return 1. Thus ParaView will only gather<br>
> >>> the information from the root node.<br>
> >>> + Override CopyFromObject() to downcast to right type and call which<br>
> >>> every method you want to get the data<br>
> >>> + Override CopyToStream and CopyFromStream to serialize the data<br>
> >>> collected in CopyFromObject to/from a client-server stream.<br>
> >>> + AddInformation() is used to reduce the results in parallel. Since<br>
> >>> you don't need that, I believe you can leave that empty.<br>
> >>><br>
> >>> Now, in your client code, to fetch the data you can do something as<br>
> follows:<br>
> >>><br>
> >>> vtkNew<vtkMyNewInformationClass> instance;<br>
> >>> repr->getProxy()->GatherInformation(instance.GetPointer())<br>
> >><br>
> >> When we do this, the GatherInformation call is executing on the client.<br>
> I've experimented with<br>
> >> repr->getProxy()->GatherInformation(info.GetPointer(),<br>
> >> vtkPVSession::RENDER_SERVER); but the CopyFromObject() call inside<br>
> the information is copying on the client, and so results are wrong. I had<br>
> assumed it would CopyFromObject on the root node of the server, and then<br>
> CopyToStream and on the client do a CopyDromStream.<br>
> >><br>
> >> Is there another step I need perhaps to trigger it to do this the way I<br>
> expect?<br>
> >><br>
> >> thanks<br>
> >><br>
> >> JB<br>
</div></div></blockquote></div><br></div>