FreeMat
|
Section: Visualization Toolkit Infovis Classes
vtkChacoGraphReader reads in files in the Chaco format into a vtkGraph. An example is the following 10 13 2 6 10 1 3 2 4 8 3 5 4 6 10 1 5 7 6 8 3 7 9 8 10 1 5 9
The first line specifies the number of vertices and edges in the graph. Each additional line contains the vertices adjacent to a particular vertex. In this example, vertex 1 is adjacent to 2, 6 and 10, vertex 2 is adjacent to 1 and 3, etc. Since Chaco ids start at 1 and VTK ids start at 0, the vertex ids in the vtkGraph will be 1 less than the Chaco ids.
To create an instance of class vtkChacoGraphReader, simply invoke its constructor as follows
obj = vtkChacoGraphReader
The class vtkChacoGraphReader 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 vtkChacoGraphReader class.
string = obj.GetClassName ()
int = obj.IsA (string name)
vtkChacoGraphReader = obj.NewInstance ()
vtkChacoGraphReader = obj.SafeDownCast (vtkObject o)
string = obj.GetFileName ()
- The Chaco file name. obj.SetFileName (string )
- The Chaco file name.