[vtkusers] howto: rectangular grid, circle

David Doria daviddoria+vtk at gmail.com
Wed Feb 10 07:51:03 EST 2010


On Tue, Feb 9, 2010 at 8:31 AM, Nico Schlömer <nico.schloemer at gmail.com>wrote:

> > 5) anything you want (including pairs such as kappa=3.5) (FIELDDATA)
>
> Are there examples of how to store "stuff" in FIELDDATA, e.g.,
> "kappa=3.5", int-arrays, chars,...
>
> Cheers,
> Nico
>

This example showed how to add the center of mass of the data to the
FieldData:
http://www.vtk.org/Wiki/VTK/Examples/FieldData

I have now added a section to add a single int value.

You just have to replace vtkIntArray with vtkWhateverTypeArray, add the
value into the array, then AddArray the array to the polydata's FieldData.
<http://www.vtk.org/Wiki/VTK/Examples/FieldData>
Thanks,

David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20100210/1f4cd9c6/attachment.htm>


More information about the vtkusers mailing list