vtkScalarBarActor - Create a scalar bar with labels
Super Class: vtkActor2D
Description:
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).
See Also:
Methods:
Detailed Method Descriptions:
![]()
| static vtkScalarBarActor *New () |
![]()
| void Render (vtkViewport *) |
![]()
| void SetLookupTable (vtkLookupTable *) | |
| vtkLookupTable *GetLookupTable () |
![]()
| void SetWidth (float ) | |
| float GetWidth () |
![]()
| void SetHeight (float ) | |
| float GetHeight () |
![]()
| void SetMaximumNumberOfColors (int ) | |
| int GetMaximumNumberOfColors () |
![]()
| void SetNumberOfLabels (int ) | |
| int GetNumberOfLabels () |
![]()
| void SetOrientation (int ) | |
| int GetOrientation () | |
| void SetOrientationToHorizontal () | |
| void SetOrientationToVertical () |
![]()
| void SetFontSize (int ) | |
| int GetFontSize () |
![]()
| void SetBold (int ) | |
| int GetBold () | |
| void BoldOn () | |
| void BoldOff () |
![]()
| void SetItalic (int ) | |
| int GetItalic () | |
| void ItalicOn () | |
| void ItalicOff () |
![]()
| void SetShadow (int ) | |
| int GetShadow () | |
| void ShadowOn () | |
| void ShadowOff () |
![]()
| void SetFontFamily (int ) | |
| int GetFontFamily () | |
| void SetFontFamilyToArial () | |
| void SetFontFamilyToCourier () | |
| void SetFontFamilyToTimes () |
![]()
| void SetLabelFormat (char *) | |
| char *GetLabelFormat () |
![]()
| void SetTitle (char *) | |
| char *GetTitle () |
![]()