FreeMat: vtkWriter

FreeMat

- Main Page
- Related Pages

vtkWriter

Section: Visualization Toolkit IO Classes

# Usage

vtkWriter is an abstract class for mapper objects that write their data to disk (or into a communications port). All writers respond to Write() method. This method insures that there is input and input is up to date.

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

      obj = vtkWriter

# Methods

The class vtkWriter 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 vtkWriter class.

- `string = obj.GetClassName ()`
- `int = obj.IsA (string name)`
- `vtkWriter = obj.NewInstance ()`
- `vtkWriter = obj.SafeDownCast (vtkObject o)`
- `int = obj.Write ()` - Write data to output. Method executes subclasses WriteData() method, as well as StartMethod() and EndMethod() methods. Returns 1 on success and 0 on failure.
- `obj.EncodeString (string resname, string name, bool doublePercent)` - Encode the string so that the reader will not have problems. The resulting string is up to three times the size of the input string. doublePercent indicates whether to output a double '' before escaped characters so the string may be used as a printf format string.
- `obj.SetInput (vtkDataObject input)` - Set/get the input to this writer.
- `obj.SetInput (int index, vtkDataObject input)` - Set/get the input to this writer.