[Paraview] Finding the Input Array for A Module

Kent Eschenberg eschenbe at psc.edu
Wed Jun 28 17:48:02 EDT 2006


A new filter I've written compiles and runs without error but cannot obtain 
the user's choice for the input array. I'd appreciate any suggestions or 
questions.

The test: start ParaView; read a file (1 scalar and 1 vector per cell, no 
point data); then connect the new filter. The name of the scalar is 
displayed on the GUI button as expected. When I click "Accept" my filter 
tries to obtain the selection, fails, and prints a message to that effect.

I've used the XML and source for for the vtkSurfaceVectors (SV) module as a 
guide for my module (MM).

SV inherits from vtkDataSetAlgorithm and vtkAlgorithm while MM inherits 
from vtkPolyDataAlgorithm and vtkAlgorithm. The server manager XML for both 
use vtkAlgorithm::SetInputArrayToProcess to record the user's selection.

SV uses vtkAlgorithm::GetInputArrayToProcess to retreive this selection 
with idx set to 0. I don't understand - that would seem to always get the 
0th array no matter what the user selects. What have I missed?

In MM GetInputArrayToProcess returns null. Here is a piece of its server 
manager XMl which is nearly identical to that for SV:

         <StringVectorProperty
            name="SelectInputScalars"
            command="SetInputArrayToProcess"
            number_of_elements="5"
            element_types="0 0 0 0 2"
            animateable="0"
         >
            <ArrayListDomain name="array_list" attribute_type="Scalars">
               <RequiredProperties>
                  <Property name="Input" function="Input"/>
               </RequiredProperties>
            </ArrayListDomain>
         </StringVectorProperty>

The corresponding GUI XML for this parameter is

      <ArrayMenu
         id="arrMen"
         input_menu="inpMen"
         trace_name="Scalars"
         property="SelectInputScalars"
         label="Variable"
         help="Input cell scalar used for point density"
      />

Help!

Kent
Pittsburgh Supercomputing Center



More information about the ParaView mailing list