[vtkusers] VTK data files and formats...
Will Schroeder
will.schroeder at kitware.com
Tue Aug 22 20:49:57 EDT 2000
Hi Terry-
Here's what I would do. Create in one file the geometry, in your case
structured points. Then in another file create field data (that contains
your dataset attributes). One reader reads the geometry, the other (an
instance of vtkDataObjectReader) the field data. Then merge them together
to create a dataset with associated field data. The key (surprisingly
enough :) is vtkMergeDataObjectFilter. There is a script
vtk/graphics/examplesTcl/mergeDataObject.tcl that demonstrates how this is
done. Note that you usually also have to use
vtkFieldDataToAttributeDataFilter to create the attributes (e.g., vectors,
scalars, etc.) from the field data that is merged into the geometry.
Will
At 10:52 AM 8/22/2000 -0700, Terry J. Ligocki wrote:
>I have been using, creating, and reading VTK data files (especially Poly
>Data, Structured Points, and Structured Grids) for some time now and I
>have one major question/comment:
>
>Is there any way in the current format to reference data in another file
>(short of replicating that data in the current file - which isn't a
>reference anyway, :-)?
>
>For example, I have a file with (x,y,z) coordinates for a Structured Grid
>and hundreds of time steps of scalar data. The coordinates don't change
>with time. Currently, I seem to have one of two choices:
> * Create a Structured Grid file for each time step with a copy of the
> (x,y,z) coordinates and the data - this creates a lot of redundant data
> (the coordinates) and increases the size of the data set by about a
> factor of 4.
> * Create a Structured Grid file for the coordinates with no data,
> create a Structured Points file for each time step with the data, read
> the Structured Grid once, and for each time step read the a Structured
> Points and set the Structured Grid's point data to the Structured Points'
> point data. This is what I do and it works but it seems a little weird, :-).
>Also, in general, I often have "raw" ASCII or binary data (meaning data or
>coordinates with no dimensional information) available in some files and
>I'd like to generate a VTK file which references this data without
>concatenating everything together into one file. Basically, I'd like to
>be able to "include" other files in a VTK data file. It could, of course,
>be made more complex but this would be enough to cover most of the things
>I have come across.
>
>Is something like this already possible? If not, I'd be interested to
>helping add it but I wanted to make sure it wasn't already possible and
>then to discuss how to implement it. I think it would be a good idea to
>add a very simple extension and then think/worry about more sophisticated
>extensions.
>
>That's all for now...
>
> Terry J. (Ligocki, tjligocki at lbl.gov, (510)486-6140)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20000822/056cd9ef/attachment.htm>
More information about the vtkusers
mailing list