<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; color: rgb(0, 0, 0); font-size: 14px; font-family: Calibri, sans-serif; ">
<div>
<div>
<div>The instructions I gave are for if you are programming your own reader for a ParaView plugin. If you are using an existing reader and cannot or do not want to change the software, the easiest thing to do is probably to load in the group as you are to get
 those 10 objects in the Pipeline Browser. Then select all of those objects and apply the Group Datasets filter. You can then apply further filters to that group an it will be applied to all data.</div>
</div>
</div>
<div><br>
</div>
<div>-Ken</div>
<div><br>
</div>
<span id="OLK_SRC_BODY_SECTION">
<div style="font-family:Calibri; font-size:11pt; text-align:left; color:black; BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BORDER-TOP: #b5c4df 1pt solid; BORDER-RIGHT: medium none; PADDING-TOP: 3pt">
<span style="font-weight:bold">From: </span>庞庆源 &lt;<a href="mailto:pangqingyuan1991@gmail.com">pangqingyuan1991@gmail.com</a>&gt;<br>
<span style="font-weight:bold">Date: </span>Tuesday, September 17, 2013 7:26 PM<br>
<span style="font-weight:bold">To: </span>Kenneth Moreland &lt;<a href="mailto:kmorel@sandia.gov">kmorel@sandia.gov</a>&gt;<br>
<span style="font-weight:bold">Subject: </span>[EXTERNAL] Re: [Paraview] How does paraview pass multiple filenames to reader plugin?<br>
</div>
<div><br>
</div>
<div>
<div>
<div dir="ltr">If I have 10 files,all of which render a sphere with different radius.Now I want to render all of them into a object,so that I can apply a filter for all of them.
<div>Suppose my files' name are <a href="http://f1.sd">f1.sd</a>,<a href="http://f2.sd">f2.sd</a>,...,<a href="http://f10.sd">f10.sd</a>,paraview will combine them as one f..sd.If I unfold f..sd and choose all of the files,paraview will render ten objects showed
 on the Pipeline Browser.I can only apply a filter for just one of the objects.If I don't unfold f..sd but choose it,paraview will only render the first file,<a href="http://f1.sd">f1.sd</a>.<br>
</div>
<div>This is my real problem.</div>
</div>
<div class="gmail_extra"><br>
<br>
<div class="gmail_quote">2013/9/17 Moreland, Kenneth <span dir="ltr">&lt;<a href="mailto:kmorel@sandia.gov" target="_blank">kmorel@sandia.gov</a>&gt;</span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="font-size:14px;word-wrap:break-word">
<div style="font-family:Calibri,sans-serif">
<div>
<div>The convention for making a reader that accepts multiple files is to first implement a pair of methods in the reader to add file names one at a time and another method to reset the list of file names. Here is some example declarations that would be in
 the reader's header file.</div>
</div>
</div>
<div style="font-family:Calibri,sans-serif"><br>
</div>
<blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px">
<div>
<div><font face="Courier">&nbsp;&nbsp;// Description:</font></div>
<div><font face="Courier">&nbsp; // Adds names of files to be read. The files are read in the order</font></div>
<div><font face="Courier">&nbsp; // they are added.</font></div>
<div><font face="Courier">&nbsp; virtual void AddFileName(const char* fname);</font></div>
<div><font face="Courier"><br>
</font></div>
<div><font face="Courier">&nbsp; // Description:</font></div>
<div><font face="Courier">&nbsp; // Remove all file names.</font></div>
<div><font face="Courier">&nbsp; virtual void RemoveAllFileNames();</font></div>
</div>
</blockquote>
<div style="font-family:Calibri,sans-serif"><br>
</div>
<div style="font-family:Calibri,sans-serif">Then in your reader xml file of the SourceProxy declare a StringVectorProperty with a FileListDomain. Here is an example of that.</div>
<div style="font-family:Calibri,sans-serif"><br>
</div>
<blockquote style="margin:0 0 0 40px;border:none;padding:0px">
<div>
<div><font face="Courier">&nbsp; &nbsp; &nbsp; &lt;StringVectorProperty animateable=&quot;0&quot;</font></div>
<div><font face="Courier">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; clean_command=&quot;RemoveAllFileNames&quot;</font></div>
<div><font face="Courier">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; command=&quot;AddFileName&quot;</font></div>
<div><font face="Courier">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; name=&quot;FileNames&quot;</font></div>
<div><font face="Courier">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; number_of_elements=&quot;0&quot;</font></div>
<div><font face="Courier">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; panel_visibility=&quot;never&quot;</font></div>
<div><font face="Courier">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; repeat_command=&quot;1&quot;&gt;</font></div>
<div><font face="Courier">&nbsp; &nbsp; &nbsp; &nbsp; &lt;FileListDomain name=&quot;files&quot; /&gt;</font></div>
<div><font face="Courier">&nbsp; &nbsp; &nbsp; &nbsp; &lt;Documentation&gt;The list of files to be read by the</font></div>
<div><font face="Courier">&nbsp; &nbsp; &nbsp; &nbsp; reader.&lt;/Documentation&gt;</font></div>
<div><font face="Courier">&nbsp; &nbsp; &nbsp; &lt;/StringVectorProperty&gt;</font></div>
<div style="font-family:Calibri,sans-serif"><br>
</div>
</div>
</blockquote>
<div style="font-family:Calibri,sans-serif">-Ken</div>
<div style="font-family:Calibri,sans-serif"><br>
</div>
<span style="font-family: Calibri, sans-serif; ">
<div style="border-right:medium none;padding-right:0in;padding-left:0in;padding-top:3pt;text-align:left;font-size:11pt;border-bottom:medium none;font-family:Calibri;border-top:#b5c4df 1pt solid;padding-bottom:0in;border-left:medium none">
<span style="font-weight:bold">From: </span>庞庆源 &lt;<a href="mailto:pangqingyuan1991@gmail.com" target="_blank">pangqingyuan1991@gmail.com</a>&gt;<br>
<span style="font-weight:bold">Date: </span>Tuesday, September 17, 2013 5:23 AM<br>
<span style="font-weight:bold">To: </span>paraview &lt;<a href="mailto:paraview@paraview.org" target="_blank">paraview@paraview.org</a>&gt;<br>
<span style="font-weight:bold">Subject: </span>[EXTERNAL] [Paraview] How does paraview pass multiple filenames to reader plugin?<br>
</div>
<div>
<div class="h5">
<div><br>
</div>
<div>
<div>
<div dir="ltr">I have read some source of paraview plugin.All of them &nbsp;define a char pointer such as:
<div>char *FileName;</div>
<div>and have two macro:</div>
<div>
<div>&nbsp;vtkSetStringMacro(FileName);</div>
<div>&nbsp;vtkGetStringMacro(FileName);</div>
<div>But paraview can choose multiple files once.And I would like to get the filenames.So what should I do?Can someone give me a simple example?</div>
-- <br>
<font face="arial,helvetica,sans-serif" size="6" color="#33ff33"><a href="mailto:pangqingyuan1991@gmail.com" target="_blank">庞庆源<span></span><span></span></a></font></div>
</div>
</div>
</div>
</div>
</div>
</span></div>
</blockquote>
</div>
<br>
<br clear="all">
<div><br>
</div>
-- <br>
<font face="arial,helvetica,sans-serif" size="6" color="#33ff33"><a href="mailto:pangqingyuan1991@gmail.com" target="_blank">庞庆源<span></span><span></span></a></font></div>
</div>
</div>
</span>
</body>
</html>