FreeMat: vtkArrayWriter

FreeMat

- Main Page
- Related Pages

vtkArrayWriter

Section: Visualization Toolkit IO Classes

# Usage

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.

To create an instance of class vtkArrayWriter, simply invoke its constructor as follows

      obj = vtkArrayWriter

# Methods

The class vtkArrayWriter has several methods that can be used. They are listed below. Note that the documentation is translated automatically from the VTK sources, and may not be completely intelligible. When in doubt, consult the VTK website. In the methods listed below, `obj` is an instance of the vtkArrayWriter class.

- `string = obj.GetClassName ()`
- `int = obj.IsA (string name)`
- `vtkArrayWriter = obj.NewInstance ()`
- `vtkArrayWriter = obj.SafeDownCast (vtkObject o)`
- `bool = obj.Write (vtkStdString &file_name, bool WriteBinaryfalse)` - Write input port 0 data to a file.