[Paraview] Adding/writing paraview filters

David Doria daviddoria at gmail.com
Wed Oct 21 15:13:04 EDT 2009


First, just curious - why is there not a separate -devel list for
Paraview as there is for vtk/itk?

I have some time this week and I was hoping to try to implement these:
http://public.kitware.com/Bug/view.php?id=8999
http://public.kitware.com/Bug/view.php?id=8998

For the ICP interface, all that needs to be selected is two items in
the pipeline and have a few text boxes to specify some parameters.
For the Landmark Transform interface, two sets of N points need to be
selected, one from each of the two selected items in the pipeline.

This seems like it should be relatively easy to do, but the
plugin/servermanager/module/proxy terminology is quite confusing to
me.

Is this the guide I should be following?
http://www.itk.org/Wiki/Extending_ParaView_at_Compile_Time

That example shows how to add a source, but I imagine it is very
similar to add a filter? I looked at the paraview user guide and the
rest of the links on the wiki, but I didn't see anything like the
following analysis/descriptions - did I miss something major here?

I looked at the TransformFilter in filters.xml as a starting point -
here are some line by line comments/questions about it:

   <SourceProxy name="TransformFilter" class="vtkTransformFilter"
    label="Transform">

1) What is a source proxy? This filter will use the vtkTransformFilter
filter, and it will be called "Transform" in the paraview menu.

    <Documentation
       long_help="This filter applies transformation to the polygons."
       short_help="Transform polygonal data.">
      The Transform filter allows you to specify the position, size,
and orientation of polygonal, unstructured grid, and curvilinear data
sets.
    </Documentation>

2) Where does this help text get displayed?

    <InputProperty
       name="Input"
       command="SetInputConnection">

3) We want to call SetInputConnection() on the input, which is called
Input. Is Input taken to be the selected item in the pipeline you are
attempting to apply the filter to?

          <ProxyGroupDomain name="groups">
            <Group name="sources"/>
            <Group name="filters"/>
          </ProxyGroupDomain>

4) I'm assuming "Group name" means to add this to the "Filters" menu
in paraview? Why is "sources" also a "group name"?

          <DataTypeDomain name="input_type">
            <DataType value="vtkPointSet"/>
          </DataTypeDomain>

5) What is "DataTypeDomain"? I understand that vtkPointSet is the
input type to vtkTransformFilter.

          <Documentation>
            This property specifies the input to the Transform filter.
          </Documentation>
     </InputProperty>

6) Where does this documentation get displayed/placed?

     <ProxyProperty name="Transform" command="SetTransform">

7) What is a ProxyProperty vs an InputProperty?

           <ProxyGroupDomain name="groups">
              <Group name="transforms"/>
           </ProxyGroupDomain>

8) Where does this "group" called "transforms" appear?

           <ProxyListDomain name="proxy_list">
              <Proxy group="extended_sources" name="Transform3" />
           </ProxyListDomain>

9) What is "extended_sources" and "Transform3"?

           <Documentation>
             The values in this property allow you to specify the
transform (translation, rotation, and scaling) to apply to the input
dataset.
           </Documentation>

10) I see that this string gets displayed if you hover over any of the
items in the transform GUI.


Even though they are similar, the two things I am trying to implement
could be quite different because with the Transform filter, you simply
choose an object in the pipeline and apply that filter to the object -
with my things you have to select TWO things in the pipeline (the
source and destination objects, in the case of ICP). Is there an easy
way to do this? Can you simply ctrl+click items in the pipeline to
select them and then sort out the inputs in the filter?

Where is the code that creates the GUI (to take user input of the
transformation) for this filter?

Can someone please help get me started? I think this will be a useful
exercise - I intend to document the process of adding a filter and
constructing the interface GUI and add it to the wiki so that future
users can hopefully contribute to the project with less of a learning
curve.

Thanks!

David


More information about the ParaView mailing list