[Paraview] Setting a single meta data value to a PolyData object

Berk Geveci berk.geveci at kitware.com
Tue Jul 8 10:57:33 EDT 2008


Yes. Create a new data array (with the appropriate name) and add it to
the FieldData. Something like:

vtkFloatArray* newarray = vtkFloatArray::New();
newarray->SetName("foo");

vtkFieldData* fd = vtkFieldData::New();
fd->AddArray(newarray);

output->SetFieldData(fd);

newarray->Delete();
fd->Delete();

The field data is automatically propagated by the pipeline and will be
accessible to all filters downstream.

-berk

On Tue, Jul 8, 2008 at 10:13 AM, Mike Jackson <mike.jackson at imts.us> wrote:
> Is there a facility in ParaView CVS that would allow me to set a named
> meta-data value in the vtkPolyData object? I have some values that I would
> like to filter on (I am writing a custom reader) and I really only need to
> store a single 3 value vector of data into the vtkPolyData object. It isn't
> necessary to store the value on each cell or each point as it is the same
> value everywhere.
>
> Thanks for any help.
> --
> Mike Jackson   Senior Research Engineer
> Innovative Management & Technology Services
>
>
>
> _______________________________________________
> ParaView mailing list
> ParaView at paraview.org
> http://www.paraview.org/mailman/listinfo/paraview
>


More information about the ParaView mailing list