[Paraview] Finding the Input Array for A Module

Kent Eschenberg eschenbe at psc.edu
Fri Jun 30 11:05:34 EDT 2006


>> Can the ParaView GUI make use of this multiple-input feature? That is,
>> provide two pull-downs to select two variables where both are sent to
>> SetInputArrayToProcess(). I didn't see how and so the widget that selects
>> the 2nd input sends it to a method in my new module created for this
>> purpose.
>
>
> There seems to be. vtkPVArrayMenu has an attribute called
> input_attribute_index that defaults to 0. It is not used anywhere but it
> should work. You should be able to use 2 array menus with different
> attribute indices.
>
> -Berk

Searching the provided XML for 2.4.3 turned up exactly one example that 
uses two widgets to set two input variables. I don't count Glyph since it 
uses a special widget. The module, "Ribbon Filter" first establishes two 
"domains" in the XML for the server manager:

    <InputProperty
            ... deleted stuff ...
            <InputArrayDomain name="input_array1" attribute_type="point"
                            number_of_components="3" optional="1"/>
          <InputArrayDomain name="input_array2" attribute_type="point"
                            number_of_components="1" optional="1"/>
     </InputProperty>

Then it refers back to these where the GUI selections are handled:

     <StringVectorProperty
            ... deleted stuff ...
           <ArrayListDomain name="array_list" attribute_type="Scalars"
                            input_domain_name="input_array2">
     </StringVectorProperty>

     <StringVectorProperty
           ... deleted stuff ...
            <ArrayListDomain name="array_list" attribute_type="Vectors"
                            input_domain_name="input_array1">
      </StringVectorProperty>

Is this the best way to select two variables?

Kent
Pittsburgh Supercomputing Center



More information about the ParaView mailing list