<div dir="ltr">John,<div><br></div><div>UpdatePropertyInformation(..) will fetch the information from the &quot;closet&quot; instance of the vtk-object for the proxy. Since your proxy&#39;s VTK objects are created on all processes, including client, the property information indeed will be fetched from the client alone.</div>
<div><br></div><div>GatherInformation would indeed be the way to go here. <br></div><div><br></div><div>Utkarsh</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Oct 24, 2013 at 3:35 AM, Biddiscombe, John A. <span dir="ltr">&lt;<a href="mailto:biddisco@cscs.ch" target="_blank">biddisco@cscs.ch</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">





<div lang="EN-GB" link="blue" vlink="purple">
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">A further question on this topic.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">Using an information_only property of the representation (some params about the histogram that is generated), we try to fetch a value from it using<u></u><u></u></span></p>

<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:white;background:black"> 
</span><span style="font-size:9.5pt;font-family:Consolas;color:#569cd6;background:black">bool</span><span style="font-size:9.5pt;font-family:Consolas;color:white;background:black">
 hasgradrange </span><span style="font-size:9.5pt;font-family:Consolas;color:#b4b4b4;background:black">=</span><span style="font-size:9.5pt;font-family:Consolas;color:white;background:black">
</span><span style="font-size:9.5pt;font-family:Consolas;color:#569cd6;background:black">this</span><span style="font-size:9.5pt;font-family:Consolas;color:#b4b4b4;background:black">-&gt;</span><span style="font-size:9.5pt;font-family:Consolas;color:white;background:black">GetProperty</span><span style="font-size:9.5pt;font-family:Consolas;color:#b4b4b4;background:black">(</span><span style="font-size:9.5pt;font-family:Consolas;color:#d69d85;background:black">&quot;GradientRange&quot;</span><span style="font-size:9.5pt;font-family:Consolas;color:#b4b4b4;background:black">);</span><span style="font-size:9.5pt;font-family:Consolas;color:white;background:black"><u></u><u></u></span></p>

<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:white;background:black"> 
</span><span style="font-size:9.5pt;font-family:Consolas;color:#569cd6;background:black">if</span><span style="font-size:9.5pt;font-family:Consolas;color:#b4b4b4;background:black">(</span><span style="font-size:9.5pt;font-family:Consolas;color:white;background:black">hasgradrange</span><span style="font-size:9.5pt;font-family:Consolas;color:#b4b4b4;background:black">){</span><span style="font-size:9.5pt;font-family:Consolas;color:white;background:black"><u></u><u></u></span></p>

<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:white;background:black">    </span><span style="font-size:9.5pt;font-family:Consolas;color:#569cd6;background:black">this</span><span style="font-size:9.5pt;font-family:Consolas;color:#b4b4b4;background:black">-&gt;</span><span style="font-size:9.5pt;font-family:Consolas;color:white;background:black">UpdatePropertyInformation</span><span style="font-size:9.5pt;font-family:Consolas;color:#b4b4b4;background:black">(</span><span style="font-size:9.5pt;font-family:Consolas;color:#569cd6;background:black">this</span><span style="font-size:9.5pt;font-family:Consolas;color:#b4b4b4;background:black">-&gt;</span><span style="font-size:9.5pt;font-family:Consolas;color:white;background:black">GetProperty</span><span style="font-size:9.5pt;font-family:Consolas;color:#b4b4b4;background:black">(</span><span style="font-size:9.5pt;font-family:Consolas;color:#d69d85;background:black">&quot;GradientRange&quot;</span><span style="font-size:9.5pt;font-family:Consolas;color:#b4b4b4;background:black">));</span><span style="font-size:9.5pt;font-family:Consolas;color:white;background:black"><u></u><u></u></span></p>

<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:white;background:black">    vtkSMPropertyHelper</span><span style="font-size:9.5pt;font-family:Consolas;color:#b4b4b4;background:black">(</span><span style="font-size:9.5pt;font-family:Consolas;color:#569cd6;background:black">this</span><span style="font-size:9.5pt;font-family:Consolas;color:#b4b4b4;background:black">,</span><span style="font-size:9.5pt;font-family:Consolas;color:white;background:black">
</span><span style="font-size:9.5pt;font-family:Consolas;color:#d69d85;background:black">&quot;GradientRange&quot;</span><span style="font-size:9.5pt;font-family:Consolas;color:#b4b4b4;background:black">).</span><span style="font-size:9.5pt;font-family:Consolas;color:white;background:black">Get</span><span style="font-size:9.5pt;font-family:Consolas;color:#b4b4b4;background:black">(</span><span style="font-size:9.5pt;font-family:Consolas;color:white;background:black">grange</span><span style="font-size:9.5pt;font-family:Consolas;color:#b4b4b4;background:black">,</span><span style="font-size:9.5pt;font-family:Consolas;color:white;background:black">
</span><span style="font-size:9.5pt;font-family:Consolas;color:#b5cea8;background:black">2</span><span style="font-size:9.5pt;font-family:Consolas;color:#b4b4b4;background:black">);</span><span style="font-size:9.5pt;font-family:Consolas;color:white;background:black"><u></u><u></u></span></p>

<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:white;background:black"> 
</span><span style="font-size:9.5pt;font-family:Consolas;color:#b4b4b4;background:black">}</span><span style="font-size:9.5pt;font-family:Consolas;color:white;background:black"><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">but in fact this does not get values from the server. I’m curious … When we call UpdatePropertyInformation, inside the proxy code, it tests the location (of
 the proxy’s object) and if CLIENT fetches values from the local proxy only.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">Since representation proxies are a bit ‘special’ because they exist both on the client, and the server, this particular check always returns a client valid
 code and so no server side fetch is done. <u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">Can we use this process or should we put everything we need into the PVInformation object which works as expected and do this using the GatherInformation technique.
 I presume this is that way to go, but I just wanted to double check that my understanding is correct (- perhaps I’ve made another mistake and we can use the informationonly method after all)<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">thanks<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">JB<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"><u></u> <u></u></span></p>
<div style="border:none;border-left:solid blue 1.5pt;padding:0cm 0cm 0cm 4.0pt">
<div>
<div style="border:none;border-top:solid #b5c4df 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;">From:</span></b><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;"> Utkarsh Ayachit [mailto:<a href="mailto:utkarsh.ayachit@kitware.com" target="_blank">utkarsh.ayachit@kitware.com</a>]
<br>
<b>Sent:</b> 23 October 2013 12:43</span></p><div><div class="h5"><br>
<b>To:</b> Biddiscombe, John A.<br>
<b>Cc:</b> <a href="mailto:paraview-developers@paraview.org" target="_blank">paraview-developers@paraview.org</a><br>
<b>Subject:</b> Re: [Paraview-developers] Get data from server to client (helper?)<u></u><u></u></div></div><p></p>
</div>
</div><div><div class="h5">
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<p class="MsoNormal">Cool. Glad to know it&#39;s working.<u></u><u></u></p>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">Utkarsh<u></u><u></u></p>
</div>
</div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><u></u> <u></u></p>
<div>
<p class="MsoNormal">On Tue, Oct 22, 2013 at 4:56 PM, Biddiscombe, John A. &lt;<a href="mailto:biddisco@cscs.ch" target="_blank">biddisco@cscs.ch</a>&gt; wrote:<u></u><u></u></p>
<p class="MsoNormal">Thanks utkarsh, the problem was at our end with a couple of bugs in the PVInformation class which caused problems. The RootOnly flag wasn&#39;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<u></u><u></u></p>
<div>
<p class="MsoNormal"><br>
JB<br>
<br>
&gt; -----Original Message-----<br>
&gt; From: Utkarsh Ayachit [mailto:<a href="mailto:utkarsh.ayachit@kitware.com" target="_blank">utkarsh.ayachit@kitware.com</a>]<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">&gt; Sent: 22 October 2013 18:36<br>
&gt; To: Biddiscombe, John A.<br>
&gt; Cc: <a href="mailto:paraview-developers@paraview.org" target="_blank">paraview-developers@paraview.org</a><br>
&gt; Subject: Re: [Paraview-developers] Get data from server to client (helper?)<br>
&gt;<u></u><u></u></p>
</div>
<div>
<div>
<p class="MsoNormal">&gt; John,<br>
&gt;<br>
&gt; I cannot reproduce the problem. Try the attached patch. With that, I have<br>
&gt; added code to do GatherInformation() on a representation when it&#39;s<br>
&gt; deleted. Try this:<br>
&gt;<br>
&gt; + Create Sphere<br>
&gt; + Apply<br>
&gt; + Delete Sphere<br>
&gt;<br>
&gt; You&#39;ll see an output on the terminal when CopyFromObject is called. In<br>
&gt; built-in mode, I see the output on the client, while in client-server mode, I<br>
&gt; only see it on the server, as expected.<br>
&gt;<br>
&gt; Utkarsh<br>
&gt;<br>
&gt; On Tue, Oct 22, 2013 at 12:25 PM, Utkarsh Ayachit<br>
&gt; &lt;<a href="mailto:utkarsh.ayachit@kitware.com" target="_blank">utkarsh.ayachit@kitware.com</a>&gt; wrote:<br>
&gt; &gt; I don;t see anything wrong with what you&#39;re doing. Let me try it out<br>
&gt; &gt; to see if there&#39;s something broken/missing.<br>
&gt; &gt;<br>
&gt; &gt; Utkarsh<br>
&gt; &gt;<br>
&gt; &gt; On Tue, Oct 22, 2013 at 12:17 PM, Biddiscombe, John A. &lt;<a href="mailto:biddisco@cscs.ch" target="_blank">biddisco@cscs.ch</a>&gt;<br>
&gt; wrote:<br>
&gt; &gt;&gt; Utkarsh<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt;&gt; Create a new vtkPVInformation subclass with following points to note:<br>
&gt; &gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt; + Override GetRootOnly() to return 1. Thus ParaView will only gather<br>
&gt; &gt;&gt;&gt; the information from the root node.<br>
&gt; &gt;&gt;&gt; + Override CopyFromObject() to downcast to right type and call which<br>
&gt; &gt;&gt;&gt; every method you want to get the data<br>
&gt; &gt;&gt;&gt; + Override CopyToStream and CopyFromStream to serialize the data<br>
&gt; &gt;&gt;&gt; collected in CopyFromObject to/from a client-server stream.<br>
&gt; &gt;&gt;&gt; + AddInformation() is used to reduce the results in parallel. Since<br>
&gt; &gt;&gt;&gt; you don&#39;t need that, I believe you can leave that empty.<br>
&gt; &gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt; Now, in your client code, to fetch the data you can do something as<br>
&gt; follows:<br>
&gt; &gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt; vtkNew&lt;vtkMyNewInformationClass&gt; instance;<br>
&gt; &gt;&gt;&gt; repr-&gt;getProxy()-&gt;GatherInformation(instance.GetPointer())<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; When we do this, the GatherInformation call is executing on the client.<br>
&gt; I&#39;ve experimented with<br>
&gt; &gt;&gt;   repr-&gt;getProxy()-&gt;GatherInformation(info.GetPointer(),<br>
&gt; &gt;&gt; vtkPVSession::RENDER_SERVER); but the CopyFromObject() call inside<br>
&gt; the information is copying on the client, and so results are wrong. I had<br>
&gt; assumed it would CopyFromObject on the root node of the server, and then<br>
&gt; CopyToStream and on the client do a CopyDromStream.<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; Is there another step I need perhaps to trigger it to do this the way I<br>
&gt; expect?<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; thanks<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; JB<u></u><u></u></p>
</div>
</div>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
</div></div></div>
</div>
</div>

</blockquote></div><br></div>