FreeMat: vtkXMLFileReadTester

FreeMat

- Main Page
- Related Pages

vtkXMLFileReadTester

Section: Visualization Toolkit IO Classes

# Usage

vtkXMLFileReadTester reads the smallest part of a file necessary to determine whether it is a VTK XML file. If so, it extracts the file type and version number.

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

      obj = vtkXMLFileReadTester

# Methods

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

- `string = obj.GetClassName ()`
- `int = obj.IsA (string name)`
- `vtkXMLFileReadTester = obj.NewInstance ()`
- `vtkXMLFileReadTester = obj.SafeDownCast (vtkObject o)`
- `int = obj.TestReadFile ()` - Try to read the file given by FileName. Returns 1 if the file is a VTK XML file, and 0 otherwise.
- `obj.SetFileName (string )` - Get/Set the name of the file tested by TestReadFile().
- `string = obj.GetFileName ()` - Get/Set the name of the file tested by TestReadFile().
- `string = obj.GetFileDataType ()` - Get the data type of the XML file tested. If the file could not be read, returns NULL.
- `string = obj.GetFileVersion ()` - Get the file version of the XML file tested. If the file could not be read, returns NULL.