#include <vtkArrayWriter.h>
vtkArrayWriter serializes sparse and dense array data using a text-based format that is human-readable and easily parsed (default option). The WriteBinary array option can be set to true in the Write method, which will serialize the sparse and dense array data using a binary format that is optimized for rapid throughput.
Inputs: Input port 0: (required) vtkArrayData object containing a sparse or dense array.
Output Format: The first line of output will contain the array type (sparse or dense) and the type of values stored in the array (double, integer, string, etc).
The second line of output will contain the array extents along each dimension of the array, followed by the number of non-null values stored in the array.
For sparse arrays, each subsequent line of output will contain the coordinates and value for each non-null value stored in the array.
For dense arrays, each subsequent line of output will contain one value from the array, stored in the same order as that used by vtkArrayCoordinateIterator.