59#ifndef vtkScalarBarActor_h
60#define vtkScalarBarActor_h
62#include "vtkRenderingAnnotationModule.h"
77#define VTK_ORIENT_HORIZONTAL 0
78#define VTK_ORIENT_VERTICAL 1
112 virtual
void ReleaseGraphicsResources(
vtkWindow*) VTK_OVERRIDE;
119 virtual
void GetScalarBarRect(
int rect[4],
vtkViewport* viewport);
141 vtkGetMacro(UseOpacity,
int);
152 vtkGetMacro(MaximumNumberOfColors,
int);
159 vtkSetClampMacro(NumberOfLabels,
int, 0, 64);
160 vtkGetMacro(NumberOfLabels,
int);
168 vtkGetMacro(Orientation,
int);
169 void SetOrientationToHorizontal()
203 vtkSetStringMacro(LabelFormat);
211 vtkSetStringMacro(Title);
219 vtkSetStringMacro(ComponentTitle);
233 vtkGetMacro(TextureGridWidth,
double);
243 enum { PrecedeScalarBar = 0, SucceedScalarBar };
254 vtkSetClampMacro(TextPosition,
int, PrecedeScalarBar, SucceedScalarBar);
255 vtkGetMacro(TextPosition,
int);
271 vtkGetMacro(MaximumWidthInPixels,
int);
273 vtkGetMacro(MaximumHeightInPixels,
int);
283 vtkGetMacro(AnnotationLeaderPadding,
double);
293 vtkGetMacro(DrawAnnotations,
int);
304 vtkGetMacro(DrawNanAnnotation,
int);
315 vtkGetMacro(DrawBelowRangeSwatch,
bool);
323 vtkSetStringMacro(BelowRangeAnnotation);
334 vtkGetMacro(DrawAboveRangeSwatch,
bool);
342 vtkSetStringMacro(AboveRangeAnnotation);
355 vtkGetMacro(FixedAnnotationLeaderLineColor,
int);
363 vtkSetStringMacro(NanAnnotation);
377 vtkGetMacro(AnnotationTextScaling,
int);
387 vtkGetMacro(DrawBackground,
int);
397 vtkGetMacro(DrawFrame,
int);
407 vtkGetMacro(DrawColorBar,
int);
416 vtkGetMacro(DrawTickLabels,
int);
441 vtkGetMacro(TextPad,
int);
451 vtkGetMacro(VerticalTitleSeparation,
int);
460 vtkGetMacro(BarRatio,
double);
461 vtkSetClampMacro(BarRatio,
double, 0., 1.);
471 vtkGetMacro(TitleRatio,
double);
472 vtkSetClampMacro(TitleRatio,
double, 0., 1.);
482 vtkGetMacro(UnconstrainedFontSize,
bool);
707 double barX,
double barY,
double barWidth,
double barHeight,
708 double delta,
double pad);
713 double barX,
double barY,
double barWidth,
double barHeight,
714 double delta,
double pad);
a actor that draws 2D data
Some derived classes for the different colors commonly used.
a simple class to control print indentation
draw vtkPolyData onto the image plane
concrete dataset represents vertices, lines, polygons, and triangle strips
abstract superclass for all actors, volumes and annotations
represent surface properties of a 2D image
Internal state for the scalar bar actor shared with subclasses.
Create a scalar bar with labels.
virtual void LayoutNanSwatch()
vtkPolyData * Background
Polygon used to fill the background.
int RenderOverlay(vtkViewport *viewport) override
Support the standard render methods.
virtual void ComputeScalarBarThickness()
Determine how thick the scalar bar should be (on an axis perpendicular to the direction in which scal...
virtual void SetAnnotationTextProperty(vtkTextProperty *p)
Set/Get the annotation text property.
virtual void FreeLayoutStorage()
Free internal storage used by the previous layout.
virtual void ConfigureAnnotations()
Generate/configure the annotation labels using the laid-out geometry.
virtual void ComputeFrame()
If the scalar bar should be inset into a frame or rendered with a solid background,...
virtual void ComputeSwatchPad()
Compute a correct SwatchPad.
int RenderOpaqueGeometry(vtkViewport *viewport) override
Draw the scalar bar and annotation text to the screen.
vtkTextActor * TitleActor
The legend title text renderer.
virtual void LayoutTitle()
Determine the position and size of the scalar bar title box.
char * BelowRangeAnnotation
vtkProperty2D * BackgroundProperty
virtual void ConfigureNanSwatch()
Generate/configure the NaN swatch using the laid-out geometry.
void SetOrientationToVertical()
int MaximumNumberOfColors
User-changeable settings.
vtkTextProperty * AnnotationTextProperty
Font for annotation labels.
vtkTexturedActor2D * TextureActor
Actor for TexturePolyData.
virtual void LayoutBelowRangeSwatch()
Determine the size of the Below Range if it is to be rendered.
virtual int HasTranslucentPolygonalGeometry() override
Does this prop have some translucent polygonal geometry?
vtkPolyData * Frame
Polyline used to highlight frame.
int PlaceAnnotationsVertically(double barX, double barY, double barWidth, double barHeight, double delta, double pad)
This method is called by ConfigureAnnotationLabels when Orientation is VTK_ORIENT_VERTICAL.
vtkPolyData * ScalarBar
Polygon(s) colored by LookupTable.
virtual void ConfigureTicks()
Generate/configure the tick-mark actors using the laid-out geometry.
vtkPolyDataMapper2D * FrameMapper
Mapper for Frame.
virtual void LayoutAnnotations()
This method must lay out annotation text and leader lines so they do not overlap.
virtual void RebuildLayout(vtkViewport *viewport)
Called from within RenderOpaqueGeometry when the internal state members need to be updated before ren...
int MapAnnotationLabels(vtkScalarsToColors *lkup, double start, double delta, const double *range)
Allocate actors for lookup table annotations and position them properly.
int MaximumHeightInPixels
int VerticalTitleSeparation
double AnnotationLeaderPadding
bool UnconstrainedFontSize
vtkTextProperty * TitleTextProperty
Font for the legend title.
virtual int RebuildLayoutIfNeeded(vtkViewport *viewport)
Calls RebuildLayout if it is needed such as when positions etc have changed.
vtkActor2D * FrameActor
Actor for Frame.
vtkProperty2D * FrameProperty
vtkPolyData * TexturePolyData
Polygon colored when UseOpacity is true.
virtual void SetTextPositionToPrecedeScalarBar()
virtual void SetTextPositionToSucceedScalarBar()
bool DrawBelowRangeSwatch
virtual void LayoutAboveRangeSwatchPosn()
Determine the position of the Above Range if it is to be rendered.
virtual void EditAnnotations()
Subclasses may override this method to alter this->P->Labels, allowing the addition and removal of an...
vtkActor2D * BackgroundActor
Actor for Background.
virtual void DrawBoxes()
For debugging, add placement boxes to the frame polydata.
char * AboveRangeAnnotation
vtkTextProperty * LabelTextProperty
Font for tick labels.
virtual void ConfigureFrame()
Generate/configure the representation of the frame from laid-out geometry.
vtkPolyDataMapper2D * BackgroundMapper
Mapper for Background.
virtual void SetTitleTextProperty(vtkTextProperty *p)
Set/Get the title text property.
virtual void SizeTitle(double *titleSize, int *size, vtkViewport *viewport)
Compute the best size for the legend title.
virtual void ConfigureAboveBelowRangeSwatch(bool above)
Generate/configure the above/below range swatch using the laid-out geometry.
int PlaceAnnotationsHorizontally(double barX, double barY, double barWidth, double barHeight, double delta, double pad)
This method is called by ConfigureAnnotationLabels when Orientation is VTK_ORIENT_HORIZONTAL.
virtual void ConfigureScalarBar()
Generate/configure the scalar bar representation from laid-out geometry.
virtual void ComputeScalarBarLength()
Determine how long the scalar bar should be (on an axis parallel to the direction in which scalar val...
virtual void ConfigureTitle()
Generate/configure the title actor using the laid-out geometry.
virtual int RenderTranslucentPolygonalGeometry(vtkViewport *) override
static vtkScalarBarActor * New()
Instantiate object with 64 maximum colors; 5 labels; %%-#6.3g label format, no title,...
void ShallowCopy(vtkProp *prop) override
Shallow copy of a scalar bar actor.
vtkPolyDataMapper2D * ScalarBarMapper
Mapper for ScalarBar.
vtkTexture * Texture
Color data for TexturePolyData.
vtkScalarBarActorInternal * P
Containers shared with subclasses.
vtkActor2D * ScalarBarActor
Actor for ScalarBar.
virtual void SetBackgroundProperty(vtkProperty2D *p)
Set/Get the background property.
virtual void PrepareTitleText()
Set the title actor's input to the latest title (and subtitle) text.
vtkTimeStamp BuildTime
Internal state used for rendering.
virtual void LayoutAboveRangeSwatch()
Determine the size of the Above Range if it is to be rendered.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
int AnnotationTextScaling
int FixedAnnotationLeaderLineColor
virtual void SetFrameProperty(vtkProperty2D *p)
Set/Get the frame property.
bool DrawAboveRangeSwatch
virtual void LayoutForUnconstrainedFont()
This method sets the title and tick-box size and position for the UnconstrainedFontSize mode.
vtkScalarsToColors * LookupTable
The object this actor illustrates.
virtual void LayoutTicks()
Determine the size and placement of any tick marks to be rendered.
virtual void SetLabelTextProperty(vtkTextProperty *p)
Set/Get the labels text property.
Superclass for mapping scalar values to colors.
An actor that displays text.
represent text properties.
handles properties associated with a texture map
actor that draws 2D data with texture support
record modification and/or execution time
abstract specification for Viewports
window superclass for vtkRenderWindow
vtkSetMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
vtkBooleanMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
vtkGetStringMacro(ExtensionsString)
Returns a string listing all available extensions.
#define VTK_ORIENT_VERTICAL
#define VTK_ORIENT_HORIZONTAL