<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-GB" link="blue" vlink="purple">
<div class="WordSection1">
<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.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></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<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:white;background:black;mso-highlight:black;mso-fareast-language:EN-US">&nbsp;
</span><span style="font-size:9.5pt;font-family:Consolas;color:#569CD6;background:black;mso-highlight:black;mso-fareast-language:EN-US">bool</span><span style="font-size:9.5pt;font-family:Consolas;color:white;background:black;mso-highlight:black;mso-fareast-language:EN-US">
 hasgradrange </span><span style="font-size:9.5pt;font-family:Consolas;color:#B4B4B4;background:black;mso-highlight:black;mso-fareast-language:EN-US">=</span><span style="font-size:9.5pt;font-family:Consolas;color:white;background:black;mso-highlight:black;mso-fareast-language:EN-US">
</span><span style="font-size:9.5pt;font-family:Consolas;color:#569CD6;background:black;mso-highlight:black;mso-fareast-language:EN-US">this</span><span style="font-size:9.5pt;font-family:Consolas;color:#B4B4B4;background:black;mso-highlight:black;mso-fareast-language:EN-US">-&gt;</span><span style="font-size:9.5pt;font-family:Consolas;color:white;background:black;mso-highlight:black;mso-fareast-language:EN-US">GetProperty</span><span style="font-size:9.5pt;font-family:Consolas;color:#B4B4B4;background:black;mso-highlight:black;mso-fareast-language:EN-US">(</span><span style="font-size:9.5pt;font-family:Consolas;color:#D69D85;background:black;mso-highlight:black;mso-fareast-language:EN-US">&quot;GradientRange&quot;</span><span style="font-size:9.5pt;font-family:Consolas;color:#B4B4B4;background:black;mso-highlight:black;mso-fareast-language:EN-US">);</span><span style="font-size:9.5pt;font-family:Consolas;color:white;background:black;mso-highlight:black;mso-fareast-language:EN-US"><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:white;background:black;mso-highlight:black;mso-fareast-language:EN-US">&nbsp;
</span><span style="font-size:9.5pt;font-family:Consolas;color:#569CD6;background:black;mso-highlight:black;mso-fareast-language:EN-US">if</span><span style="font-size:9.5pt;font-family:Consolas;color:#B4B4B4;background:black;mso-highlight:black;mso-fareast-language:EN-US">(</span><span style="font-size:9.5pt;font-family:Consolas;color:white;background:black;mso-highlight:black;mso-fareast-language:EN-US">hasgradrange</span><span style="font-size:9.5pt;font-family:Consolas;color:#B4B4B4;background:black;mso-highlight:black;mso-fareast-language:EN-US">){</span><span style="font-size:9.5pt;font-family:Consolas;color:white;background:black;mso-highlight:black;mso-fareast-language:EN-US"><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:white;background:black;mso-highlight:black;mso-fareast-language:EN-US">&nbsp; &nbsp;&nbsp;</span><span style="font-size:9.5pt;font-family:Consolas;color:#569CD6;background:black;mso-highlight:black;mso-fareast-language:EN-US">this</span><span style="font-size:9.5pt;font-family:Consolas;color:#B4B4B4;background:black;mso-highlight:black;mso-fareast-language:EN-US">-&gt;</span><span style="font-size:9.5pt;font-family:Consolas;color:white;background:black;mso-highlight:black;mso-fareast-language:EN-US">UpdatePropertyInformation</span><span style="font-size:9.5pt;font-family:Consolas;color:#B4B4B4;background:black;mso-highlight:black;mso-fareast-language:EN-US">(</span><span style="font-size:9.5pt;font-family:Consolas;color:#569CD6;background:black;mso-highlight:black;mso-fareast-language:EN-US">this</span><span style="font-size:9.5pt;font-family:Consolas;color:#B4B4B4;background:black;mso-highlight:black;mso-fareast-language:EN-US">-&gt;</span><span style="font-size:9.5pt;font-family:Consolas;color:white;background:black;mso-highlight:black;mso-fareast-language:EN-US">GetProperty</span><span style="font-size:9.5pt;font-family:Consolas;color:#B4B4B4;background:black;mso-highlight:black;mso-fareast-language:EN-US">(</span><span style="font-size:9.5pt;font-family:Consolas;color:#D69D85;background:black;mso-highlight:black;mso-fareast-language:EN-US">&quot;GradientRange&quot;</span><span style="font-size:9.5pt;font-family:Consolas;color:#B4B4B4;background:black;mso-highlight:black;mso-fareast-language:EN-US">));</span><span style="font-size:9.5pt;font-family:Consolas;color:white;background:black;mso-highlight:black;mso-fareast-language:EN-US"><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:white;background:black;mso-highlight:black;mso-fareast-language:EN-US">&nbsp; &nbsp;&nbsp;vtkSMPropertyHelper</span><span style="font-size:9.5pt;font-family:Consolas;color:#B4B4B4;background:black;mso-highlight:black;mso-fareast-language:EN-US">(</span><span style="font-size:9.5pt;font-family:Consolas;color:#569CD6;background:black;mso-highlight:black;mso-fareast-language:EN-US">this</span><span style="font-size:9.5pt;font-family:Consolas;color:#B4B4B4;background:black;mso-highlight:black;mso-fareast-language:EN-US">,</span><span style="font-size:9.5pt;font-family:Consolas;color:white;background:black;mso-highlight:black;mso-fareast-language:EN-US">
</span><span style="font-size:9.5pt;font-family:Consolas;color:#D69D85;background:black;mso-highlight:black;mso-fareast-language:EN-US">&quot;GradientRange&quot;</span><span style="font-size:9.5pt;font-family:Consolas;color:#B4B4B4;background:black;mso-highlight:black;mso-fareast-language:EN-US">).</span><span style="font-size:9.5pt;font-family:Consolas;color:white;background:black;mso-highlight:black;mso-fareast-language:EN-US">Get</span><span style="font-size:9.5pt;font-family:Consolas;color:#B4B4B4;background:black;mso-highlight:black;mso-fareast-language:EN-US">(</span><span style="font-size:9.5pt;font-family:Consolas;color:white;background:black;mso-highlight:black;mso-fareast-language:EN-US">grange</span><span style="font-size:9.5pt;font-family:Consolas;color:#B4B4B4;background:black;mso-highlight:black;mso-fareast-language:EN-US">,</span><span style="font-size:9.5pt;font-family:Consolas;color:white;background:black;mso-highlight:black;mso-fareast-language:EN-US">
</span><span style="font-size:9.5pt;font-family:Consolas;color:#B5CEA8;background:black;mso-highlight:black;mso-fareast-language:EN-US">2</span><span style="font-size:9.5pt;font-family:Consolas;color:#B4B4B4;background:black;mso-highlight:black;mso-fareast-language:EN-US">);</span><span style="font-size:9.5pt;font-family:Consolas;color:white;background:black;mso-highlight:black;mso-fareast-language:EN-US"><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:white;background:black;mso-highlight:black;mso-fareast-language:EN-US">&nbsp;
</span><span style="font-size:9.5pt;font-family:Consolas;color:#B4B4B4;background:black;mso-highlight:black;mso-fareast-language:EN-US">}</span><span style="font-size:9.5pt;font-family:Consolas;color:white;background:black;mso-highlight:black;mso-fareast-language:EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></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&#8217;m curious &#8230; When we call UpdatePropertyInformation, inside the proxy code, it tests the location (of
 the proxy&#8217;s object) and if CLIENT fetches values from the local proxy only.<o:p></o:p></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 &#8216;special&#8217; 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. <o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></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&#8217;ve made another mistake and we can use the informationonly method after all)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">thanks<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">JB<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></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:utkarsh.ayachit@kitware.com]
<br>
<b>Sent:</b> 23 October 2013 12:43<br>
<b>To:</b> Biddiscombe, John A.<br>
<b>Cc:</b> paraview-developers@paraview.org<br>
<b>Subject:</b> Re: [Paraview-developers] Get data from server to client (helper?)<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<div>
<p class="MsoNormal">Cool. Glad to know it's working.<o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class="MsoNormal">Utkarsh<o:p></o:p></p>
</div>
</div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><o:p>&nbsp;</o:p></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:<o:p></o:p></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'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<o:p></o:p></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">utkarsh.ayachit@kitware.com</a>]<o:p></o:p></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">paraview-developers@paraview.org</a><br>
&gt; Subject: Re: [Paraview-developers] Get data from server to client (helper?)<br>
&gt;<o:p></o:p></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's<br>
&gt; deleted. Try this:<br>
&gt;<br>
&gt; &#43; Create Sphere<br>
&gt; &#43; Apply<br>
&gt; &#43; Delete Sphere<br>
&gt;<br>
&gt; You'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">utkarsh.ayachit@kitware.com</a>&gt; wrote:<br>
&gt; &gt; I don;t see anything wrong with what you're doing. Let me try it out<br>
&gt; &gt; to see if there'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">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; &#43; 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; &#43; 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; &#43; 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; &#43; AddInformation() is used to reduce the results in parallel. Since<br>
&gt; &gt;&gt;&gt; you don'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've experimented with<br>
&gt; &gt;&gt; &nbsp; 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<o:p></o:p></p>
</div>
</div>
</div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
</div>
</div>
</body>
</html>