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);
129 vtkGetObjectMacro(LookupTable, vtkScalarsToColors);
141 vtkGetMacro(UseOpacity,
int);
151 vtkSetClampMacro(MaximumNumberOfColors,
int, 2,
VTK_INT_MAX);
152 vtkGetMacro(MaximumNumberOfColors,
int);
159 vtkSetClampMacro(NumberOfLabels,
int, 0, 64);
160 vtkGetMacro(NumberOfLabels,
int);
168 vtkGetMacro(Orientation,
int);
169 void SetOrientationToHorizontal()
170 {this->SetOrientation(VTK_ORIENT_HORIZONTAL);}
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);
521 virtual int RebuildLayoutIfNeeded(
vtkViewport* viewport);
527 virtual void FreeLayoutStorage();
537 virtual void ComputeFrame();
548 virtual void ComputeScalarBarThickness();
553 virtual void ComputeSwatchPad();
557 virtual void LayoutNanSwatch();
565 virtual void LayoutBelowRangeSwatch();
573 virtual void LayoutAboveRangeSwatch();
581 virtual void LayoutAboveRangeSwatchPosn();
586 virtual void PrepareTitleText();
598 virtual void LayoutTitle();
604 virtual void LayoutForUnconstrainedFont();
614 virtual void ComputeScalarBarLength();
625 virtual void LayoutTicks();
634 virtual void LayoutAnnotations();
639 virtual void ConfigureAnnotations();
644 virtual void ConfigureFrame();
649 virtual void DrawBoxes();
654 virtual void ConfigureScalarBar();
659 virtual void ConfigureTitle();
664 virtual void ConfigureTicks();
672 virtual void ConfigureNanSwatch();
678 virtual void ConfigureAboveBelowRangeSwatch(
bool above);
695 virtual void SizeTitle(
double* titleSize,
int*
size,
vtkViewport* viewport);
700 int MapAnnotationLabels(
706 int PlaceAnnotationsVertically(
707 double barX,
double barY,
double barWidth,
double barHeight,
708 double delta,
double pad);
712 int PlaceAnnotationsHorizontally(
713 double barX,
double barY,
double barWidth,
double barHeight,
714 double delta,
double pad);
abstract superclass for all actors, volumes and annotations
int TextPad
User-changeable settings.
int DrawNanAnnotation
User-changeable settings.
int MaximumWidthInPixels
User-changeable settings.
int DrawTickLabels
User-changeable settings.
virtual void EditAnnotations()
Subclasses may override this method to alter this->P->Labels, allowing the addition and removal of an...
double TitleRatio
User-changeable settings.
actor that draws 2D data with texture support
vtkPolyDataMapper2D * ScalarBarMapper
Mapper for ScalarBar.
int DrawFrame
User-changeable settings.
abstract specification for Viewports
virtual void SetTextPositionToPrecedeScalarBar()
Should the title and tick marks precede the scalar bar or succeed it? This is measured along the view...
vtkScalarsToColors * LookupTable
The object this actor illustrates.
vtkPolyDataMapper2D * BackgroundMapper
Mapper for Background.
a actor that draws 2D data
record modification and/or execution time
Internal state for the scalar bar actor shared with subclasses.
int NumberOfLabelsBuilt
User-changeable settings.
vtkActor2D * FrameActor
Actor for Frame.
Create a scalar bar with labels.
int UseOpacity
User-changeable settings.
int VerticalTitleSeparation
User-changeable settings.
int DrawColorBar
User-changeable settings.
char * AboveRangeAnnotation
User-changeable settings.
int AnnotationTextScaling
User-changeable settings.
concrete dataset represents vertices, lines, polygons, and triangle strips
double TextureGridWidth
User-changeable settings.
vtkTexture * Texture
Color data for TexturePolyData.
virtual int HasTranslucentPolygonalGeometry() override
Does this prop have some translucent polygonal geometry?
int FixedAnnotationLeaderLineColor
User-changeable settings.
char * BelowRangeAnnotation
User-changeable settings.
char * ComponentTitle
User-changeable settings.
#define VTK_ORIENT_VERTICAL
int MaximumHeightInPixels
User-changeable settings.
char * Title
User-changeable settings.
Superclass for mapping scalar values to colors.
window superclass for vtkRenderWindow
vtkActor2D * BackgroundActor
Actor for Background.
An actor that displays text.
#define VTK_ORIENT_HORIZONTAL
Some derived classes for the different colors commonly used.
a simple class to control print indentation
char * LabelFormat
User-changeable settings.
vtkScalarBarActorInternal * P
Containers shared with subclasses.
int NumberOfLabels
User-changeable settings.
static vtkActor2D * New()
Creates an actor2D with the following defaults: position (0,0) (coordinate system is viewport); at la...
double AnnotationLeaderPadding
User-changeable settings.
virtual int RenderTranslucentPolygonalGeometry(vtkViewport *) override
Draw the scalar bar and annotation text to the screen.
handles properties associated with a texture map
vtkGetStringMacro(ExtensionsString)
Returns a string listing all available extensions.
int Orientation
User-changeable settings.
int TextPosition
User-changeable settings.
vtkPolyData * ScalarBar
Polygon(s) colored by LookupTable.
bool DrawBelowRangeSwatch
User-changeable settings.
vtkProperty2D * BackgroundProperty
User-changeable settings.
vtkActor2D * ScalarBarActor
Actor for ScalarBar.
represent text properties.
vtkPolyData * Background
Polygon used to fill the background.
vtkTextProperty * LabelTextProperty
Font for tick labels.
vtkTimeStamp BuildTime
Internal state used for rendering.
vtkSetMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
vtkTextProperty * TitleTextProperty
Font for the legend title.
int MaximumNumberOfColors
User-changeable settings.
char * NanAnnotation
User-changeable settings.
double BarRatio
User-changeable settings.
virtual int RenderOverlay(vtkViewport *viewport) override
Support the standard render methods.
virtual void ShallowCopy(vtkProp *prop) override
Shallow copy of this vtkActor2D.
virtual int RenderOpaqueGeometry(vtkViewport *viewport) override
Support the standard render methods.
vtkTextProperty * AnnotationTextProperty
Font for annotation labels.
vtkTextActor * TitleActor
The legend title text renderer.
vtkPolyDataMapper2D * FrameMapper
Mapper for Frame.
represent surface properties of a 2D image
virtual void SetTextPositionToSucceedScalarBar()
Should the title and tick marks precede the scalar bar or succeed it? This is measured along the view...
void SetOrientationToVertical()
Control the orientation of the scalar bar.
int DrawBackground
User-changeable settings.
bool DrawAboveRangeSwatch
User-changeable settings.
vtkBooleanMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
vtkProperty2D * FrameProperty
User-changeable settings.
bool UnconstrainedFontSize
User-changeable settings.
int DrawAnnotations
User-changeable settings.
vtkPolyData * Frame
Polyline used to highlight frame.
draw vtkPolyData onto the image plane
vtkPolyData * TexturePolyData
Polygon colored when UseOpacity is true.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkTexturedActor2D * TextureActor
Actor for TexturePolyData.