How the ArraySelectionDomain works in PV

(Haocheng Liu) #1

Hi, I’m trying to understand how ArraySelectionDomain works in PV and what functions I need to implement in my reader so that I can use this property( Drop Down List with Values from Input File). However I cannot find a proper documentation for it nor can I locate the parser code in PV source code. Would you plz point me to some tutorial/ paraview source codes?

For now, I just follow the pattern in the xdmf3 reader and I can just guess what I need to implement.


(Mathieu Westphal (Kitware)) #2

There is an example usage here :

And it is documented here :

vtkSMArraySelectionDomain is a domain that can be for used for properties that allow users to select an array (or actually any string) based on an information_only property.

The usecase is generally when a reader can, during the RequestInformation pass, recover the available readable array and provide their name in an information_only prop, then the user select the arrays to read during the RequestData pass.

      <StringVectorProperty name="PointArrayInfo"
        <ArraySelectionInformationHelper attribute_name="Point" />

      <StringVectorProperty name="PointArrayStatus"
                            element_types="2 0"
                            label="Point Arrays">
        <ArraySelectionDomain name="array_list">
            <Property name="PointArrayInfo" function="ArrayList" />
          This property contains a list of the point-centered arrays to read.
1 Like