Perfect. It works, thank you.
PB Von: Paul Edwards [mailto:[email protected]] Gesendet: Donnerstag, 29. März 2012 22:45 An: Boettcher, Prof. Dr. Peter; paraview Betreff: Re: AW: [Paraview] PluginFilter based on vtkPolyDataAlgorithm with two different types of input data It's a virtual method on vtkAlgorithm. Vtkpolydataalgorithm implements a function that the type to polydata for all ports. Regards, Paul On 29 Mar 2012 21:27, "Boettcher, Prof. Dr. Peter" <[email protected]> wrote: Great! Do I have to do that in the xml-file or in the filter class on initialization? Regards, Peter. Von: Paul Edwards [mailto:[email protected]] Gesendet: Donnerstag, 29. März 2012 22:25 An: Boettcher, Prof. Dr. Peter Betreff: Re: [Paraview] PluginFilter based on vtkPolyDataAlgorithm with two different types of input data Just implement the FillInputPortInformation and return the right type for the port requested. Regards, Paul On 29 Mar 2012 20:30, "Boettcher, Prof. Dr. Peter" <[email protected]> wrote: I try to implement a vtkPolyDataAlgorithm 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: <InputProperty name="3DModel" port_index="0" command="SetInputConnection"> <ProxyGroupDomain name="groups"> <Group name="sources"/> <Group name="filters"/> </ProxyGroupDomain> <DataTypeDomain name="input_type"> <DataType value="vtkPolyData"/> </DataTypeDomain> </InputProperty> <InputProperty name="3DVolume" port_index="1" command="SetInputConnection"> <ProxyGroupDomain name="groups"> <Group name="sources"/> <Group name="filters"/> </ProxyGroupDomain> <DataTypeDomain name="input_type"> <DataType value="vtkImageData"/> </DataTypeDomain> </InputProperty> 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: ERROR: In ..\..\..\VTK\Filtering\vtkDemandDrivenPipeline.cxx, line 827 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. ERROR: In ..\..\..\VTK\Filtering\vtkDemandDrivenPipeline.cxx, line 827 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. ERROR: In ..\..\..\VTK\Filtering\vtkDemandDrivenPipeline.cxx, line 827 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. Obviously, the plugin does only accept polydata as input, because it is based on a vtkPolyDataAlgorithm filter. Is there a way I could mix both data types as input to a vtkPolyDataAlgorithm? Regards, Peter. --------------------------------------------------------- Prof. Dr. Peter Böttcher, DipECVS European Veterinary Specialist in Surgery Fachtierarzt für Kleintierchirurgie Klinik für Kleintiere Universität Leipzig An den Tierkliniken 23 D-04103 Leipzig (Germany) Tel: +49-341-9738700 <tel:%2B49-341-9738700> Fax: +49-341-9738799 <tel:%2B49-341-9738799> Email: [email protected] <mailto:[email protected]> _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the ParaView Wiki at: http://paraview.org/Wiki/ParaView Follow this link to subscribe/unsubscribe: http://www.paraview.org/mailman/listinfo/paraview
_______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the ParaView Wiki at: http://paraview.org/Wiki/ParaView Follow this link to subscribe/unsubscribe: http://www.paraview.org/mailman/listinfo/paraview
