FreeMat

- Main Page
- Related Pages

vtkTreeMapLayout

Section: Visualization Toolkit Infovis Classes

# Usage

vtkTreeMapLayout assigns rectangular regions to each vertex in the tree, creating a tree map. The data is added as a data array with four components per tuple representing the location and size of the rectangle using the format (Xmin, Xmax, Ymin, Ymax).

This algorithm relies on a helper class to perform the actual layout. This helper class is a subclass of vtkTreeMapLayoutStrategy.

.SECTION Thanks Thanks to Brian Wylie and Ken Moreland from Sandia National Laboratories for help developing this class.

Tree map concept comes from: Shneiderman, B. 1992. Tree visualization with tree-maps: 2-d space-filling approach. ACM Trans. Graph. 11, 1 (Jan. 1992), 92-99.

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

      obj = vtkTreeMapLayout

# Methods

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

- `string = obj.GetClassName ()`
- `int = obj.IsA (string name)`
- `vtkTreeMapLayout = obj.NewInstance ()`
- `vtkTreeMapLayout = obj.SafeDownCast (vtkObject o)`
- `string = obj.GetRectanglesFieldName ()` - The field name to use for storing the rectangles for each vertex. The rectangles are stored in a quadruple float array (minX, maxX, minY, maxY).
- `obj.SetRectanglesFieldName (string )` - The field name to use for storing the rectangles for each vertex. The rectangles are stored in a quadruple float array (minX, maxX, minY, maxY).
- `obj.SetSizeArrayName (string name)` - The strategy to use when laying out the tree map.
- `vtkTreeMapLayoutStrategy = obj.GetLayoutStrategy ()` - The strategy to use when laying out the tree map.
- `obj.SetLayoutStrategy (vtkTreeMapLayoutStrategy strategy)` - The strategy to use when laying out the tree map.
- `vtkIdType = obj.FindVertex (float pnt[2], float binfo)` - Returns the vertex id that contains pnt (or -1 if no one contains it)
- `obj.GetBoundingBox (vtkIdType id, float binfo)` - Return the min and max 2D points of the vertex's bounding box
- `long = obj.GetMTime ()` - Get the modification time of the layout algorithm.