<HTML>
<HEAD>
<TITLE>Re: [Paraview] Plugin that is a reader and a filter</TITLE>
</HEAD>
<BODY>
<FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'>It&#8217;s not clear to me exactly what the original question is asking. &nbsp;Are you simply trying to define both a reader and filter in the same plugin? &nbsp;In that case, you provide two ProxyGroup elements in the server manager definition and place the reader and filter in the appropriate one.<BR>
<BR>
</SPAN></FONT><BLOCKQUOTE><FONT SIZE="2"><FONT FACE="Consolas, Courier New, Courier"><SPAN STYLE='font-size:10pt'>&lt;ProxyGroup name=&quot;sources&quot;&gt;<BR>
&nbsp;&nbsp;// define reader<BR>
&lt;/ProxyGroup&gt;<BR>
&lt;ProxyGroup name=&quot;filters&quot;&gt;<BR>
&nbsp;&nbsp;// define filter<BR>
&lt;/ProxyGroup&gt;<BR>
</SPAN></FONT></FONT></BLOCKQUOTE><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'><BR>
Is the question that you want the filter automatically applied when you open the file? &nbsp;In that case, Utkarsh&#8217;s solution of creating a new metareader in C++ that internally calls both the reader and filter is probably the cleanest solution. &nbsp;It may also be possible to create a composite filter in ParaView. &nbsp;However, I&#8217;m not sure anyone as actually tried to make a composite filter that starts with a reader, so the implementation in ParaView might not support that.<BR>
<BR>
Do you really want to see both the reader and filter in the pipeline browser independently but have them both automatically created when the file is opened? &nbsp;There is no way to do this with ParaView&#8217;s conventional file open mechanism. &nbsp;However, it&#8217;s pretty easy to create a plugin that provides a toolbar button and/or a menu item that invokes a custom open operation that sets up whatever pipeline you want. &nbsp;The Wiki plugin page has instructions on creating toolbar and menu actions in a plugin (which can be integrated in the same plugin where readers and filters are provided). &nbsp;And as Andy stated, the SLACTools plugin has an example of providing one of these custom open operations.<BR>
<BR>
-Ken<BR>
<BR>
<BR>
On 9/22/10 7:13 AM, &quot;Utkarsh Ayachit&quot; &lt;<a href="utkarsh.ayachit@kitware.com">utkarsh.ayachit@kitware.com</a>&gt; wrote:<BR>
<BR>
</SPAN></FONT><BLOCKQUOTE><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'>Easiest solution would be apply the transform within the reader<BR>
itself. You can easily create a vtk-level subclass for your reader<BR>
that can do that. Then this is just a reader.<BR>
<BR>
Utkarsh<BR>
<BR>
On Tue, Sep 21, 2010 at 9:36 PM, David Doria &lt;<a href="daviddoria@gmail.com">daviddoria@gmail.com</a>&gt; wrote:<BR>
&gt; I want to make a plugin that will read a file (which contains a<BR>
&gt; transform) and apply it to the input of the plugin. Classically I have<BR>
&gt; had either:<BR>
&gt;<BR>
&gt;  &lt;ProxyGroup name=&quot;sources&quot;&gt; // for readers, lets me file-&gt;open to<BR>
&gt; select a file<BR>
&gt;<BR>
&gt; or<BR>
&gt;<BR>
&gt;  &lt;ProxyGroup name=&quot;filters&quot;&gt; // for filters, to do something to the<BR>
&gt; selected object in the pipeline<BR>
&gt;<BR>
&gt; For this plugin I want to do both. Is this possible?<BR>
&gt;<BR>
&gt; I have attached my xml files. Could someone let me know how it needs<BR>
&gt; to be structured to achieve this?<BR>
&gt;<BR>
&gt; Thanks,<BR>
&gt;<BR>
&gt; David<BR>
&gt;<BR>
&gt; _______________________________________________<BR>
&gt; Powered by www.kitware.com<BR>
&gt;<BR>
&gt; 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>
&gt;<BR>
&gt; 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>
&gt;<BR>
&gt; Follow this link to subscribe/unsubscribe:<BR>
&gt; <a href="http://www.paraview.org/mailman/listinfo/paraview">http://www.paraview.org/mailman/listinfo/paraview</a><BR>
&gt;<BR>
&gt;<BR>
_______________________________________________<BR>
Powered by www.kitware.com<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><BR>
<BR>
<BR>
</SPAN></FONT></BLOCKQUOTE><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'><BR>
</SPAN></FONT><FONT SIZE="2"><FONT FACE="Consolas, Courier New, Courier"><SPAN STYLE='font-size:10pt'><BR>
&nbsp;&nbsp;&nbsp;**** &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Kenneth Moreland<BR>
&nbsp;&nbsp;&nbsp;&nbsp;*** &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sandia National Laboratories<BR>
*********** &nbsp;<BR>
*** *** *** &nbsp;email: <a href="kmorel@sandia.gov">kmorel@sandia.gov</a><BR>
** &nbsp;*** &nbsp;** &nbsp;phone: (505) 844-8919<BR>
&nbsp;&nbsp;&nbsp;&nbsp;*** &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;web: &nbsp;&nbsp;<a href="http://www.cs.unm.edu/~kmorel">http://www.cs.unm.edu/~kmorel</a><BR>
</SPAN></FONT></FONT><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'><BR>
</SPAN></FONT>
</BODY>
</HTML>