[vtkusers] vtkDataObject with multiple fields

David E DeMarle dave.demarle at kitware.com
Wed May 4 09:51:54 EDT 2011


vtkDataObject defines only one field but:
1) that field can hold any number of arrays, so you could use a naming
scheme. See blow.vtk for example.
2) you could subclass vtkDataObject to support more fields. See for
example how vtkDataSet adds two more fields to store the point and
cell associated arrays.

Note also that the modern way to do time support in vtk is to make a
reader that loads different data in response to the UPDATE_TIME_STEPS
key. See http://www.vtk.org/Wiki/VTK/Time_Support for an explanation.

David E DeMarle
Kitware, Inc.
R&D Engineer
28 Corporate Drive
Clifton Park, NY 12065-8662
Phone: 518-371-3971 x109



On Wed, May 4, 2011 at 6:25 AM, Jasper VTK <jaspervtk at gmail.com> wrote:
> Dear VTK Users,
> I am relatively new to VTK, and have run into some issues.
> My goal is to build a vtkDataObject, containing multiple fields. This
> DataObject would be written to an ASCII file using an appropriate writer, to
> be processed in the pipeline later on. Each FIELD in the vtkDataObject would
> contain the data at a specific timestep.
> The vtkDataFile I am trying to build resembles the file blowAttr.vtk (a vtk
> example of a previous release). This file can be found here for
> reference: http://dl.dropbox.com/u/182396/blowAttr.vtk
> I am able to read my data, build a single vtkFieldData object, and then add
> this vtkFieldData to a vtkDataObject using the SetFieldData() method.
> How can i add multiple FIELDS to a vtkDataObject? Do is use a
> vtkDataObjectWriter?
> I have been looking for a way to do this for quite some time. Any hints on
> the matter would be greatly appreciated.
> Kind regards,
> Jasper
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
>



More information about the vtkusers mailing list