[Paraview] casting vtkPointData* to double*

Moreland, Kenneth kmorel at sandia.gov
Fri Sep 5 14:21:40 EDT 2008


Note that ParaView does not really use the active scalars, so there is a
good chance that you will be unpleasantly surprised when you don't get the
array you expect.

ParaView uses a newer convention of vtkAlgorithm to specify input arrays:
the vtkAlgorithm::SelectInputScalars() method.  The SelectInputScalars
method has a 5 argument signature which I won't get into, but can be set
through the server manager with a StringVectorProperty that has an
ArrayListDomain assigned to it.  The XML for defining this property looks
something like this.

     <StringVectorProperty
        name="SelectInputScalars"
        command="SetInputArrayToProcess"
        number_of_elements="5"
        element_types="0 0 0 0 2"
        animateable="0"
        label="Contour By">
          <ArrayListDomain name="array_list" attribute_type="Scalars">
            <RequiredProperties>
               <Property name="Input" function="Input"/>
            </RequiredProperties>
          </ArrayListDomain>
          <Documentation>
            Doing something with this array...
          </Documentation>
     </StringVectorProperty>

See the ParaView guide for more information on these tags.



More information about the ParaView mailing list