VTK
|
The vtk xml data file readers / writers store certain vtkInformation
entries that are set on vtkAbstractArray
's GetInformation()
object. Support is currently limited to numeric and string information keys, both single- and vector-valued. Only the information objects attached to arrays are written/read.
Array information is embedded in the <DataArray>
XML element as a series of <InformationKey>
elements. The required attributes name
and location
specify the name and location strings associated with the key – for instance, the vtkDataArray::UNITS_LABEL()
key has name="UNITS_LABEL"
and location="vtkDataArray"
. The length
attribute is required for vector keys.
``` <DataArray [...]> <InformationKey name="KeyName" location="KeyLocation" [ length="N" ]> [...] </InformationKey> <InformationKey [...]> [...] </InformationKey> [...] </DataArray> ```
Specific examples of supported key types:
``` <InformationKey name="Double" location="XMLTestKey"> 1 </InformationKey> ```
``` <InformationKey name="DoubleVector" location="XMLTestKey" length="3">
1
90
260
</InformationKey> ```
``` <InformationKey name="IdType" location="XMLTestKey"> 5 </InformationKey> ```
``` <InformationKey name="String" location="XMLTestKey"> Test String! Line2 </InformationKey> ```
``` <InformationKey name="Integer" location="XMLTestKey"> 408 </InformationKey> ```
``` <InformationKey name="IntegerVector" location="XMLTestKey" length="3">
1
5
45
</InformationKey> ```
``` <InformationKey name="StringVector" location="XMLTestKey" length="3">
First
Second (with whitespace!)
Third (with newline!)
</InformationKey> ```
``` <InformationKey name="UnsignedLong" location="XMLTestKey"> 9 </InformationKey> ```