VTK
|
Create a scalar bar with labels. More...
#include <vtkScalarBarActor.h>
Public Types | |
enum | { PrecedeScalarBar = 0, SucceedScalarBar } |
typedef vtkActor2D | Superclass |
Public Member Functions | |
virtual int | IsA (const char *type) |
vtkScalarBarActor * | NewInstance () const |
void | PrintSelf (ostream &os, vtkIndent indent) |
virtual int | HasTranslucentPolygonalGeometry () |
virtual void | ReleaseGraphicsResources (vtkWindow *) |
void | ShallowCopy (vtkProp *prop) |
int | RenderOpaqueGeometry (vtkViewport *viewport) |
virtual int | RenderTranslucentPolygonalGeometry (vtkViewport *) |
int | RenderOverlay (vtkViewport *viewport) |
virtual void | SetLookupTable (vtkScalarsToColors *) |
virtual vtkScalarsToColors * | GetLookupTable () |
virtual void | SetUseOpacity (int) |
virtual int | GetUseOpacity () |
virtual void | UseOpacityOn () |
virtual void | UseOpacityOff () |
virtual void | SetMaximumNumberOfColors (int) |
virtual int | GetMaximumNumberOfColors () |
virtual void | SetNumberOfLabels (int) |
virtual int | GetNumberOfLabels () |
virtual void | SetOrientation (int) |
virtual int | GetOrientation () |
void | SetOrientationToHorizontal () |
void | SetOrientationToVertical () |
virtual void | SetTitleTextProperty (vtkTextProperty *p) |
virtual vtkTextProperty * | GetTitleTextProperty () |
virtual void | SetLabelTextProperty (vtkTextProperty *p) |
virtual vtkTextProperty * | GetLabelTextProperty () |
virtual void | SetLabelFormat (const char *) |
virtual char * | GetLabelFormat () |
virtual void | SetTitle (const char *) |
virtual char * | GetTitle () |
virtual void | SetComponentTitle (const char *) |
virtual char * | GetComponentTitle () |
virtual void | SetTextureGridWidth (double) |
virtual double | GetTextureGridWidth () |
virtual vtkActor2D * | GetTextureActor () |
virtual void | SetTextPosition (int) |
virtual int | GetTextPosition () |
virtual void | SetTextPositionToPrecedeScalarBar () |
virtual void | SetTextPositionToSucceedScalarBar () |
virtual void | SetMaximumWidthInPixels (int) |
virtual int | GetMaximumWidthInPixels () |
virtual void | SetMaximumHeightInPixels (int) |
virtual int | GetMaximumHeightInPixels () |
virtual void | SetAnnotationLeaderPadding (double) |
virtual double | GetAnnotationLeaderPadding () |
virtual void | SetDrawAnnotations (int) |
virtual int | GetDrawAnnotations () |
virtual void | DrawAnnotationsOn () |
virtual void | DrawAnnotationsOff () |
virtual void | SetDrawNanAnnotation (int) |
virtual int | GetDrawNanAnnotation () |
virtual void | DrawNanAnnotationOn () |
virtual void | DrawNanAnnotationOff () |
virtual void | SetFixedAnnotationLeaderLineColor (int) |
virtual int | GetFixedAnnotationLeaderLineColor () |
virtual void | FixedAnnotationLeaderLineColorOn () |
virtual void | FixedAnnotationLeaderLineColorOff () |
virtual void | SetNanAnnotation (const char *) |
virtual char * | GetNanAnnotation () |
virtual void | SetDrawBackground (int) |
virtual int | GetDrawBackground () |
virtual void | DrawBackgroundOn () |
virtual void | DrawBackgroundOff () |
virtual void | SetDrawFrame (int) |
virtual int | GetDrawFrame () |
virtual void | DrawFrameOn () |
virtual void | DrawFrameOff () |
virtual void | SetDrawColorBar (int) |
virtual int | GetDrawColorBar () |
virtual void | DrawColorBarOn () |
virtual void | DrawColorBarOff () |
virtual void | SetBackgroundProperty (vtkProperty2D *p) |
virtual vtkProperty2D * | GetBackgroundProperty () |
virtual void | SetFrameProperty (vtkProperty2D *p) |
virtual vtkProperty2D * | GetFrameProperty () |
virtual int | GetTextPad () |
virtual void | SetTextPad (int) |
virtual double | GetBarRatio () |
virtual void | SetBarRatio (double) |
virtual double | GetTitleRatio () |
virtual void | SetTitleRatio (double) |
Static Public Member Functions | |
static int | IsTypeOf (const char *type) |
static vtkScalarBarActor * | SafeDownCast (vtkObjectBase *o) |
static vtkScalarBarActor * | New () |
Protected Member Functions | |
virtual vtkObjectBase * | NewInstanceInternal () const |
vtkScalarBarActor () | |
~vtkScalarBarActor () | |
virtual void | RebuildLayout (vtkViewport *viewport) |
virtual void | FreeLayoutStorage () |
virtual void | ComputeFrame () |
virtual void | ComputeScalarBarThickness () |
virtual void | LayoutNanSwatch () |
virtual void | PrepareTitleText () |
virtual void | LayoutTitle () |
virtual void | ComputeScalarBarLength () |
virtual void | LayoutTicks () |
virtual void | LayoutAnnotations () |
virtual void | ConfigureAnnotations () |
virtual void | ConfigureFrame () |
virtual void | DrawBoxes () |
virtual void | ConfigureScalarBar () |
virtual void | ConfigureTitle () |
virtual void | ConfigureTicks () |
virtual void | ConfigureNanSwatch () |
virtual void | EditAnnotations () |
virtual void | SizeTitle (double *titleSize, int *size, vtkViewport *viewport) |
int | MapAnnotationLabels (vtkScalarsToColors *lkup, double start, double delta, double *range) |
int | PlaceAnnotationsVertically (double barX, double barY, double barWidth, double barHeight, double delta, double pad) |
int | PlaceAnnotationsHorizontally (double barX, double barY, double barWidth, double barHeight, double delta, double pad) |
Protected Attributes | |
int | MaximumNumberOfColors |
User-changeable settings. | |
int | NumberOfLabels |
User-changeable settings. | |
int | NumberOfLabelsBuilt |
User-changeable settings. | |
int | Orientation |
User-changeable settings. | |
int | DrawBackground |
User-changeable settings. | |
int | DrawFrame |
User-changeable settings. | |
int | DrawColorBar |
User-changeable settings. | |
int | DrawAnnotations |
User-changeable settings. | |
int | DrawNanAnnotation |
User-changeable settings. | |
int | FixedAnnotationLeaderLineColor |
User-changeable settings. | |
vtkProperty2D * | BackgroundProperty |
User-changeable settings. | |
vtkProperty2D * | FrameProperty |
User-changeable settings. | |
char * | Title |
User-changeable settings. | |
char * | ComponentTitle |
User-changeable settings. | |
char * | LabelFormat |
User-changeable settings. | |
int | UseOpacity |
User-changeable settings. | |
double | TextureGridWidth |
User-changeable settings. | |
int | TextPosition |
User-changeable settings. | |
char * | NanAnnotation |
User-changeable settings. | |
double | AnnotationLeaderPadding |
User-changeable settings. | |
int | MaximumWidthInPixels |
User-changeable settings. | |
int | MaximumHeightInPixels |
User-changeable settings. | |
int | TextPad |
User-changeable settings. | |
double | BarRatio |
User-changeable settings. | |
double | TitleRatio |
User-changeable settings. | |
vtkTimeStamp | BuildTime |
Internal state used for rendering. | |
int | LastSize [2] |
Projected size in viewport coordinates of last build. | |
int | LastOrigin [2] |
Projected origin (viewport coordinates) of last build. | |
vtkScalarBarActorInternal * | P |
Containers shared with subclasses. | |
vtkScalarsToColors * | LookupTable |
The object this actor illustrates. | |
vtkTextProperty * | TitleTextProperty |
Font for the legend title. | |
vtkTextProperty * | LabelTextProperty |
Font for tick+annotation labels. | |
vtkTextActor * | TitleActor |
The legend title text renderer. | |
vtkPolyData * | ScalarBar |
Polygon(s) colored by LookupTable. | |
vtkPolyDataMapper2D * | ScalarBarMapper |
Mapper for ScalarBar. | |
vtkActor2D * | ScalarBarActor |
Actor for ScalarBar. | |
vtkPolyData * | TexturePolyData |
Polygon colored when UseOpacity is true. | |
vtkTexture * | Texture |
Color data for TexturePolyData. | |
vtkActor2D * | TextureActor |
Actor for TexturePolyData. | |
vtkPolyData * | Background |
Polygon used to fill the background. | |
vtkPolyDataMapper2D * | BackgroundMapper |
Mapper for Background. | |
vtkActor2D * | BackgroundActor |
Actor for Background. | |
vtkPolyData * | Frame |
Polyline used to highlight frame. | |
vtkPolyDataMapper2D * | FrameMapper |
Mapper for Frame. | |
vtkActor2D * | FrameActor |
Actor for Frame. |
Create a scalar bar with labels.
vtkScalarBarActor creates a scalar bar with tick marks. 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 and the number of tick labels. 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 annotations (including layer, and compositing operator).
Set the text property/attributes of the title and the labels through the vtkTextProperty objects associated to this actor.
Definition at line 78 of file vtkScalarBarActor.h.
Reimplemented from vtkActor2D.
Definition at line 81 of file vtkScalarBarActor.h.
anonymous enum |
Definition at line 193 of file vtkScalarBarActor.h.
vtkScalarBarActor::vtkScalarBarActor | ( | ) | [protected] |
vtkScalarBarActor::~vtkScalarBarActor | ( | ) | [protected] |
static int vtkScalarBarActor::IsTypeOf | ( | const char * | name | ) | [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 * | name | ) | [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.
static vtkScalarBarActor* vtkScalarBarActor::SafeDownCast | ( | vtkObjectBase * | o | ) | [static] |
Reimplemented from vtkActor2D.
virtual vtkObjectBase* vtkScalarBarActor::NewInstanceInternal | ( | ) | const [protected, virtual] |
Reimplemented from vtkActor2D.
vtkScalarBarActor* vtkScalarBarActor::NewInstance | ( | ) | const |
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.
static vtkScalarBarActor* vtkScalarBarActor::New | ( | ) | [static] |
Instantiate object with 64 maximum colors; 5 labels; %%-#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.
virtual int vtkScalarBarActor::RenderTranslucentPolygonalGeometry | ( | vtkViewport * | ) | [inline, virtual] |
Draw the scalar bar and annotation text to the screen.
Reimplemented from vtkActor2D.
Definition at line 92 of file vtkScalarBarActor.h.
int vtkScalarBarActor::RenderOverlay | ( | vtkViewport * | viewport | ) | [virtual] |
Draw the scalar bar and annotation text to the screen.
Reimplemented from vtkActor2D.
virtual int vtkScalarBarActor::HasTranslucentPolygonalGeometry | ( | ) | [virtual] |
Does this prop have some translucent polygonal geometry?
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.
virtual void vtkScalarBarActor::SetLookupTable | ( | vtkScalarsToColors * | ) | [virtual] |
Set/Get the lookup table to use. The lookup table specifies the number of colors to use in the table (if not overridden), the scalar range, and any annotated values. Annotated values are rendered using vtkTextActor.
virtual vtkScalarsToColors* vtkScalarBarActor::GetLookupTable | ( | ) | [virtual] |
Set/Get the lookup table to use. The lookup table specifies the number of colors to use in the table (if not overridden), the scalar range, and any annotated values. Annotated values are rendered using vtkTextActor.
virtual void vtkScalarBarActor::SetUseOpacity | ( | int | ) | [virtual] |
Should be display the opacity as well. This is displayed by changing the opacity of the scalar bar in accordance with the opacity of the given color. For clarity, a texture grid is placed in the background if Opacity is ON. You might also want to play with SetTextureGridWith in that case. [Default: off]
virtual int vtkScalarBarActor::GetUseOpacity | ( | ) | [virtual] |
Should be display the opacity as well. This is displayed by changing the opacity of the scalar bar in accordance with the opacity of the given color. For clarity, a texture grid is placed in the background if Opacity is ON. You might also want to play with SetTextureGridWith in that case. [Default: off]
virtual void vtkScalarBarActor::UseOpacityOn | ( | ) | [virtual] |
Should be display the opacity as well. This is displayed by changing the opacity of the scalar bar in accordance with the opacity of the given color. For clarity, a texture grid is placed in the background if Opacity is ON. You might also want to play with SetTextureGridWith in that case. [Default: off]
virtual void vtkScalarBarActor::UseOpacityOff | ( | ) | [virtual] |
Should be display the opacity as well. This is displayed by changing the opacity of the scalar bar in accordance with the opacity of the given color. For clarity, a texture grid is placed in the background if Opacity is ON. You might also want to play with SetTextureGridWith in that case. [Default: off]
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] |
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 void vtkScalarBarActor::SetNumberOfLabels | ( | int | ) | [virtual] |
Set/Get the number of tick labels to show.
virtual int vtkScalarBarActor::GetNumberOfLabels | ( | ) | [virtual] |
Set/Get the number of tick labels to show.
virtual void vtkScalarBarActor::SetOrientation | ( | int | ) | [virtual] |
Control the orientation of the scalar bar.
virtual int vtkScalarBarActor::GetOrientation | ( | ) | [virtual] |
Control the orientation of the scalar bar.
void vtkScalarBarActor::SetOrientationToHorizontal | ( | ) | [inline] |
Control the orientation of the scalar bar.
Definition at line 142 of file vtkScalarBarActor.h.
void vtkScalarBarActor::SetOrientationToVertical | ( | ) | [inline] |
Control the orientation of the scalar bar.
Definition at line 144 of file vtkScalarBarActor.h.
virtual void vtkScalarBarActor::SetTitleTextProperty | ( | vtkTextProperty * | p | ) | [virtual] |
Set/Get the title text property.
virtual vtkTextProperty* vtkScalarBarActor::GetTitleTextProperty | ( | ) | [virtual] |
Set/Get the title text property.
virtual void vtkScalarBarActor::SetLabelTextProperty | ( | vtkTextProperty * | p | ) | [virtual] |
Set/Get the labels text property.
virtual vtkTextProperty* vtkScalarBarActor::GetLabelTextProperty | ( | ) | [virtual] |
Set/Get the labels text property.
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] |
Set/Get the format with which to print the labels on the scalar bar.
virtual void vtkScalarBarActor::SetTitle | ( | const char * | ) | [virtual] |
Set/Get the title of the scalar bar actor,
virtual char* vtkScalarBarActor::GetTitle | ( | ) | [virtual] |
Set/Get the title of the scalar bar actor,
virtual void vtkScalarBarActor::SetComponentTitle | ( | const char * | ) | [virtual] |
Set/Get the title for the component that is selected,
virtual char* vtkScalarBarActor::GetComponentTitle | ( | ) | [virtual] |
Set/Get the title for the component that is selected,
void vtkScalarBarActor::ShallowCopy | ( | vtkProp * | prop | ) | [virtual] |
Shallow copy of a scalar bar actor. Overloads the virtual vtkProp method.
Reimplemented from vtkActor2D.
virtual void vtkScalarBarActor::SetTextureGridWidth | ( | double | ) | [virtual] |
Set the width of the texture grid. Used only if UseOpacity is ON.
virtual double vtkScalarBarActor::GetTextureGridWidth | ( | ) | [virtual] |
Set the width of the texture grid. Used only if UseOpacity is ON.
virtual vtkActor2D* vtkScalarBarActor::GetTextureActor | ( | ) | [virtual] |
Get the texture actor.. you may want to change some properties on it
virtual void vtkScalarBarActor::SetTextPosition | ( | int | ) | [virtual] |
Should the title and tick marks precede the scalar bar or succeed it? This is measured along the viewport coordinate direction perpendicular to the long axis of the scalar bar, not the reading direction. Thus, succeed implies the that the text is above scalar bar if the orientation is horizontal or right of scalar bar if the orientation is vertical. Precede is the opposite.
virtual int vtkScalarBarActor::GetTextPosition | ( | ) | [virtual] |
Should the title and tick marks precede the scalar bar or succeed it? This is measured along the viewport coordinate direction perpendicular to the long axis of the scalar bar, not the reading direction. Thus, succeed implies the that the text is above scalar bar if the orientation is horizontal or right of scalar bar if the orientation is vertical. Precede is the opposite.
virtual void vtkScalarBarActor::SetTextPositionToPrecedeScalarBar | ( | ) | [inline, virtual] |
Should the title and tick marks precede the scalar bar or succeed it? This is measured along the viewport coordinate direction perpendicular to the long axis of the scalar bar, not the reading direction. Thus, succeed implies the that the text is above scalar bar if the orientation is horizontal or right of scalar bar if the orientation is vertical. Precede is the opposite.
Definition at line 205 of file vtkScalarBarActor.h.
virtual void vtkScalarBarActor::SetTextPositionToSucceedScalarBar | ( | ) | [inline, virtual] |
Should the title and tick marks precede the scalar bar or succeed it? This is measured along the viewport coordinate direction perpendicular to the long axis of the scalar bar, not the reading direction. Thus, succeed implies the that the text is above scalar bar if the orientation is horizontal or right of scalar bar if the orientation is vertical. Precede is the opposite.
Definition at line 207 of file vtkScalarBarActor.h.
virtual void vtkScalarBarActor::SetMaximumWidthInPixels | ( | int | ) | [virtual] |
Set/Get the maximum width and height in pixels. Specifying the size as a relative fraction of the viewport can sometimes undersirably strech the size of the actor too much. These methods allow the user to set bounds on the maximum size of the scalar bar in pixels along any direction. Defaults to unbounded.
virtual int vtkScalarBarActor::GetMaximumWidthInPixels | ( | ) | [virtual] |
Set/Get the maximum width and height in pixels. Specifying the size as a relative fraction of the viewport can sometimes undersirably strech the size of the actor too much. These methods allow the user to set bounds on the maximum size of the scalar bar in pixels along any direction. Defaults to unbounded.
virtual void vtkScalarBarActor::SetMaximumHeightInPixels | ( | int | ) | [virtual] |
Set/Get the maximum width and height in pixels. Specifying the size as a relative fraction of the viewport can sometimes undersirably strech the size of the actor too much. These methods allow the user to set bounds on the maximum size of the scalar bar in pixels along any direction. Defaults to unbounded.
virtual int vtkScalarBarActor::GetMaximumHeightInPixels | ( | ) | [virtual] |
Set/Get the maximum width and height in pixels. Specifying the size as a relative fraction of the viewport can sometimes undersirably strech the size of the actor too much. These methods allow the user to set bounds on the maximum size of the scalar bar in pixels along any direction. Defaults to unbounded.
virtual void vtkScalarBarActor::SetAnnotationLeaderPadding | ( | double | ) | [virtual] |
Set/get the padding between the scalar bar and the text annotations. This space is used to draw leader lines. The default is 8 pixels.
virtual double vtkScalarBarActor::GetAnnotationLeaderPadding | ( | ) | [virtual] |
Set/get the padding between the scalar bar and the text annotations. This space is used to draw leader lines. The default is 8 pixels.
virtual void vtkScalarBarActor::SetDrawAnnotations | ( | int | ) | [virtual] |
Set/get whether text annotations should be rendered or not. Currently, this only affects rendering when IndexedLookup is true. The default is true.
virtual int vtkScalarBarActor::GetDrawAnnotations | ( | ) | [virtual] |
Set/get whether text annotations should be rendered or not. Currently, this only affects rendering when IndexedLookup is true. The default is true.
virtual void vtkScalarBarActor::DrawAnnotationsOn | ( | ) | [virtual] |
Set/get whether text annotations should be rendered or not. Currently, this only affects rendering when IndexedLookup is true. The default is true.
virtual void vtkScalarBarActor::DrawAnnotationsOff | ( | ) | [virtual] |
Set/get whether text annotations should be rendered or not. Currently, this only affects rendering when IndexedLookup is true. The default is true.
virtual void vtkScalarBarActor::SetDrawNanAnnotation | ( | int | ) | [virtual] |
Set/get whether the NaN annotation should be rendered or not. This only affects rendering when DrawAnnotations is true. The default is false.
virtual int vtkScalarBarActor::GetDrawNanAnnotation | ( | ) | [virtual] |
Set/get whether the NaN annotation should be rendered or not. This only affects rendering when DrawAnnotations is true. The default is false.
virtual void vtkScalarBarActor::DrawNanAnnotationOn | ( | ) | [virtual] |
Set/get whether the NaN annotation should be rendered or not. This only affects rendering when DrawAnnotations is true. The default is false.
virtual void vtkScalarBarActor::DrawNanAnnotationOff | ( | ) | [virtual] |
Set/get whether the NaN annotation should be rendered or not. This only affects rendering when DrawAnnotations is true. The default is false.
virtual void vtkScalarBarActor::SetFixedAnnotationLeaderLineColor | ( | int | ) | [virtual] |
Set/get how leader lines connecting annotations to values should be colored. When true, leader lines are all the same color (and match the LabelTextProperty color). When false, leader lines take on the color of the value they correspond to. This only affects rendering when DrawAnnotations is true. The default is false.
virtual int vtkScalarBarActor::GetFixedAnnotationLeaderLineColor | ( | ) | [virtual] |
Set/get how leader lines connecting annotations to values should be colored. When true, leader lines are all the same color (and match the LabelTextProperty color). When false, leader lines take on the color of the value they correspond to. This only affects rendering when DrawAnnotations is true. The default is false.
virtual void vtkScalarBarActor::FixedAnnotationLeaderLineColorOn | ( | ) | [virtual] |
Set/get how leader lines connecting annotations to values should be colored. When true, leader lines are all the same color (and match the LabelTextProperty color). When false, leader lines take on the color of the value they correspond to. This only affects rendering when DrawAnnotations is true. The default is false.
virtual void vtkScalarBarActor::FixedAnnotationLeaderLineColorOff | ( | ) | [virtual] |
Set/get how leader lines connecting annotations to values should be colored. When true, leader lines are all the same color (and match the LabelTextProperty color). When false, leader lines take on the color of the value they correspond to. This only affects rendering when DrawAnnotations is true. The default is false.
virtual void vtkScalarBarActor::SetNanAnnotation | ( | const char * | ) | [virtual] |
Set/get the annotation text for "NaN" values.
virtual char* vtkScalarBarActor::GetNanAnnotation | ( | ) | [virtual] |
Set/get the annotation text for "NaN" values.
virtual void vtkScalarBarActor::SetDrawBackground | ( | int | ) | [virtual] |
Set/Get whether a background should be drawn around the scalar bar. Default is off.
virtual int vtkScalarBarActor::GetDrawBackground | ( | ) | [virtual] |
Set/Get whether a background should be drawn around the scalar bar. Default is off.
virtual void vtkScalarBarActor::DrawBackgroundOn | ( | ) | [virtual] |
Set/Get whether a background should be drawn around the scalar bar. Default is off.
virtual void vtkScalarBarActor::DrawBackgroundOff | ( | ) | [virtual] |
Set/Get whether a background should be drawn around the scalar bar. Default is off.
virtual void vtkScalarBarActor::SetDrawFrame | ( | int | ) | [virtual] |
Set/Get whether a frame should be drawn around the scalar bar. Default is off.
virtual int vtkScalarBarActor::GetDrawFrame | ( | ) | [virtual] |
Set/Get whether a frame should be drawn around the scalar bar. Default is off.
virtual void vtkScalarBarActor::DrawFrameOn | ( | ) | [virtual] |
Set/Get whether a frame should be drawn around the scalar bar. Default is off.
virtual void vtkScalarBarActor::DrawFrameOff | ( | ) | [virtual] |
Set/Get whether a frame should be drawn around the scalar bar. Default is off.
virtual void vtkScalarBarActor::SetDrawColorBar | ( | int | ) | [virtual] |
Set/Get whether the color bar should be drawn. If off, only the tickmarks and text will be drawn. Default is on.
virtual int vtkScalarBarActor::GetDrawColorBar | ( | ) | [virtual] |
Set/Get whether the color bar should be drawn. If off, only the tickmarks and text will be drawn. Default is on.
virtual void vtkScalarBarActor::DrawColorBarOn | ( | ) | [virtual] |
Set/Get whether the color bar should be drawn. If off, only the tickmarks and text will be drawn. Default is on.
virtual void vtkScalarBarActor::DrawColorBarOff | ( | ) | [virtual] |
Set/Get whether the color bar should be drawn. If off, only the tickmarks and text will be drawn. Default is on.
virtual void vtkScalarBarActor::SetBackgroundProperty | ( | vtkProperty2D * | p | ) | [virtual] |
Set/Get the background property.
virtual vtkProperty2D* vtkScalarBarActor::GetBackgroundProperty | ( | ) | [virtual] |
Set/Get the background property.
virtual void vtkScalarBarActor::SetFrameProperty | ( | vtkProperty2D * | p | ) | [virtual] |
Set/Get the frame property.
virtual vtkProperty2D* vtkScalarBarActor::GetFrameProperty | ( | ) | [virtual] |
Set/Get the frame property.
virtual int vtkScalarBarActor::GetTextPad | ( | ) | [virtual] |
Set/get the amount of padding around text boxes. The default is 1 pixel.
virtual void vtkScalarBarActor::SetTextPad | ( | int | ) | [virtual] |
Set/get the amount of padding around text boxes. The default is 1 pixel.
virtual double vtkScalarBarActor::GetBarRatio | ( | ) | [virtual] |
Set/get the thickness of the color bar relative to the widget frame. The default is 0.375 and must always be in the range ]0, 1[.
virtual void vtkScalarBarActor::SetBarRatio | ( | double | ) | [virtual] |
Set/get the thickness of the color bar relative to the widget frame. The default is 0.375 and must always be in the range ]0, 1[.
virtual double vtkScalarBarActor::GetTitleRatio | ( | ) | [virtual] |
Set/get the ratio of the title height to the tick label height (used only when the Orientation is horizontal). The default is 0.5, which attempts to make the labels and title the same size. This must be a number in the range ]0, 1[.
virtual void vtkScalarBarActor::SetTitleRatio | ( | double | ) | [virtual] |
Set/get the ratio of the title height to the tick label height (used only when the Orientation is horizontal). The default is 0.5, which attempts to make the labels and title the same size. This must be a number in the range ]0, 1[.
virtual void vtkScalarBarActor::RebuildLayout | ( | vtkViewport * | viewport | ) | [protected, virtual] |
Called from within RenderOpaqueGeometry when the internal state members need to be updated before rendering. This method invokes many virtual methods that first lay out the scalar bar and then use the layout to position actors and create datasets used to represent the scalar bar. Specifically, it invokes: FreeLayoutStorage, ComputeFrame, ComputeScalarBarThickness, LayoutNanSwatch, PrepareTitleText, LayoutTitle, ComputeScalarBarLength, LayoutTicks, and LayoutAnnotations to perform the layout step. Then, it invokes ConfigureAnnotations, ConfigureFrame, ConfigureScalarBar, ConfigureTitle, ConfigureTicks, and ConfigureNanSwatch to create and position actors used to render portions of the scalar bar. By overriding one or more of these virtual methods, subclasses may change the appearance of the scalar bar. In the layout phase, text actors must have their text properties and input strings updated, but the position of the actors should not be set or relied upon as subsequent layout steps may alter their placement.
virtual void vtkScalarBarActor::FreeLayoutStorage | ( | ) | [protected, virtual] |
Free internal storage used by the previous layout.
virtual void vtkScalarBarActor::ComputeFrame | ( | ) | [protected, virtual] |
If the scalar bar should be inset into a frame or rendered with a solid background, this method will inset the outermost scalar bar rectangle by a small amount to avoid having the scalar bar illustration overlap any edges. This method must set the frame coordinates (this->P->Frame).
virtual void vtkScalarBarActor::ComputeScalarBarThickness | ( | ) | [protected, virtual] |
Determine how thick the scalar bar should be (on an axis perpendicular to the direction in which scalar values vary). This method must set the scalar bar thickness (this->P->ScalarBarBox.Size[0]). It may depend on layout performed by ComputeFrame (i.e., the frame coordinates in this->P->Frame).
virtual void vtkScalarBarActor::LayoutNanSwatch | ( | ) | [protected, virtual] |
Determine the size of the NaN swatch if it is to be rendered. This method must set this->P->NanSwatchSize and this->P->NanBox. It may depend on layout performed by ComputeScalarBarThickness.
virtual void vtkScalarBarActor::PrepareTitleText | ( | ) | [protected, virtual] |
Set the title actor's input to the latest title (and subtitle) text.
virtual void vtkScalarBarActor::LayoutTitle | ( | ) | [protected, virtual] |
Determine the position and size of the scalar bar title box. This method must set this->P->TitleBox It may depend on layout performed by LayoutNanSwatch. If useTickBox is true, it should increase the target area for the label to touch the tick box. It is called in this way when the tick labels are small due to constraints other than the title box.
virtual void vtkScalarBarActor::ComputeScalarBarLength | ( | ) | [protected, virtual] |
Determine how long the scalar bar should be (on an axis parallel to the direction in which scalar values vary). This method must set this->P->ScalarBarBox.Size[1] and should estimate this->P->ScalarBarBox.Posn. It may depend on layout performed by LayoutTitle.
virtual void vtkScalarBarActor::LayoutTicks | ( | ) | [protected, virtual] |
Determine the size and placement of any tick marks to be rendered. This method must set this->P->TickBox. It may depend on layout performed by ComputeScalarBarLength. The default implementation creates exactly this->NumberOfLabels tick marks, uniformly spaced on a linear or logarithmic scale.
virtual void vtkScalarBarActor::LayoutAnnotations | ( | ) | [protected, virtual] |
This method must lay out annotation text and leader lines so they do not overlap. This method must set this->P->AnnotationAnchors. It may depend on layout performed by LayoutTicks.
virtual void vtkScalarBarActor::ConfigureAnnotations | ( | ) | [protected, virtual] |
Generate/configure the annotation labels using the laid-out geometry.
virtual void vtkScalarBarActor::ConfigureFrame | ( | ) | [protected, virtual] |
Generate/configure the representation of the frame from laid-out geometry.
virtual void vtkScalarBarActor::DrawBoxes | ( | ) | [protected, virtual] |
For debugging, add placement boxes to the frame polydata.
virtual void vtkScalarBarActor::ConfigureScalarBar | ( | ) | [protected, virtual] |
Generate/configure the scalar bar representation from laid-out geometry.
virtual void vtkScalarBarActor::ConfigureTitle | ( | ) | [protected, virtual] |
Generate/configure the title actor using the laid-out geometry.
virtual void vtkScalarBarActor::ConfigureTicks | ( | ) | [protected, virtual] |
Generate/configure the tick-mark actors using the laid-out geometry.
virtual void vtkScalarBarActor::ConfigureNanSwatch | ( | ) | [protected, virtual] |
Generate/configure the NaN swatch using the laid-out geometry. Currently the NaN swatch is rendered by the same actor as the scalar bar. This may change in the future.
virtual void vtkScalarBarActor::EditAnnotations | ( | ) | [inline, protected, virtual] |
Subclasses may override this method to alter this->P->Labels, allowing the addition and removal of annotations. The member maps viewport coordinates along the long axis of the scalar bar to text (which may include MathText; see vtkTextActor). It is a single-valued map, so you must perturb the coordinate if you wish multiple labels to annotate the same position. Each entry in this->P->Labels must have a matching entry in this->P->LabelColors.
Definition at line 430 of file vtkScalarBarActor.h.
virtual void vtkScalarBarActor::SizeTitle | ( | double * | titleSize, |
int * | size, | ||
vtkViewport * | viewport | ||
) | [protected, virtual] |
Compute the best size for the legend title. This guarantees that the title will fit within the frame defined by Position and Position2.
int vtkScalarBarActor::MapAnnotationLabels | ( | vtkScalarsToColors * | lkup, |
double | start, | ||
double | delta, | ||
double * | range | ||
) | [protected] |
Allocate actors for lookup table annotations and position them properly.
int vtkScalarBarActor::PlaceAnnotationsVertically | ( | double | barX, |
double | barY, | ||
double | barWidth, | ||
double | barHeight, | ||
double | delta, | ||
double | pad | ||
) | [protected] |
This method is called by ConfigureAnnotationLabels when Orientation is VTK_ORIENT_VERTICAL.
int vtkScalarBarActor::PlaceAnnotationsHorizontally | ( | double | barX, |
double | barY, | ||
double | barWidth, | ||
double | barHeight, | ||
double | delta, | ||
double | pad | ||
) | [protected] |
This method is called by ConfigureAnnotationLabels when Orientation is VTK_ORIENT_HORIZONTAL.
int vtkScalarBarActor::MaximumNumberOfColors [protected] |
User-changeable settings.
Definition at line 460 of file vtkScalarBarActor.h.
int vtkScalarBarActor::NumberOfLabels [protected] |
User-changeable settings.
Definition at line 461 of file vtkScalarBarActor.h.
int vtkScalarBarActor::NumberOfLabelsBuilt [protected] |
User-changeable settings.
Definition at line 462 of file vtkScalarBarActor.h.
int vtkScalarBarActor::Orientation [protected] |
User-changeable settings.
Definition at line 463 of file vtkScalarBarActor.h.
int vtkScalarBarActor::DrawBackground [protected] |
User-changeable settings.
Definition at line 464 of file vtkScalarBarActor.h.
int vtkScalarBarActor::DrawFrame [protected] |
User-changeable settings.
Definition at line 465 of file vtkScalarBarActor.h.
int vtkScalarBarActor::DrawColorBar [protected] |
User-changeable settings.
Definition at line 466 of file vtkScalarBarActor.h.
int vtkScalarBarActor::DrawAnnotations [protected] |
User-changeable settings.
Definition at line 467 of file vtkScalarBarActor.h.
int vtkScalarBarActor::DrawNanAnnotation [protected] |
User-changeable settings.
Definition at line 468 of file vtkScalarBarActor.h.
int vtkScalarBarActor::FixedAnnotationLeaderLineColor [protected] |
User-changeable settings.
Definition at line 469 of file vtkScalarBarActor.h.
vtkProperty2D* vtkScalarBarActor::BackgroundProperty [protected] |
User-changeable settings.
Definition at line 470 of file vtkScalarBarActor.h.
vtkProperty2D* vtkScalarBarActor::FrameProperty [protected] |
User-changeable settings.
Definition at line 471 of file vtkScalarBarActor.h.
char* vtkScalarBarActor::Title [protected] |
User-changeable settings.
Definition at line 472 of file vtkScalarBarActor.h.
char* vtkScalarBarActor::ComponentTitle [protected] |
User-changeable settings.
Definition at line 473 of file vtkScalarBarActor.h.
char* vtkScalarBarActor::LabelFormat [protected] |
User-changeable settings.
Definition at line 474 of file vtkScalarBarActor.h.
int vtkScalarBarActor::UseOpacity [protected] |
User-changeable settings.
Definition at line 475 of file vtkScalarBarActor.h.
double vtkScalarBarActor::TextureGridWidth [protected] |
User-changeable settings.
Definition at line 476 of file vtkScalarBarActor.h.
int vtkScalarBarActor::TextPosition [protected] |
User-changeable settings.
Definition at line 477 of file vtkScalarBarActor.h.
char* vtkScalarBarActor::NanAnnotation [protected] |
User-changeable settings.
Definition at line 478 of file vtkScalarBarActor.h.
double vtkScalarBarActor::AnnotationLeaderPadding [protected] |
User-changeable settings.
Definition at line 479 of file vtkScalarBarActor.h.
int vtkScalarBarActor::MaximumWidthInPixels [protected] |
User-changeable settings.
Definition at line 480 of file vtkScalarBarActor.h.
int vtkScalarBarActor::MaximumHeightInPixels [protected] |
User-changeable settings.
Definition at line 481 of file vtkScalarBarActor.h.
int vtkScalarBarActor::TextPad [protected] |
User-changeable settings.
Definition at line 482 of file vtkScalarBarActor.h.
double vtkScalarBarActor::BarRatio [protected] |
User-changeable settings.
Definition at line 483 of file vtkScalarBarActor.h.
double vtkScalarBarActor::TitleRatio [protected] |
User-changeable settings.
Definition at line 484 of file vtkScalarBarActor.h.
vtkTimeStamp vtkScalarBarActor::BuildTime [protected] |
Internal state used for rendering.
Last time internal state changed.
Definition at line 489 of file vtkScalarBarActor.h.
int vtkScalarBarActor::LastSize[2] [protected] |
Projected size in viewport coordinates of last build.
Definition at line 490 of file vtkScalarBarActor.h.
int vtkScalarBarActor::LastOrigin[2] [protected] |
Projected origin (viewport coordinates) of last build.
Definition at line 491 of file vtkScalarBarActor.h.
vtkScalarBarActorInternal* vtkScalarBarActor::P [protected] |
Containers shared with subclasses.
Definition at line 493 of file vtkScalarBarActor.h.
vtkScalarsToColors* vtkScalarBarActor::LookupTable [protected] |
The object this actor illustrates.
Definition at line 495 of file vtkScalarBarActor.h.
vtkTextProperty* vtkScalarBarActor::TitleTextProperty [protected] |
Font for the legend title.
Definition at line 497 of file vtkScalarBarActor.h.
vtkTextProperty* vtkScalarBarActor::LabelTextProperty [protected] |
Font for tick+annotation labels.
Definition at line 498 of file vtkScalarBarActor.h.
vtkTextActor* vtkScalarBarActor::TitleActor [protected] |
The legend title text renderer.
Definition at line 499 of file vtkScalarBarActor.h.
vtkPolyData* vtkScalarBarActor::ScalarBar [protected] |
Polygon(s) colored by LookupTable.
Definition at line 501 of file vtkScalarBarActor.h.
vtkPolyDataMapper2D* vtkScalarBarActor::ScalarBarMapper [protected] |
Mapper for ScalarBar.
Definition at line 502 of file vtkScalarBarActor.h.
vtkActor2D* vtkScalarBarActor::ScalarBarActor [protected] |
Actor for ScalarBar.
Definition at line 503 of file vtkScalarBarActor.h.
vtkPolyData* vtkScalarBarActor::TexturePolyData [protected] |
Polygon colored when UseOpacity is true.
Definition at line 504 of file vtkScalarBarActor.h.
vtkTexture* vtkScalarBarActor::Texture [protected] |
Color data for TexturePolyData.
Definition at line 505 of file vtkScalarBarActor.h.
vtkActor2D* vtkScalarBarActor::TextureActor [protected] |
Actor for TexturePolyData.
Definition at line 506 of file vtkScalarBarActor.h.
vtkPolyData* vtkScalarBarActor::Background [protected] |
Polygon used to fill the background.
Definition at line 508 of file vtkScalarBarActor.h.
vtkPolyDataMapper2D* vtkScalarBarActor::BackgroundMapper [protected] |
Mapper for Background.
Definition at line 509 of file vtkScalarBarActor.h.
vtkActor2D* vtkScalarBarActor::BackgroundActor [protected] |
Actor for Background.
Definition at line 510 of file vtkScalarBarActor.h.
vtkPolyData* vtkScalarBarActor::Frame [protected] |
Polyline used to highlight frame.
Definition at line 512 of file vtkScalarBarActor.h.
vtkPolyDataMapper2D* vtkScalarBarActor::FrameMapper [protected] |
Mapper for Frame.
Definition at line 513 of file vtkScalarBarActor.h.
vtkActor2D* vtkScalarBarActor::FrameActor [protected] |
Actor for Frame.
Definition at line 514 of file vtkScalarBarActor.h.