[Paraview] Selecting Cell Data
Kent Eschenberg
eschenbe at psc.edu
Thu Jul 6 15:38:48 EDT 2006
How does one set the XML for a module that must use cell data? My module works as expected in these ways:
- it will only connect to sources providing cell data
- only variables attached to cells are shown in the array menu
But inside the new module's RequestData routine the call
vtkDataArray *D = this->GetInputArrayToProcess( 0, inputVector )
returns a null. The superclass for the new module is vtkPolyDataAlgorithn and so when I dug in with the debugger I eventually, as expected, got to
vtkAlgorithm::GetInputArrayToProcess( int idx, vtkDataObject* input)
where on line 305 the test
if (fieldAssoc == vtkDataObject::FIELD_ASSOCIATION_POINTS)
evaluates to true. It therefore tries to find point data with the given name and fails. In other words, I need to change my XML so that fieldAssoc indicates that we want cell data.
Here's a part of the GUI xml:
======
<Filter class="vtkCloud">
<Input name="Input" class="vtkDataSet">
<ArrayRequirement attribute="Cell" components="1"/>
</Input>
</Filter>
<InputMenu id="inpMen" trace_name="Input" input_name="Input"
property="Input" label="Input" help="Input to this filter" />
<ArrayMenu id="arrMen" input_menu="inpMen" trace_name="Scalars"
property="VariableForDensity" label="Density Scalar"
help="Input cell scalar used for point density" />
======
And here is a part of the server manager XMl:
======
<InputProperty name="Input" command="SetInput">
<ProxyGroupDomain name="groups">
<Group name="sources"/>
<Group name="filters"/>
</ProxyGroupDomain>
<DataTypeDomain name="input_type">
<DataType value="vtkDataSet"/>
</DataTypeDomain>
<InputArrayDomain name="input_array1" attribute_type="cell"
number_of_components="1" />
</InputProperty>
<StringVectorProperty name="VariableForDensity"
command="SetInputArrayToProcess" number_of_elements="5"
element_types="0 0 0 0 2" >
<ArrayListDomain name="array_list" attribute_type="Scalars"
input_domain_name="input_array1" >
<RequiredProperties>
<Property name="Input" function="Input"/>
</RequiredProperties>
</ArrayListDomain>
</StringVectorProperty>
======
My system:
OS: Redhat 2.6.14-1.1656_FC4
Compiler: gcc 4.0.2
ParaView: 2.4.3
Thanks in advance!
Kent
Pittsburgh Supercomputing Center
More information about the ParaView
mailing list