[Paraview-developers] Meaning of fields/tags of filters XML - any suggestion or link

Cory Quammen cory.quammen at kitware.com
Mon Oct 12 11:41:33 EDT 2015


Hi Amit,

Unfortunately, populating a drop down list with point data arrays isn't
documented in the plugin How To. The best bet is to find a reader or filter
that does what you want and copy the XML needed to do the same for your
filter.

In your case, I would look at the "Glyph With Custom Source" filter
definition in

ParaView/ParaViewCore/ServerManager/SMApplication/Resources/filters.xml

The relevant properties are

      <InputProperty command="SetInputConnection"
                     name="Input">
        <ProxyGroupDomain name="groups">
          <Group name="sources" />
          <Group name="filters" />
        </ProxyGroupDomain>
        <DataTypeDomain name="input_type">
          <DataType value="vtkDataSet" />
        </DataTypeDomain>
        <InputArrayDomain attribute_type="point"
                          name="input_array1"
                          number_of_components="1"
                          optional="1" />
        <InputArrayDomain attribute_type="point"
                          name="input_array2"
                          number_of_components="3"
                          optional="1" />
        <Documentation>This property specifies the input to the Glyph
filter.
        This is the dataset from which the points are selecetd to be
glyphed.
        </Documentation>
      </InputProperty>

and

      <StringVectorProperty command="SetInputArrayToProcess"
                            element_types="0 0 0 0 2"
                            name="Scalars"
                            number_of_elements="5">
        <ArrayListDomain attribute_type="Scalars"
                         input_domain_name="input_array1"
                         name="array_list">
          <RequiredProperties>
            <Property function="Input"
                      name="Input" />
          </RequiredProperties>
        </ArrayListDomain>
        <Documentation>Select the input array to be treated as the active
"Scalars".
          You can scale the glyphs using the selected scalars by setting the
          "Scale Mode" property to "scalar"
        </Documentation>
      </StringVectorProperty>

Note the InputArrayDomain defined in the Input property named
"input_array1". It defines a domain (a list of possible values for a
property) of the 1-component point arrays in the input. This domain is used
to populate the combo box for the "Scalars" array by specifying it as the
domain used by the ArrayListDomain of the "Scalars" property.

You'll need to set up domains this way in your filter to get the list of
point data arrays in your property's combo box.

HTH,
Cory



On Mon, Oct 12, 2015 at 7:13 AM, Amit Prabhakar <amitprabhakar05 at gmail.com>
wrote:

> Hello,
>
> I have been using paraview and have written really simple filters in past.
> However, I am lost into writing an appropriate XML for my filter. I am
> using this link as guide:
>
>
> http://www.paraview.org/Wiki/ParaView/Plugin_HowTo#Drop_down_list_with_values_from_input_arrays
>
>
> However, the problem I am facing is understanding the different
> fields/tags of the XML file (filters.xml). For example I want to use the
> point data array names (a string list, I guess) as list of User input to my
> filter.
>
>
> I am specially intrigued by presence of this part:
>
> <RequiredProperties>
>             <Property function="ArrayList"                       name="CellArrayInfo" /> </RequiredProperties>
>
>
> I am also not sure what to change in my source file, while using the
> above XML.
>
> Could anyone please explain this to me? Or pass any link on this topic?
>
> Thanks a lot in advance.
>
>
>
>
>
> --
> ==============================
> Amit Prabhakar
> Singapore.
> ==============================
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Search the list archives at:
> http://markmail.org/search/?q=Paraview-developers
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/paraview-developers
>
>


-- 
Cory Quammen
R&D Engineer
Kitware, Inc.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/paraview-developers/attachments/20151012/b05f9bf4/attachment-0001.html>


More information about the Paraview-developers mailing list