 |
VTK
9.1.0
|
Go to the documentation of this file.
165 #ifndef vtkScalarBarActor_h
166 #define vtkScalarBarActor_h
170 #include "vtkRenderingAnnotationModule.h"
184 #define VTK_ORIENT_HORIZONTAL 0
185 #define VTK_ORIENT_VERTICAL 1
259 vtkGetMacro(MaximumNumberOfColors,
int);
266 vtkSetClampMacro(NumberOfLabels,
int, 0, 64);
267 vtkGetMacro(NumberOfLabels,
int);
283 vtkGetMacro(UseCustomLabels,
bool);
284 vtkSetMacro(UseCustomLabels,
bool);
285 vtkBooleanMacro(UseCustomLabels,
bool);
293 vtkGetMacro(Orientation,
int);
327 vtkSetStringMacro(LabelFormat);
328 vtkGetStringMacro(LabelFormat);
335 vtkSetStringMacro(Title);
336 vtkGetStringMacro(Title);
343 vtkSetStringMacro(ComponentTitle);
344 vtkGetStringMacro(ComponentTitle);
356 vtkSetMacro(TextureGridWidth,
double);
357 vtkGetMacro(TextureGridWidth,
double);
369 PrecedeScalarBar = 0,
382 vtkSetClampMacro(TextPosition,
int, PrecedeScalarBar, SucceedScalarBar);
383 vtkGetMacro(TextPosition,
int);
402 vtkSetMacro(MaximumWidthInPixels,
int);
403 vtkGetMacro(MaximumWidthInPixels,
int);
404 vtkSetMacro(MaximumHeightInPixels,
int);
405 vtkGetMacro(MaximumHeightInPixels,
int);
414 vtkSetMacro(AnnotationLeaderPadding,
double);
415 vtkGetMacro(AnnotationLeaderPadding,
double);
446 vtkSetMacro(DrawBelowRangeSwatch,
bool);
447 vtkGetMacro(DrawBelowRangeSwatch,
bool);
448 vtkBooleanMacro(DrawBelowRangeSwatch,
bool);
455 vtkSetStringMacro(BelowRangeAnnotation);
456 vtkGetStringMacro(BelowRangeAnnotation);
465 vtkSetMacro(DrawAboveRangeSwatch,
bool);
466 vtkGetMacro(DrawAboveRangeSwatch,
bool);
467 vtkBooleanMacro(DrawAboveRangeSwatch,
bool);
474 vtkSetStringMacro(AboveRangeAnnotation);
475 vtkGetStringMacro(AboveRangeAnnotation);
495 vtkSetStringMacro(NanAnnotation);
496 vtkGetStringMacro(NanAnnotation);
573 vtkGetMacro(TextPad,
int);
574 vtkSetMacro(TextPad,
int);
583 vtkGetMacro(VerticalTitleSeparation,
int);
584 vtkSetMacro(VerticalTitleSeparation,
int);
592 vtkGetMacro(BarRatio,
double);
593 vtkSetClampMacro(BarRatio,
double, 0., 1.);
603 vtkGetMacro(TitleRatio,
double);
604 vtkSetClampMacro(TitleRatio,
double, 0., 1.);
614 vtkSetMacro(UnconstrainedFontSize,
bool);
615 vtkGetMacro(UnconstrainedFontSize,
bool);
616 vtkBooleanMacro(UnconstrainedFontSize,
bool);
841 double barX,
double barY,
double barWidth,
double barHeight,
double delta,
double pad);
847 double barX,
double barY,
double barWidth,
double barHeight,
double delta,
double pad);
856 bool UseCustomLabels =
false;
~vtkScalarBarActor() override
vtkPolyData * TexturePolyData
Polygon colored when UseOpacity is true.
vtkTypeBool FixedAnnotationLeaderLineColor
User-changeable settings.
draw vtkPolyData onto the image plane
int TextPad
User-changeable settings.
virtual void LayoutTitle()
Determine the position and size of the scalar bar title box.
int MaximumWidthInPixels
User-changeable settings.
virtual void LayoutBelowRangeSwatch()
Determine the size of the Below Range if it is to be rendered.
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.
double TitleRatio
User-changeable settings.
Internal state for the scalar bar actor shared with subclasses.
virtual void SetTextPositionToPrecedeScalarBar()
Should the title and tick marks precede the scalar bar or succeed it? This is measured along the view...
actor that draws 2D data with texture support
vtkScalarsToColors * LookupTable
The object this actor illustrates.
vtkPolyDataMapper2D * BackgroundMapper
Mapper for Background.
#define VTK_ORIENT_HORIZONTAL
vtkPolyDataMapper2D * ScalarBarMapper
Mapper for ScalarBar.
virtual void FreeLayoutStorage()
Free internal storage used by the previous layout.
virtual void ComputeScalarBarThickness()
Determine how thick the scalar bar should be (on an axis perpendicular to the direction in which scal...
vtkActor2D * FrameActor
Actor for Frame.
virtual void ConfigureTitle()
Generate/configure the title actor using the laid-out geometry.
record modification and/or execution time
virtual void LayoutAboveRangeSwatchPosn()
Determine the position of the Above Range if it is to be rendered.
char * AboveRangeAnnotation
User-changeable settings.
double TextureGridWidth
User-changeable settings.
int NumberOfLabelsBuilt
User-changeable settings.
vtkTypeBool AnnotationTextScaling
User-changeable settings.
virtual void ComputeFrame()
If the scalar bar should be inset into a frame or rendered with a solid background,...
int VerticalTitleSeparation
User-changeable settings.
char * BelowRangeAnnotation
User-changeable settings.
char * ComponentTitle
User-changeable settings.
int MaximumHeightInPixels
User-changeable settings.
int RenderTranslucentPolygonalGeometry(vtkViewport *) override
Draw the scalar bar and annotation text to the screen.
char * Title
User-changeable settings.
window superclass for vtkRenderWindow
virtual void LayoutAboveRangeSwatch()
Determine the size of the Above Range if it is to be rendered.
vtkActor2D * BackgroundActor
Actor for Background.
vtkTexture * Texture
Color data for TexturePolyData.
virtual void LayoutForUnconstrainedFont()
This method sets the title and tick-box size and position for the UnconstrainedFontSize mode.
int RenderOverlay(vtkViewport *viewport) override
Draw the scalar bar and annotation text to the screen.
vtkTypeBool DrawAnnotations
User-changeable settings.
handles properties associated with a texture map
virtual void SetFrameProperty(vtkProperty2D *p)
Set/Get the frame property.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
char * LabelFormat
User-changeable settings.
virtual void ConfigureFrame()
Generate/configure the representation of the frame from laid-out geometry.
virtual void LayoutNanSwatch()
int NumberOfLabels
User-changeable settings.
virtual void SizeTitle(double *titleSize, int *size, vtkViewport *viewport)
Compute the best size for the legend title.
An actor that displays text.
a simple class to control print indentation
virtual void ConfigureAboveBelowRangeSwatch(bool above)
Generate/configure the above/below range swatch using the laid-out geometry.
vtkTypeBool UseOpacity
User-changeable settings.
int RenderOpaqueGeometry(vtkViewport *viewport) override
Draw the scalar bar and annotation text to the screen.
vtkScalarBarActorInternal * P
Containers shared with subclasses.
vtkActor2D * ScalarBarActor
Actor for ScalarBar.
virtual int RebuildLayoutIfNeeded(vtkViewport *viewport)
Calls RebuildLayout if it is needed such as when positions etc have changed.
virtual void ComputeScalarBarLength()
Determine how long the scalar bar should be (on an axis parallel to the direction in which scalar val...
double AnnotationLeaderPadding
User-changeable settings.
vtkTextProperty * LabelTextProperty
Font for tick labels.
virtual void ComputeSwatchPad()
Compute a correct SwatchPad.
static vtkScalarBarActor * New()
Instantiate object with 64 maximum colors; 5 labels; %%-#6.3g label format, no title,...
Superclass for mapping scalar values to colors.
int TextPosition
User-changeable settings.
int Orientation
User-changeable settings.
vtkPolyData * ScalarBar
Polygon(s) colored by LookupTable.
abstract specification for Viewports
virtual void ConfigureAnnotations()
Generate/configure the annotation labels using the laid-out geometry.
virtual void ConfigureNanSwatch()
Generate/configure the NaN swatch using the laid-out geometry.
bool DrawBelowRangeSwatch
User-changeable settings.
vtkProperty2D * BackgroundProperty
User-changeable settings.
represent text properties.
vtkTypeBool DrawBackground
User-changeable settings.
vtkPolyData * Background
Polygon used to fill the background.
vtkTypeBool DrawColorBar
User-changeable settings.
virtual void SetLookupTable(vtkScalarsToColors *)
Set/Get the lookup table to use.
abstract superclass for all actors, volumes and annotations
vtkTimeStamp BuildTime
Internal state used for rendering.
virtual void LayoutTicks()
Determine the size and placement of any tick marks to be rendered.
represent surface properties of a 2D image
vtkTextProperty * TitleTextProperty
Font for the legend title.
vtkTypeBool HasTranslucentPolygonalGeometry() override
Does this prop have some translucent polygonal geometry?
virtual void SetAnnotationTextProperty(vtkTextProperty *p)
Set/Get the annotation text property.
int MaximumNumberOfColors
User-changeable settings.
a actor that draws 2D data
virtual void LayoutAnnotations()
This method must lay out annotation text and leader lines so they do not overlap.
virtual void PrepareTitleText()
Set the title actor's input to the latest title (and subtitle) text.
void ReleaseGraphicsResources(vtkWindow *) override
Release any graphics resources that are being consumed by this actor.
virtual void SetBackgroundProperty(vtkProperty2D *p)
Set/Get the background property.
vtkTextActor * TitleActor
The legend title text renderer.
virtual void ConfigureTicks()
Generate/configure the tick-mark actors using the laid-out geometry.
vtkPolyDataMapper2D * FrameMapper
Mapper for Frame.
char * NanAnnotation
User-changeable settings.
virtual void GetScalarBarRect(int rect[4], vtkViewport *viewport)
Fills rect with the dimensions of the scalar bar in viewport coordinates.
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.
Some derived classes for the different colors commonly used.
concrete dataset represents vertices, lines, polygons, and triangle strips
virtual void DrawBoxes()
For debugging, add placement boxes to the frame polydata.
virtual void SetCustomLabels(vtkDoubleArray *labels)
Set/Get the fixed locations to use.
bool UnconstrainedFontSize
User-changeable settings.
double BarRatio
User-changeable settings.
vtkTypeBool DrawFrame
User-changeable settings.
dynamic, self-adjusting array of double
#define VTK_ORIENT_VERTICAL
vtkTextProperty * AnnotationTextProperty
Font for annotation labels.
virtual void SetLabelTextProperty(vtkTextProperty *p)
Set/Get the labels text property.
vtkPolyData * Frame
Polyline used to highlight frame.
vtkTypeBool DrawTickLabels
User-changeable settings.
virtual void RebuildLayout(vtkViewport *viewport)
Called from within RenderOpaqueGeometry when the internal state members need to be updated before ren...
bool DrawAboveRangeSwatch
User-changeable settings.
vtkTypeBool DrawNanAnnotation
User-changeable settings.
void SetOrientationToHorizontal()
Control the orientation of the scalar bar.
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.
vtkProperty2D * FrameProperty
User-changeable settings.
Create a scalar bar with labels.
void ShallowCopy(vtkProp *prop) override
Shallow copy of a scalar bar actor.
vtkTexturedActor2D * TextureActor
Actor for TexturePolyData.
virtual void ConfigureScalarBar()
Generate/configure the scalar bar representation from laid-out geometry.
virtual void SetTitleTextProperty(vtkTextProperty *p)
Set/Get the title text property.
virtual void EditAnnotations()
Subclasses may override this method to alter this->P->Labels, allowing the addition and removal of an...
int MapAnnotationLabels(vtkScalarsToColors *lkup, double start, double delta, const double *range)
Allocate actors for lookup table annotations and position them properly.