[Paraview] custom vtk filter import into paraview

David Doria daviddoria at gmail.com
Fri Mar 12 09:16:01 EST 2010


On Fri, Mar 12, 2010 at 5:52 AM, Benjamin Kaufner <benkaufner at gmx.de> wrote:

> Hello,
>
> I'd like to add an existing vtk-filter to paraview and so I tried the
> vtkCellDrivatives sample from the wiki. This didn't work (didn't show up in
> the filters menu list) - I assume because of Compute Derivatives is already
> part of the built-in filters.
> So I switched to another filter for testing purpose:
> vtkExtractVectorComponents. In my opinion, it should work with quite the
> same setup in the xml-file like CellDerivatives, except the SourceProxy
> name, class and label entries. Success here in that way, that this new
> filter appeared in the filters list in paraview after restart. But: when I
> want to use it for an existing dataset in the pipeline, I get an error
> message saying :
> ----------------
> ERROR: In ..\..\..src\servers\Common\vtkProcessModule.cxx, line 1051
> vtkProcessModule (0C8F8368): Object type: vtkExtractVectorComponents, could
> not find requested method: "SetInput"
> or the method was called with incorrect arguments.
> ...
> ----------------
> But vtkExtractVectorComponents definitely has the SetInput-method and on
> the other hand going the XML-only way of adding filters to paraview, I don't
> have an influence on how arguments are passed to the function (, do I?)
>
> I hope someone has an advice,
> regards,
> Ben
>
>
Ben, I agree that the wiki should be changed to a filter that is not already
available in Paraview.

I tried to do what you did (here is the code so someone can cut and paste to
reproduce):

<ServerManagerConfiguration>
  <ProxyGroup name="filters">
   <SourceProxy name="ExtractVectorComponents"
class="vtkExtractVectorComponents" label="ExtractVectorComponents">
     <Documentation
        long_help="Extract vector components."
        short_help="Extract vector components.">
     </Documentation>
     <InputProperty
        name="Input"
        command="SetInput">
           <ProxyGroupDomain name="groups">
             <Group name="sources"/>
             <Group name="filters"/>
           </ProxyGroupDomain>
           <DataTypeDomain name="input_type">
             <DataType value="vtkDataSet"/>
           </DataTypeDomain>
      </InputProperty>

   </SourceProxy>
 </ProxyGroup>
</ServerManagerConfiguration>

and I got the same error.

I'd also recommend a warning/error message be added in the first case - "the
CellDerivatives filter is already available in Paraview" or something like
that, instead of it simply not appearing in the filters menu.

Thanks,

David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.paraview.org/pipermail/paraview/attachments/20100312/0d1db152/attachment.htm>


More information about the ParaView mailing list