<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:x="urn:schemas-microsoft-com:office:excel" xmlns:p="urn:schemas-microsoft-com:office:powerpoint" xmlns:a="urn:schemas-microsoft-com:office:access" xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882" xmlns:s="uuid:BDC6E3F0-6DA3-11d1-A2A3-00AA00C14882" xmlns:rs="urn:schemas-microsoft-com:rowset" xmlns:z="#RowsetSchema" xmlns:b="urn:schemas-microsoft-com:office:publisher" xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet" xmlns:c="urn:schemas-microsoft-com:office:component:spreadsheet" xmlns:odc="urn:schemas-microsoft-com:office:odc" xmlns:oa="urn:schemas-microsoft-com:office:activation" xmlns:html="http://www.w3.org/TR/REC-html40" xmlns:q="http://schemas.xmlsoap.org/soap/envelope/" xmlns:rtc="http://microsoft.com/officenet/conferencing" xmlns:D="DAV:" xmlns:Repl="http://schemas.microsoft.com/repl/" xmlns:mt="http://schemas.microsoft.com/sharepoint/soap/meetings/" xmlns:x2="http://schemas.microsoft.com/office/excel/2003/xml" xmlns:ppda="http://www.passport.com/NameSpace.xsd" xmlns:ois="http://schemas.microsoft.com/sharepoint/soap/ois/" xmlns:dir="http://schemas.microsoft.com/sharepoint/soap/directory/" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:dsp="http://schemas.microsoft.com/sharepoint/dsp" xmlns:udc="http://schemas.microsoft.com/data/udc" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:sub="http://schemas.microsoft.com/sharepoint/soap/2002/1/alerts/" xmlns:ec="http://www.w3.org/2001/04/xmlenc#" xmlns:sp="http://schemas.microsoft.com/sharepoint/" xmlns:sps="http://schemas.microsoft.com/sharepoint/soap/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:udcs="http://schemas.microsoft.com/data/udc/soap" xmlns:udcxf="http://schemas.microsoft.com/data/udc/xmlfile" xmlns:udcp2p="http://schemas.microsoft.com/data/udc/parttopart" xmlns:wf="http://schemas.microsoft.com/sharepoint/soap/workflow/" xmlns:dsss="http://schemas.microsoft.com/office/2006/digsig-setup" xmlns:dssi="http://schemas.microsoft.com/office/2006/digsig" xmlns:mdssi="http://schemas.openxmlformats.org/package/2006/digital-signature" xmlns:mver="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns:mrels="http://schemas.openxmlformats.org/package/2006/relationships" xmlns:spwp="http://microsoft.com/sharepoint/webpartpages" xmlns:ex12t="http://schemas.microsoft.com/exchange/services/2006/types" xmlns:ex12m="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:pptsl="http://schemas.microsoft.com/sharepoint/soap/SlideLibrary/" xmlns:spsl="http://microsoft.com/webservices/SharePointPortalServer/PublishedLinksService" xmlns:Z="urn:schemas-microsoft-com:" xmlns:st="" 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 12 (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;}
/* 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;}
p
{mso-style-priority:99;
mso-margin-top-alt:auto;
margin-right:0cm;
mso-margin-bottom-alt:auto;
margin-left:0cm;
font-size:12.0pt;
font-family:"Times New Roman","serif";}
span.EmailStyle18
{mso-style-type:personal-reply;
font-family:"Calibri","sans-serif";
color:#1F497D;}
.MsoChpDefault
{mso-style-type:export-only;}
@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">Lars<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">I’m not completely sure what you want, but here’s what I was thinking<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">class vtkMyExporter ..... {<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">the usual vtkSetGetStuff and all the write, update, etc<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"> void SetMyNameString(const char *) // for a single dataset/actor<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"> void SetMyNameStringList(const char **) // for a list of items<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"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">this gets wrapped by client server etc etc<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">In the GUI, you could query the name from the pqXXX stuff, I have a similar snippet that does this<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><b><span style="font-family:"Courier New"">
<span style="color:green">pqPipelineSource</span> *<span style="color:green">source</span> = *<span style="color:green">it</span>;</span></b><span style="font-family:"Courier New""><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><b><span style="font-family:"Courier New"">
<span style="color:green">std</span>::<span style="color:green">string</span> <span style="color:green">
xmlName</span> = <span style="color:green">source</span>-><span style="color:green">getProxy</span>()-><span style="color:green">GetXMLName</span>();</span></b><span style="font-family:"Courier New""><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">now you want the name, not the XML name, so use that<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">but now you can
<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><b><span style="font-family:"Courier New""> <span style="color:green">vtkSMPropertyHelper</span>
<span style="color:green">modified</span>(<span style="color:green">source</span>-><span style="color:green">getProxy</span>(),
<span style="color:blue">"</span></span></b><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">MyNameString</span><b><span style="font-family:"Courier New";color:blue">"</span></b><b><span style="font-family:"Courier New"">);</span></b><span style="font-family:"Courier New""><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><b><span style="font-family:"Courier New"">
<span style="color:green">modified</span>.<span style="color:green">Set</span>(<span style="color:green">xmlName.c_str()</span>); // or something like that<o:p></o:p></span></b></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-family:"Courier New"">then you need to push your string into the VTK class using something like<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt"><b><span style="font-family:"Courier New";color:green">source</span></b><b><span style="font-family:"Courier New"">-><span style="color:green">getProxy</span>()->UpdateVTKObjects()<o:p></o:p></span></b></p>
<p class="MsoNormal" style="margin-left:36.0pt"><b><span style="font-family:"Courier New";color:green">or UpdatePipeline (</span></b><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">I forget the correct calls)</span><b><span style="font-family:"Courier New""><o:p></o:p></span></b></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">and because your custom SetMyNameString doesn’t trigger a modified in the pipeline, you can carry on with doing the write, but the exporter has the string passed
in from he GUI just before it writes. You can pass a string list if you want and make sure the order matches the order of writes so the names match.
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Since I’m not certain what you’re doing, this is a bit hand wavy, but you get the idea<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">Not sure if this helps your exact use case ...<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>
<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-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""> Lars Bilke [mailto:lars.bilke@ufz.de]
<br>
<b>Sent:</b> 18 August 2011 09:14<br>
<b>To:</b> Biddiscombe, John A.<br>
<b>Cc:</b> Utkarsh Ayachit; ParaView Mailliste<br>
<b>Subject:</b> Re: [Paraview] Get name of object in Pipeline Browser<o:p></o:p></span></p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">Thanks for your answers! <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">John,<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">where on the gui-side do I need to pass that string? Do I need to modify the ParaView sources? Because I only want to write a plugin which should be redistributable to colleagues which have only the ParaView binaries installed.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">And your suggestion assumes that I only want to export one actor right? What I want is to export all actors in one step.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<div>
<p class="MsoNormal">Lars<o:p></o:p></p>
</div>
</div>
<p><span style="color:#A0A0A8">Am Mittwoch, 17. August 2011 um 15:45 schrieb Biddiscombe, John A.:<o:p></o:p></span></p>
<blockquote style="border:none;border-left:solid windowtext 1.0pt;padding:0cm 0cm 0cm 8.0pt;margin-left:0cm;margin-top:5.0pt;margin-bottom:5.0pt">
<div>
<div>
<p class="MsoNormal">It'd probably be easier to add a method to the vtk-exporter class which accepts a string, and from the gui, pass the string in just before export - because you can get it the proxy name from the gui end. Make sure the SetProxyName(char*...)
method doesn't call Modified. (ie don't use SetStringMacro)<br>
<br>
JB<br>
<br>
-----Original Message-----<br>
From: paraview-bounces@paraview.org [<a href="mailto:paraview-bounces@paraview.org">mailto:paraview-bounces@paraview.org</a>] On Behalf Of Utkarsh Ayachit<br>
Sent: 17 August 2011 15:16<br>
To: Lars Bilke<br>
Cc: ParaView Mailliste<br>
Subject: Re: [Paraview] Get name of object in Pipeline Browser<br>
<br>
It's not possible, not from a simple exporter plugin.The exporter<br>
lives entirely in the VTK world without any knowledge of proxies. A<br>
unconventional approach would be explicitly make the exporter plugin<br>
link agains the pqCore library, then you can access the<br>
pqApplicationCore and other singletons (like ProxyManager) and get<br>
information about what sources are present and what their names are<br>
(this is acceptable since exporter work entirely on the client-side).<br>
It is still, however, non trivial to determine which actor corresponds<br>
to what source proxy.<br>
<br>
<br>
<br>
On Wed, Aug 17, 2011 at 3:40 AM, Lars Bilke <<a href="mailto:lars.bilke@ufz.de">lars.bilke@ufz.de</a>> wrote:<br>
<br>
<o:p></o:p></p>
<div>
<p class="MsoNormal">Dear ParaView users,<br>
is it possible to programmatically get the name of an object in the Pipeline<br>
Browser? To be more specific I need to get this name from a vtkActor. I am<br>
writing a exporter plugin<br>
(see <a href="http://www.mail-archive.com/paraview@paraview.org/msg12939.html">http://www.mail-archive.com/paraview@paraview.org/msg12939.html</a>) and<br>
want to name my objects in the exported file.<br>
Thanks for your help,<br>
Lars.<br>
<br>
<br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at<br>
<a href="http://www.kitware.com/opensource/opensource.html">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the ParaView Wiki at:<br>
<a href="http://paraview.org/Wiki/ParaView">http://paraview.org/Wiki/ParaView</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.paraview.org/mailman/listinfo/paraview">http://www.paraview.org/mailman/listinfo/paraview</a><o:p></o:p></p>
</div>
<p class="MsoNormal">_______________________________________________<br>
Powered by <a href="http://www.kitware.com">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html">
http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the ParaView Wiki at: <a href="http://paraview.org/Wiki/ParaView">
http://paraview.org/Wiki/ParaView</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.paraview.org/mailman/listinfo/paraview">http://www.paraview.org/mailman/listinfo/paraview</a><o:p></o:p></p>
</div>
</div>
</blockquote>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</div>
</body>
</html>