vtkLabelHierarchy

Section: Visualization Toolkit Rendering Classes

Usage

This class represents labels in a hierarchy used to denote rendering priority. A binary tree of labels is maintained that subdivides the bounds of the of the label anchors spatially. Which level of the tree a label occupies determines its priority; those at higher levels of the tree will be more likely to render than those at lower levels of the tree.

Pass vtkLabelHierarchy objects to a vtkLabelPlacementMapper filter for dynamic, non-overlapping, per-frame placement of labels.

Note that if we have a d-dimensional binary tree and we want a fixed we can compute the depth of tree required assuming a uniform distribution the number of nodes it contains). Because we have a uniform distribution, the tree will be uniformly subdivided \f[ k = \frac{\log{\frac{N}{2n}}}{\log{2^d}} \f] all the nodes will be in the leaves of the tree and those leaves will be at To fix that, we'll choose to move some anchors upwards. The exact number to move upwards depends on \a TargetLabelCount. We'll move as many up as required to have \a TargetLabelCount at each node.

You should avoid situations where \a MaximumDepth does not allow for \a TargetLabelCount or fewer entries at each node. The \a MaximumDepth is a hard limit while \a TargetLabelCount is a suggested optimum. You will end up with many more than \a TargetLabelCount entries per node and things will be sloooow.

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

  obj = vtkLabelHierarchy

Methods

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