[vtk-developers] VTK XML File Formats
Brad King
brad.king at kitware.com
Mon Dec 30 10:06:28 EST 2002
Hi Mike,
Thanks for your comments. We definately have time to include some of your
suggestions before an official VTK release includes the current format.
> There's now a reasonable standard for type names and definitions: the
> xmlschema schema. Here's the link to the recommendation:
> http://www.w3.org/TR/xmlschema-2/
I don't see any problem with using the names from that specification. As
long as floating-point data are represented as IEEE, the only remaining
problem for the binary format is byte-ordering. The VTK XML file format
already specifies the byte-order at the top of the file in an attribute of
the VTKFile element.
> Readers should responsible for converting external types into internal
> ones. Similarly, writers should do the encoding
This should be no problem, but I think the writers should just pick an
external type that is large enough for the input they receive. A separate
filter could be written to shrink vtkDataArray data down to the minimal
size needed to store all the values.
> Similarly, "ascii" also doesn't sound right to me either -- there must
> be another standard name for text format. "text"?)
How about "decimal", since the data will be specified in decimal notation
as given by the XML schema you mentioned?
> Since base64 encoding/decoding is already eating cycles, why not just
> use Sun's XDR representation (big endian, IEEE floats/doubles) at least
> as an option for writing to external files?
I'd like to avoid always swapping on little-endian machines. Most data
files will probably be written and read on the same machine type anyway.
I think that using the standard names and taking advantage of the existing
byte-order handling will fix the portability issues.
-Brad
More information about the vtk-developers
mailing list