[Paraview] Define a constant value by block

Utkarsh Ayachit utkarsh.ayachit at kitware.com
Wed Apr 21 15:34:19 EDT 2010


> But could you coufirm at me, I'm not sure to understand well : the first
> option that you suggest consists in storing the value on each node or cell
> of each block, doesn't it ?

No. Every  vtkStructuredGrid has 3 types of attributes:
* PointData -- for each point
* CellData -- for each cell
* FieldData -- not associated with any thing. Just an arbitrary
collection of attributes.

FieldData can be accessed using vtkDataObject::GetFieldData() API.
You can add an vtkDoubleArray with name (say  RotationalSpeed) with a
single tuple which is the speed for that block to this FieldData. Most
filters simply pass through the field data, so it should be propagated
from the reader through any intermediate filters to your filter which
is actually making use of the rotational speed.

Utkarsh


More information about the ParaView mailing list