FreeMat
|
Section: Visualization Toolkit Graphics Classes
vtkGraphLayoutFilter will reposition a network of nodes, connected by lines or polylines, into a more pleasing arrangement. The class implements a simple force-directed placement algorithm (Fruchterman & Reingold "Graph Drawing by Force-directed Placement" Software-Practice and Experience 21(11) 1991).
The input to the filter is a vtkPolyData representing the undirected graphs. A graph is represented by a set of polylines and/or lines. The output is also a vtkPolyData, where the point positions have been modified. To use the filter, specify whether you wish the layout to occur in 2D or 3D; the bounds in which the graph should lie (note that you can just use automatic bounds computation); and modify the cool down rate (controls the final process of simulated annealing).
To create an instance of class vtkGraphLayoutFilter, simply invoke its constructor as follows
obj = vtkGraphLayoutFilter
The class vtkGraphLayoutFilter 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 vtkGraphLayoutFilter class.
string = obj.GetClassName ()
int = obj.IsA (string name)
vtkGraphLayoutFilter = obj.NewInstance ()
vtkGraphLayoutFilter = obj.SafeDownCast (vtkObject o)
obj.SetGraphBounds (double , double , double , double , double , double )
- Set / get the region in space in which to place the final graph. The GraphBounds only affects the results if AutomaticBoundsComputation is off. obj.SetGraphBounds (double a[6])
- Set / get the region in space in which to place the final graph. The GraphBounds only affects the results if AutomaticBoundsComputation is off. double = obj. GetGraphBounds ()
- Set / get the region in space in which to place the final graph. The GraphBounds only affects the results if AutomaticBoundsComputation is off. obj.SetAutomaticBoundsComputation (int )
- Turn on/off automatic graph bounds calculation. If this boolean is off, then the manually specified GraphBounds is used. If on, then the input's bounds us used as the graph bounds. int = obj.GetAutomaticBoundsComputation ()
- Turn on/off automatic graph bounds calculation. If this boolean is off, then the manually specified GraphBounds is used. If on, then the input's bounds us used as the graph bounds. obj.AutomaticBoundsComputationOn ()
- Turn on/off automatic graph bounds calculation. If this boolean is off, then the manually specified GraphBounds is used. If on, then the input's bounds us used as the graph bounds. obj.AutomaticBoundsComputationOff ()
- Turn on/off automatic graph bounds calculation. If this boolean is off, then the manually specified GraphBounds is used. If on, then the input's bounds us used as the graph bounds. obj.SetMaxNumberOfIterations (int )
- Set/Get the maximum number of iterations to be used. The higher this number, the more iterations through the algorithm is possible, and thus, the more the graph gets modified. int = obj.GetMaxNumberOfIterationsMinValue ()
- Set/Get the maximum number of iterations to be used. The higher this number, the more iterations through the algorithm is possible, and thus, the more the graph gets modified. int = obj.GetMaxNumberOfIterationsMaxValue ()
- Set/Get the maximum number of iterations to be used. The higher this number, the more iterations through the algorithm is possible, and thus, the more the graph gets modified. int = obj.GetMaxNumberOfIterations ()
- Set/Get the maximum number of iterations to be used. The higher this number, the more iterations through the algorithm is possible, and thus, the more the graph gets modified. obj.SetCoolDownRate (double )
- Set/Get the Cool-down rate. The higher this number is, the longer it will take to "cool-down", and thus, the more the graph will be modified. double = obj.GetCoolDownRateMinValue ()
- Set/Get the Cool-down rate. The higher this number is, the longer it will take to "cool-down", and thus, the more the graph will be modified. double = obj.GetCoolDownRateMaxValue ()
- Set/Get the Cool-down rate. The higher this number is, the longer it will take to "cool-down", and thus, the more the graph will be modified. double = obj.GetCoolDownRate ()
- Set/Get the Cool-down rate. The higher this number is, the longer it will take to "cool-down", and thus, the more the graph will be modified. obj.SetThreeDimensionalLayout (int )
int = obj.GetThreeDimensionalLayout ()
obj.ThreeDimensionalLayoutOn ()
obj.ThreeDimensionalLayoutOff ()