FreeMat

- Main Page
- Related Pages

vtkCosmicTreeLayoutStrategy

Section: Visualization Toolkit Infovis Classes

# Usage

This layout strategy takes an input tree and places all the children of a node into a containing circle. The placement is such that each child placed can be represented with a circle tangent to the containing circle and (usually) 2 other children. The interior of the circle is left empty so that graph edges drawn on top of the tree will not obfuscate the tree. However, when one child is much larger than all the others, it may encroach on the center of the containing circle; that's OK, because it's large enough not to be obscured by edges drawn atop it.

.SECTION Thanks Thanks to the galaxy and David Thompson hierarchically nested inside it for inspiring this layout strategy.

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

      obj = vtkCosmicTreeLayoutStrategy

# Methods

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

- `string = obj.GetClassName ()`
- `int = obj.IsA (string name)`
- `vtkCosmicTreeLayoutStrategy = obj.NewInstance ()`
- `vtkCosmicTreeLayoutStrategy = obj.SafeDownCast (vtkObject o)`
- `obj.Layout ()` - Perform the layout.
- `obj.SetSizeLeafNodesOnly (int )` - Should node size specifications be obeyed at leaf nodes only or (with scaling as required to meet constraints) at every node in the tree? This defaults to true, so that leaf nodes are scaled according to the size specification provided, and the parent node sizes are calculated by the algorithm.
- `int = obj.GetSizeLeafNodesOnly ()` - Should node size specifications be obeyed at leaf nodes only or (with scaling as required to meet constraints) at every node in the tree? This defaults to true, so that leaf nodes are scaled according to the size specification provided, and the parent node sizes are calculated by the algorithm.
- `obj.SizeLeafNodesOnlyOn ()` - Should node size specifications be obeyed at leaf nodes only or (with scaling as required to meet constraints) at every node in the tree? This defaults to true, so that leaf nodes are scaled according to the size specification provided, and the parent node sizes are calculated by the algorithm.
- `obj.SizeLeafNodesOnlyOff ()` - Should node size specifications be obeyed at leaf nodes only or (with scaling as required to meet constraints) at every node in the tree? This defaults to true, so that leaf nodes are scaled according to the size specification provided, and the parent node sizes are calculated by the algorithm.
- `obj.SetLayoutDepth (int )` - How many levels of the tree should be laid out? For large trees, you may wish to set the root and maximum depth in order to retrieve the layout for the visible portion of the tree. When this value is zero or negative, all nodes below and including the LayoutRoot will be presented. This defaults to 0.
- `int = obj.GetLayoutDepth ()` - How many levels of the tree should be laid out? For large trees, you may wish to set the root and maximum depth in order to retrieve the layout for the visible portion of the tree. When this value is zero or negative, all nodes below and including the LayoutRoot will be presented. This defaults to 0.
- `obj.SetLayoutRoot (vtkIdType )` - What is the top-most tree node to lay out? This node will become the largest containing circle in the layout. Use this in combination with SetLayoutDepth to retrieve the layout of a subtree of interest for rendering. Setting LayoutRoot to a negative number signals that the root node of the tree should be used as the root node of the layout. This defaults to -1.
- `vtkIdType = obj.GetLayoutRoot ()` - What is the top-most tree node to lay out? This node will become the largest containing circle in the layout. Use this in combination with SetLayoutDepth to retrieve the layout of a subtree of interest for rendering. Setting LayoutRoot to a negative number signals that the root node of the tree should be used as the root node of the layout. This defaults to -1.
- `obj.SetNodeSizeArrayName (string )` - Set the array to be used for sizing nodes. If this is set to an empty string or NULL (the default), then all leaf nodes (or all nodes, when SizeLeafNodesOnly is false) will be assigned a unit size.
- `string = obj.GetNodeSizeArrayName ()` - Set the array to be used for sizing nodes. If this is set to an empty string or NULL (the default), then all leaf nodes (or all nodes, when SizeLeafNodesOnly is false) will be assigned a unit size.