<p>It&#39;s a virtual method on vtkAlgorithm. Vtkpolydataalgorithm implements a function that the type to polydata for all ports.</p>
<p>Regards,<br>
Paul</p>
<div class="gmail_quote">On 29 Mar 2012 21:27, &quot;Boettcher, Prof. Dr. Peter&quot; &lt;<a href="mailto:Boettcher@kleintierklinik.uni-leipzig.de">Boettcher@kleintierklinik.uni-leipzig.de</a>&gt; wrote:<br type="attribution">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div lang="DE" link="blue" vlink="purple"><div><p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">Great! Do I have to do that in the xml-file or in the filter class on initialization?<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">Regards, Peter.<u></u><u></u></span></p>
<p class="MsoNormal"><a name="1366023f5b78830b__MailEndCompose"><span lang="EN-US" style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"><u></u> <u></u></span></a></p><p class="MsoNormal">
<b><span style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;">Von:</span></b><span style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;"> Paul Edwards [mailto:<a href="mailto:paul.m.edwards@gmail.com" target="_blank">paul.m.edwards@gmail.com</a>] <br>
<b>Gesendet:</b> Donnerstag, 29. März 2012 22:25<br><b>An:</b> Boettcher, Prof. Dr. Peter<br><b>Betreff:</b> Re: [Paraview] PluginFilter based on vtkPolyDataAlgorithm with two different types of input data<u></u><u></u></span></p>
<p class="MsoNormal"><u></u> <u></u></p><p>Just implement the FillInputPortInformation and return the right type for the port requested.<u></u><u></u></p><p>Regards,<br>Paul<u></u><u></u></p><div><p class="MsoNormal">On 29 Mar 2012 20:30, &quot;Boettcher, Prof. Dr. Peter&quot; &lt;<a href="mailto:Boettcher@kleintierklinik.uni-leipzig.de" target="_blank">Boettcher@kleintierklinik.uni-leipzig.de</a>&gt; wrote:<u></u><u></u></p>
<div><div><p class="MsoNormal"><span lang="EN-US">I try to implement a </span><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;">vtkPolyDataAlgorithm </span><span lang="EN-US">filter as plugin in PV. The filter has 2 inputs: (1) vtkPolyData and (2) vtkImageData. Within the xml-file the different data types are declared:</span><u></u><u></u></p>
<p class="MsoNormal"><span lang="EN-US"> </span><u></u><u></u></p><p class="MsoNormal"><span lang="EN-US">  &lt;InputProperty</span><u></u><u></u></p><p class="MsoNormal"><span lang="EN-US">         name=&quot;3DModel&quot;</span><u></u><u></u></p>
<p class="MsoNormal"><span lang="EN-US">                port_index=&quot;0&quot;</span><u></u><u></u></p><p class="MsoNormal"><span lang="EN-US">         command=&quot;SetInputConnection&quot;&gt;</span><u></u><u></u></p>
<p class="MsoNormal"><span lang="EN-US">        &lt;ProxyGroupDomain name=&quot;groups&quot;&gt;</span><u></u><u></u></p><p class="MsoNormal"><span lang="EN-US">          &lt;Group name=&quot;sources&quot;/&gt;</span><u></u><u></u></p>
<p class="MsoNormal"><span lang="EN-US">          &lt;Group name=&quot;filters&quot;/&gt;</span><u></u><u></u></p><p class="MsoNormal"><span lang="EN-US">        &lt;/ProxyGroupDomain&gt;</span><u></u><u></u></p><p class="MsoNormal">
<span lang="EN-US">        &lt;DataTypeDomain name=&quot;input_type&quot;&gt;</span><u></u><u></u></p><p class="MsoNormal"><span lang="EN-US">          &lt;DataType value=&quot;vtkPolyData&quot;/&gt;</span><u></u><u></u></p>
<p class="MsoNormal"><span lang="EN-US">        &lt;/DataTypeDomain&gt;</span><u></u><u></u></p><p class="MsoNormal"><span lang="EN-US">        &lt;/InputProperty&gt;</span><u></u><u></u></p><p class="MsoNormal"><span lang="EN-US">      &lt;InputProperty</span><u></u><u></u></p>
<p class="MsoNormal"><span lang="EN-US">         name=&quot;3DVolume&quot;</span><u></u><u></u></p><p class="MsoNormal"><span lang="EN-US">                port_index=&quot;1&quot;</span><u></u><u></u></p><p class="MsoNormal">
<span lang="EN-US">         command=&quot;SetInputConnection&quot;&gt;</span><u></u><u></u></p><p class="MsoNormal"><span lang="EN-US">        &lt;ProxyGroupDomain name=&quot;groups&quot;&gt;</span><u></u><u></u></p><p class="MsoNormal">
<span lang="EN-US">          &lt;Group name=&quot;sources&quot;/&gt;</span><u></u><u></u></p><p class="MsoNormal"><span lang="EN-US">          &lt;Group name=&quot;filters&quot;/&gt;</span><u></u><u></u></p><p class="MsoNormal">
<span lang="EN-US">        &lt;/ProxyGroupDomain&gt;</span><u></u><u></u></p><p class="MsoNormal"><span lang="EN-US">        &lt;DataTypeDomain name=&quot;input_type&quot;&gt;</span><u></u><u></u></p><p class="MsoNormal">
<span lang="EN-US">          &lt;DataType value=&quot;vtkImageData&quot;/&gt;</span><u></u><u></u></p><p class="MsoNormal"><span lang="EN-US">        &lt;/DataTypeDomain&gt;</span><u></u><u></u></p><p class="MsoNormal"><span lang="EN-US">     &lt;/InputProperty&gt;</span><u></u><u></u></p>
<p class="MsoNormal"><span lang="EN-US"> </span><u></u><u></u></p><p class="MsoNormal"><span lang="EN-US">The code compiles without error and the plugin can be loaded into PV. But when I select the plugin in PV the following error occurs:</span><u></u><u></u></p>
<p class="MsoNormal"><span lang="EN-US"> </span><u></u><u></u></p><p class="MsoNormal"><span lang="EN-US"> </span><u></u><u></u></p><p class="MsoNormal"><span lang="EN-US" style="font-size:8.5pt;font-family:Courier;color:maroon">ERROR: In ..\..\..\VTK\Filtering\vtkDemandDrivenPipeline.cxx, line 827</span><u></u><u></u></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:8.5pt;font-family:Courier;color:maroon">vtkPVCompositeDataPipeline (1FBD9388): Input for connection index 0 on input port index 1 for algorithm vtkCTOAM(1F9E8D80) is of type vtkImageData, but a vtkPolyData is required.</span><u></u><u></u></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:8.5pt;font-family:Courier;color:maroon">ERROR: In ..\..\..\VTK\Filtering\vtkDemandDrivenPipeline.cxx, line 827</span><u></u><u></u></p><p class="MsoNormal"><span lang="EN-US" style="font-size:8.5pt;font-family:Courier;color:maroon">vtkPVCompositeDataPipeline (1FBD9388): Input for connection index 0 on input port index 1 for algorithm vtkCTOAM(1F9E8D80) is of type vtkImageData, but a vtkPolyData is required.</span><u></u><u></u></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:8.5pt;font-family:Courier;color:maroon">ERROR: In ..\..\..\VTK\Filtering\vtkDemandDrivenPipeline.cxx, line 827</span><u></u><u></u></p><p class="MsoNormal"><span lang="EN-US" style="font-size:8.5pt;font-family:Courier;color:maroon">vtkPVCompositeDataPipeline (1FBD9388): Input for connection index 0 on input port index 1 for algorithm vtkCTOAM(1F9E8D80) is of type vtkImageData, but a vtkPolyData is required.</span><u></u><u></u></p>
<p class="MsoNormal"><span lang="EN-US"> </span><u></u><u></u></p><p class="MsoNormal"><span lang="EN-US">Obviously, the plugin does only accept polydata as input, because it is based on a </span><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;">vtkPolyDataAlgorithm </span><span lang="EN-US">filter. Is there a way I could mix both data types as input to a </span><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;">vtkPolyDataAlgorithm?</span><u></u><u></u></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;"> </span><u></u><u></u></p><p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;">Regards, Peter.</span><u></u><u></u></p>
<p class="MsoNormal"><span lang="EN-US"> </span><u></u><u></u></p><p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt">---------------------------------------------------------</span><u></u><u></u></p><p class="MsoNormal">
<span lang="EN-US" style="font-size:9.0pt">Prof. Dr. Peter Böttcher, DipECVS</span><u></u><u></u></p><p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt">European Veterinary Specialist in Surgery </span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:9.0pt">Fachtierarzt für Kleintierchirurgie </span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:9.0pt">Klinik für Kleintiere </span><u></u><u></u></p><p class="MsoNormal">
<span style="font-size:9.0pt">Universität Leipzig </span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:9.0pt">An den Tierkliniken 23</span><u></u><u></u></p><p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt">D-04103 Leipzig (Germany)</span><u></u><u></u></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt">Tel: <a href="tel:%2B49-341-9738700" target="_blank">+49-341-9738700</a></span><u></u><u></u></p><p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt">Fax: <a href="tel:%2B49-341-9738799" target="_blank">+49-341-9738799</a></span><u></u><u></u></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt">Email: </span><span style="font-size:9.0pt"><a href="mailto:boettcher@kleintierklinik.uni-leipzig.de" target="_blank"><span lang="EN-US">boettcher@kleintierklinik.uni-leipzig.de</span></a></span><u></u><u></u></p>
<p class="MsoNormal"><span lang="EN-US"> </span><u></u><u></u></p></div></div><p class="MsoNormal" style="margin-bottom:12.0pt"><br>_______________________________________________<br>Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">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" target="_blank">http://paraview.org/Wiki/ParaView</a><br>
<br>Follow this link to subscribe/unsubscribe:<br><a href="http://www.paraview.org/mailman/listinfo/paraview" target="_blank">http://www.paraview.org/mailman/listinfo/paraview</a><u></u><u></u></p></div></div></div></blockquote>
</div>