1 @page IOLegacyInformationFormat VTK Legacy Reader/Writer Information Format
6 The legacy vtk data file readers / writers store certain `vtkInformation`
7 entries that are set on `vtkAbstractArray`'s `GetInformation()` object. Support
8 is currently limited to numeric and string information keys, both single- and
9 vector-valued. Only the information objects attached to arrays are encoded.
11 # Array Metadata Blocks #
13 A block of metadata may immediately follow the specification of an array.
14 Whitespace is permitted between the array data and the opening `METADATA` tag.
15 The metadata block is terminated by an empty line.
18 # vtk DataFile Version 4.1
21 DATASET UNSTRUCTURED_GRID
24 0.5 0.5 1 0.5 -1 0 0.5 -0.5 1
32 NAME Double LOCATION TestKey
34 NAME DoubleVector LOCATION TestKey
36 NAME IdType LOCATION TestKey
38 NAME String LOCATION TestKey
39 DATA Test%20String!%0ALine2
40 NAME Integer LOCATION TestKey
42 NAME IntegerVector LOCATION TestKey
44 NAME StringVector LOCATION TestKey
47 Second%20(with%20whitespace!)
48 Third%20(with%0Anewline!)
49 NAME UnsignedLong LOCATION TestKey
64 vtkGhostType 1 3 unsigned_char
68 Ghost%20level%20information
70 NAME UNITS_LABEL LOCATION vtkDataArray
75 As shown, a metadata block can have two sections, `COMPONENT_NAMES` and
76 `INFORMATION`. The `INFORMATION` tag is followed by the number of information
81 If the `METADATA` block contains the line `COMPONENT_NAMES`, the following lines
82 are expected to be encoded strings containing the names of each component. There
83 must be one line per component.
87 If the `METADATA` block contains the line `INFORMATION`, the number of information
88 keys is read from the INFORMATION line and `vtkInformation` data that follows is
89 parsed. The general form of a single valued information entry is:
92 NAME [key name] LOCATION [key location (e.g. class name)]
96 A vector information key is generally represented as:
99 NAME [key name] LOCATION [key location (e.g. class name)]
100 DATA [vector length] [value0] [value1] [value2] ...
103 The exception is a string vector, which contains encoded entries separated by
106 Specific examples of supported key types:
108 ### vtkInformationDoubleKey ###
111 NAME Double LOCATION TestKey
115 ### vtkInformationDoubleVectorKey ###
118 NAME DoubleVector LOCATION TestKey
122 ### vtkInformationIdTypeKey ###
125 NAME IdType LOCATION TestKey
129 ### vtkInformationStringKey ###
132 NAME String LOCATION TestKey
133 DATA Test%20String!%0ALine2
136 ### vtkInformationIntegerKey ###
139 NAME Integer LOCATION TestKey
143 ### vtkInformationIntegerVectorKey ###
146 NAME IntegerVector LOCATION TestKey
150 ### vtkInformationStringVectorKey ###
153 NAME StringVector LOCATION TestKey
156 Second%20(with%20whitespace!)
157 Third%20(with%0Anewline!)
160 ### vtkInformationUnsignedLongKey ###
163 NAME UnsignedLong LOCATION TestKey