vtkScalarBarActor creates a scalar bar with annotation text. A scalar
bar is a legend that indicates to the viewer the correspondance between
color value and data value. The legend consists of a rectangular bar
made of rectangular pieces each colored a constant value. Since
vtkScalarBarActor is a subclass of vtkActor2D, it is drawn in the image
plane (i.e., in the renderer's viewport) on top of the 3D graphics window.
To use vtkScalarBarActor you must associate a vtkLookupTable (or
subclass) with it. The lookup table defines the colors and the
range of scalar values used to map scalar data. Typically, the
number of colors shown in the scalar bar is not equal to the number
of colors in the lookup table, in which case sampling of
the lookup table is performed.
Other optional capibilities include specifying the fraction of the
viewport size (both x and y directions) which will control the size
of the scalar bar, the number of annotation labels, and the font
attributes of the annotation text. The actual position of the
scalar bar on the screen is controlled by using the
vtkActor2D::SetPosition() method (by default the scalar bar is
centered in the viewport). Other features include the ability to
orient the scalar bar horizontally of vertically and controlling
the format (printf style) with which to print the labels on the
scalar bar. Also, the vtkScalarBarActor's property is applied to
the scalar bar and annotation (including color, layer, and
compositing operator).