<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:"Calibri","sans-serif";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:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";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:"Calibri","sans-serif";color:#1F497D"><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">
</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">-></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">"GradientRange"</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">
</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"> </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">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">-></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">"GradientRange"</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"> 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">"GradientRange"</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">
</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:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";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.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";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. <o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";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)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">thanks<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">JB<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </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:"Tahoma","sans-serif"">From:</span></b><span lang="EN-US" style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> 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> </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> </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> </o:p></p>
<div>
<p class="MsoNormal">On Tue, Oct 22, 2013 at 4:56 PM, Biddiscombe, John A. <<a href="mailto:biddisco@cscs.ch" target="_blank">biddisco@cscs.ch</a>> 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>
> -----Original Message-----<br>
> 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">> 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>
><o:p></o:p></p>
</div>
<div>
<div>
<p class="MsoNormal">> 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<o:p></o:p></p>
</div>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</div>
</div>
</body>
</html>