Main Page Class Hierarchy Alphabetical List Compound List File List Compound Members File Members Related Pages
vtkScalarBarActor Class Reference
Create a scalar bar with labels.
More...
#include <vtkScalarBarActor.h>
Inheritance diagram for vtkScalarBarActor:
[legend]Collaboration diagram for vtkScalarBarActor:
[legend]List of all members.
Detailed Description
Create a scalar bar with labels.
-
Date:
-
2000/12/21 15:06:31
-
Revision:
-
1.30.2.1
vtkScalarBarActor creates a scalar bar with annotation text. A scalar bar is a legend that indicates to the viewer the correspondence 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 vtkScalarsToColors (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 capabilities 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:
-
vtkActor2D vtkTextMapper vtkPolyDataMapper2D
-
Examples:
-
vtkScalarBarActor (examples)
Definition at line 89 of file vtkScalarBarActor.h.
Constructor & Destructor Documentation
vtkScalarBarActor::vtkScalarBarActor |
( |
|
) |
[protected] |
|
vtkScalarBarActor::~vtkScalarBarActor |
( |
|
) |
[protected] |
|
vtkScalarBarActor::vtkScalarBarActor |
( |
const vtkScalarBarActor & |
|
) |
[inline, protected] |
|
Member Function Documentation
virtual const char* vtkScalarBarActor::GetClassName |
( |
|
) |
[virtual] |
|
|
Return the class name as a string. This method is defined in all subclasses of vtkObject with the vtkTypeMacro found in vtkSetGet.h.
Reimplemented from vtkActor2D. |
int vtkScalarBarActor::IsTypeOf |
( |
const char * |
type |
) |
[static] |
|
|
Return 1 if this class type is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeMacro found in vtkSetGet.h.
Reimplemented from vtkActor2D. |
virtual int vtkScalarBarActor::IsA |
( |
const char * |
type |
) |
[virtual] |
|
|
Return 1 if this class is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeMacro found in vtkSetGet.h.
Reimplemented from vtkActor2D. |
vtkScalarBarActor* vtkScalarBarActor::SafeDownCast |
( |
vtkObject * |
o |
) |
[static] |
|
|
Will cast the supplied object to vtkObject* is this is a safe operation (i.e., a safe downcast); otherwise NULL is returned. This method is defined in all subclasses of vtkObject with the vtkTypeMacro found in vtkSetGet.h.
Reimplemented from vtkActor2D. |
void vtkScalarBarActor::PrintSelf |
( |
ostream & |
os, |
|
|
vtkIndent |
indent |
|
) |
[virtual] |
|
|
Methods invoked by print to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes.
Reimplemented from vtkActor2D. |
vtkScalarBarActor* vtkScalarBarActor::New |
( |
|
) |
[static] |
|
|
Instantiate object with 64 maximum colors; 5 labels; font size 12 of font Arial (bolding, italic, shadows on); %-#6.3g label format, no title, and vertical orientation. The initial scalar bar size is (0.05 x 0.8) of the viewport size.
Reimplemented from vtkActor2D. |
int vtkScalarBarActor::RenderOpaqueGeometry |
( |
vtkViewport * |
viewport |
) |
[virtual] |
|
|
Draw the scalar bar and annotation text to the screen.
Reimplemented from vtkActor2D. |
int vtkScalarBarActor::RenderTranslucentGeometry |
( |
vtkViewport * |
viewport |
) |
[inline, virtual] |
|
int vtkScalarBarActor::RenderOverlay |
( |
vtkViewport * |
viewport |
) |
[virtual] |
|
|
Support the standard render methods.
Reimplemented from vtkActor2D. |
virtual void vtkScalarBarActor::ReleaseGraphicsResources |
( |
vtkWindow * |
|
) |
[virtual] |
|
|
Release any graphics resources that are being consumed by this actor. The parameter window could be used to determine which graphic resources to release.
Reimplemented from vtkActor2D. |
|
Set/Get the vtkLookupTable to use. The lookup table specifies the number of colors to use in the table (if not overridden), as well as the scalar range. |
virtual void vtkScalarBarActor::SetMaximumNumberOfColors |
( |
int |
|
) |
[virtual] |
|
|
Set/Get the maximum number of scalar bar segments to show. This may differ from the number of colors in the lookup table, in which case the colors are samples from the lookup table. |
virtual int vtkScalarBarActor::GetMaximumNumberOfColors |
( |
|
) |
[virtual] |
|
virtual void vtkScalarBarActor::SetNumberOfLabels |
( |
int |
|
) |
[virtual] |
|
|
Set/Get the number of annotation labels to show. |
virtual int vtkScalarBarActor::GetNumberOfLabels |
( |
|
) |
[virtual] |
|
virtual void vtkScalarBarActor::SetOrientation |
( |
int |
|
) |
[virtual] |
|
|
Control the orientation of the scalar bar. |
virtual int vtkScalarBarActor::GetOrientation |
( |
|
) |
[virtual] |
|
void vtkScalarBarActor::SetOrientationToHorizontal |
( |
|
) |
[inline] |
|
void vtkScalarBarActor::SetOrientationToVertical |
( |
|
) |
[inline] |
|
virtual void vtkScalarBarActor::SetBold |
( |
int |
|
) |
[virtual] |
|
|
Enable/Disable bolding annotation text. |
virtual int vtkScalarBarActor::GetBold |
( |
|
) |
[virtual] |
|
virtual void vtkScalarBarActor::BoldOn |
( |
|
) |
[virtual] |
|
virtual void vtkScalarBarActor::BoldOff |
( |
|
) |
[virtual] |
|
virtual void vtkScalarBarActor::SetItalic |
( |
int |
|
) |
[virtual] |
|
|
Enable/Disable italicizing annotation text. |
virtual int vtkScalarBarActor::GetItalic |
( |
|
) |
[virtual] |
|
virtual void vtkScalarBarActor::ItalicOn |
( |
|
) |
[virtual] |
|
virtual void vtkScalarBarActor::ItalicOff |
( |
|
) |
[virtual] |
|
virtual void vtkScalarBarActor::SetShadow |
( |
int |
|
) |
[virtual] |
|
|
Enable/Disable creating shadows on the annotation text. Shadows make the text easier to read. |
virtual int vtkScalarBarActor::GetShadow |
( |
|
) |
[virtual] |
|
virtual void vtkScalarBarActor::ShadowOn |
( |
|
) |
[virtual] |
|
virtual void vtkScalarBarActor::ShadowOff |
( |
|
) |
[virtual] |
|
virtual void vtkScalarBarActor::SetFontFamily |
( |
int |
|
) |
[virtual] |
|
|
Set/Get the font family for the annotation text. Three font types are available: Arial (VTK_ARIAL), Courier (VTK_COURIER), and Times (VTK_TIMES). |
virtual int vtkScalarBarActor::GetFontFamily |
( |
|
) |
[virtual] |
|
void vtkScalarBarActor::SetFontFamilyToArial |
( |
|
) |
[inline] |
|
void vtkScalarBarActor::SetFontFamilyToCourier |
( |
|
) |
[inline] |
|
void vtkScalarBarActor::SetFontFamilyToTimes |
( |
|
) |
[inline] |
|
virtual void vtkScalarBarActor::SetLabelFormat |
( |
const char * |
|
) |
[virtual] |
|
|
Set/Get the format with which to print the labels on the scalar bar. |
virtual char* vtkScalarBarActor::GetLabelFormat |
( |
|
) |
[virtual] |
|
virtual void vtkScalarBarActor::SetTitle |
( |
const char * |
|
) |
[virtual] |
|
|
Set/Get the title of the scalar bar actor, |
virtual char* vtkScalarBarActor::GetTitle |
( |
|
) |
[virtual] |
|
void vtkScalarBarActor::ShallowCopy |
( |
vtkProp * |
prop |
) |
[virtual] |
|
|
Shallow copy of a scalar bar actor. Overloads the virtual vtkProp method.
Reimplemented from vtkActor2D. |
void vtkScalarBarActor::operator= |
( |
const vtkScalarBarActor & |
|
) |
[inline, protected] |
|
Member Data Documentation
int vtkScalarBarActor::MaximumNumberOfColors [protected]
|
|
int vtkScalarBarActor::NumberOfLabels [protected]
|
|
int vtkScalarBarActor::NumberOfLabelsBuilt [protected]
|
|
int vtkScalarBarActor::Orientation [protected]
|
|
char* vtkScalarBarActor::Title [protected]
|
|
int vtkScalarBarActor::Bold [protected]
|
|
int vtkScalarBarActor::Italic [protected]
|
|
int vtkScalarBarActor::Shadow [protected]
|
|
int vtkScalarBarActor::FontFamily [protected]
|
|
char* vtkScalarBarActor::LabelFormat [protected]
|
|
The documentation for this class was generated from the following file:
Generated on Wed Nov 21 12:59:59 2001 for VTK by
1.2.11.1 written by Dimitri van Heesch,
© 1997-2001