VTK
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
vtkScalarBarActor Class Reference

Create a scalar bar with labels. More...

#include <vtkScalarBarActor.h>

Inheritance diagram for vtkScalarBarActor:
[legend]
Collaboration diagram for vtkScalarBarActor:
[legend]

Public Types

enum  { PrecedeScalarBar = 0, SucceedScalarBar }
 
typedef vtkActor2D Superclass
 
- Public Types inherited from vtkActor2D
typedef vtkProp Superclass
 
- Public Types inherited from vtkProp
typedef vtkObject Superclass
 

Public Member Functions

virtual vtkTypeBool IsA (const char *type)
 Return 1 if this class is the same type of (or a subclass of) the named class. More...
 
vtkScalarBarActorNewInstance () const
 
void PrintSelf (ostream &os, vtkIndent indent) override
 Methods invoked by print to print information about the object including superclasses. More...
 
int RenderOpaqueGeometry (vtkViewport *viewport) override
 Draw the scalar bar and annotation text to the screen. More...
 
int RenderTranslucentPolygonalGeometry (vtkViewport *) override
 
int RenderOverlay (vtkViewport *viewport) override
 
vtkTypeBool HasTranslucentPolygonalGeometry () override
 Does this prop have some translucent polygonal geometry? More...
 
void ReleaseGraphicsResources (vtkWindow *) override
 Release any graphics resources that are being consumed by this actor. More...
 
virtual void GetScalarBarRect (int rect[4], vtkViewport *viewport)
 Fills rect with the dimensions of the scalar bar in viewport coordinates. More...
 
virtual void SetLookupTable (vtkScalarsToColors *)
 Set/Get the lookup table to use. More...
 
virtual vtkScalarsToColorsGetLookupTable ()
 
virtual void SetUseOpacity (vtkTypeBool)
 Should be display the opacity as well. More...
 
virtual vtkTypeBool GetUseOpacity ()
 
virtual void UseOpacityOn ()
 
virtual void UseOpacityOff ()
 
virtual void SetMaximumNumberOfColors (int)
 Set/Get the maximum number of scalar bar segments to show. More...
 
virtual int GetMaximumNumberOfColors ()
 
virtual void SetNumberOfLabels (int)
 Set/Get the number of tick labels to show. More...
 
virtual int GetNumberOfLabels ()
 
virtual void SetOrientation (int)
 Control the orientation of the scalar bar. More...
 
virtual int GetOrientation ()
 
void SetOrientationToHorizontal ()
 
void SetOrientationToVertical ()
 
virtual void SetTitleTextProperty (vtkTextProperty *p)
 Set/Get the title text property. More...
 
virtual vtkTextPropertyGetTitleTextProperty ()
 
virtual void SetLabelTextProperty (vtkTextProperty *p)
 Set/Get the labels text property. More...
 
virtual vtkTextPropertyGetLabelTextProperty ()
 
virtual void SetAnnotationTextProperty (vtkTextProperty *p)
 Set/Get the annotation text property. More...
 
virtual vtkTextPropertyGetAnnotationTextProperty ()
 
virtual void SetLabelFormat (const char *)
 Set/Get the format with which to print the labels on the scalar bar. More...
 
virtual char * GetLabelFormat ()
 
virtual void SetTitle (const char *)
 Set/Get the title of the scalar bar actor,. More...
 
virtual char * GetTitle ()
 
virtual void SetComponentTitle (const char *)
 Set/Get the title for the component that is selected,. More...
 
virtual char * GetComponentTitle ()
 
void ShallowCopy (vtkProp *prop) override
 Shallow copy of a scalar bar actor. More...
 
virtual void SetTextureGridWidth (double)
 Set the width of the texture grid. More...
 
virtual double GetTextureGridWidth ()
 
virtual vtkTexturedActor2DGetTextureActor ()
 Get the texture actor. More...
 
virtual void SetTextPosition (int)
 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. More...
 
virtual int GetTextPosition ()
 
virtual void SetTextPositionToPrecedeScalarBar ()
 
virtual void SetTextPositionToSucceedScalarBar ()
 
virtual void SetMaximumWidthInPixels (int)
 Set/Get the maximum width and height in pixels. More...
 
virtual int GetMaximumWidthInPixels ()
 
virtual void SetMaximumHeightInPixels (int)
 
virtual int GetMaximumHeightInPixels ()
 
virtual void SetAnnotationLeaderPadding (double)
 Set/get the padding between the scalar bar and the text annotations. More...
 
virtual double GetAnnotationLeaderPadding ()
 
virtual void SetDrawAnnotations (vtkTypeBool)
 Set/get whether text annotations should be rendered or not. More...
 
virtual vtkTypeBool GetDrawAnnotations ()
 
virtual void DrawAnnotationsOn ()
 
virtual void DrawAnnotationsOff ()
 
virtual void SetDrawNanAnnotation (vtkTypeBool)
 Set/get whether the NaN annotation should be rendered or not. More...
 
virtual vtkTypeBool GetDrawNanAnnotation ()
 
virtual void DrawNanAnnotationOn ()
 
virtual void DrawNanAnnotationOff ()
 
virtual void SetDrawBelowRangeSwatch (bool)
 Set/get whether the Below range swatch should be rendered or not. More...
 
virtual bool GetDrawBelowRangeSwatch ()
 
virtual void DrawBelowRangeSwatchOn ()
 
virtual void DrawBelowRangeSwatchOff ()
 
virtual void SetBelowRangeAnnotation (const char *)
 Set/get the annotation text for "Below Range" values. More...
 
virtual char * GetBelowRangeAnnotation ()
 
virtual void SetDrawAboveRangeSwatch (bool)
 Set/get whether the Above range swatch should be rendered or not. More...
 
virtual bool GetDrawAboveRangeSwatch ()
 
virtual void DrawAboveRangeSwatchOn ()
 
virtual void DrawAboveRangeSwatchOff ()
 
virtual void SetAboveRangeAnnotation (const char *)
 Set/get the annotation text for "Above Range Swatch" values. More...
 
virtual char * GetAboveRangeAnnotation ()
 
virtual void SetFixedAnnotationLeaderLineColor (vtkTypeBool)
 Set/get how leader lines connecting annotations to values should be colored. More...
 
virtual vtkTypeBool GetFixedAnnotationLeaderLineColor ()
 
virtual void FixedAnnotationLeaderLineColorOn ()
 
virtual void FixedAnnotationLeaderLineColorOff ()
 
virtual void SetNanAnnotation (const char *)
 Set/get the annotation text for "NaN" values. More...
 
virtual char * GetNanAnnotation ()
 
virtual void SetAnnotationTextScaling (vtkTypeBool)
 Set/get whether annotation labels should be scaled with the viewport. More...
 
virtual vtkTypeBool GetAnnotationTextScaling ()
 
virtual void AnnotationTextScalingOn ()
 
virtual void AnnotationTextScalingOff ()
 
virtual void SetDrawBackground (vtkTypeBool)
 Set/Get whether a background should be drawn around the scalar bar. More...
 
virtual vtkTypeBool GetDrawBackground ()
 
virtual void DrawBackgroundOn ()
 
virtual void DrawBackgroundOff ()
 
virtual void SetDrawFrame (vtkTypeBool)
 Set/Get whether a frame should be drawn around the scalar bar. More...
 
virtual vtkTypeBool GetDrawFrame ()
 
virtual void DrawFrameOn ()
 
virtual void DrawFrameOff ()
 
virtual void SetDrawColorBar (vtkTypeBool)
 Set/Get whether the color bar should be drawn. More...
 
virtual vtkTypeBool GetDrawColorBar ()
 
virtual void DrawColorBarOn ()
 
virtual void DrawColorBarOff ()
 
virtual void SetDrawTickLabels (vtkTypeBool)
 Set/Get whether the tick labels should be drawn. More...
 
virtual vtkTypeBool GetDrawTickLabels ()
 
virtual void DrawTickLabelsOn ()
 
virtual void DrawTickLabelsOff ()
 
virtual void SetBackgroundProperty (vtkProperty2D *p)
 Set/Get the background property. More...
 
virtual vtkProperty2DGetBackgroundProperty ()
 
virtual void SetFrameProperty (vtkProperty2D *p)
 Set/Get the frame property. More...
 
virtual vtkProperty2DGetFrameProperty ()
 
virtual int GetTextPad ()
 Set/get the amount of padding around text boxes. More...
 
virtual void SetTextPad (int)
 
virtual int GetVerticalTitleSeparation ()
 Set/get the margin in pixels, between the title and the bar, when the Orientation is vertical. More...
 
virtual void SetVerticalTitleSeparation (int)
 
virtual double GetBarRatio ()
 Set/get the thickness of the color bar relative to the widget frame. More...
 
virtual void SetBarRatio (double)
 
virtual double GetTitleRatio ()
 Set/get the ratio of the title height to the tick label height (used only when the Orientation is horizontal). More...
 
virtual void SetTitleRatio (double)
 
virtual void SetUnconstrainedFontSize (bool)
 Set/Get whether the font size of title and labels is unconstrained. More...
 
virtual bool GetUnconstrainedFontSize ()
 
virtual void UnconstrainedFontSizeOn ()
 
virtual void UnconstrainedFontSizeOff ()
 
- Public Member Functions inherited from vtkActor2D
void PrintSelf (ostream &os, vtkIndent indent) override
 Methods invoked by print to print information about the object including superclasses. More...
 
vtkActor2DNewInstance () const
 
int RenderOverlay (vtkViewport *viewport) override
 Support the standard render methods. More...
 
int RenderOpaqueGeometry (vtkViewport *viewport) override
 WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE DO NOT USE THESE METHODS OUTSIDE OF THE RENDERING PROCESS All concrete subclasses must be able to render themselves. More...
 
int RenderTranslucentPolygonalGeometry (vtkViewport *viewport) override
 
vtkTypeBool HasTranslucentPolygonalGeometry () override
 Does this prop have some translucent polygonal geometry? More...
 
virtual void SetMapper (vtkMapper2D *mapper)
 Set/Get the vtkMapper2D which defines the data to be drawn. More...
 
virtual vtkMapper2DGetMapper ()
 
virtual void SetLayerNumber (int)
 Set/Get the layer number in the overlay planes into which to render. More...
 
virtual int GetLayerNumber ()
 
vtkProperty2DGetProperty ()
 Returns this actor's vtkProperty2D. More...
 
virtual void SetProperty (vtkProperty2D *)
 Set this vtkProp's vtkProperty2D. More...
 
virtual vtkCoordinateGetPositionCoordinate ()
 Get the PositionCoordinate instance of vtkCoordinate. More...
 
virtual void SetPosition (float x[2])
 
virtual void SetPosition (float x, float y)
 
virtual float * GetPosition ()
 
void SetDisplayPosition (int, int)
 Set the Prop2D's position in display coordinates. More...
 
virtual vtkCoordinateGetPosition2Coordinate ()
 Access the Position2 instance variable. More...
 
virtual void SetPosition2 (float x[2])
 
virtual void SetPosition2 (float x, float y)
 
virtual float * GetPosition2 ()
 
void SetWidth (double w)
 Set/Get the height and width of the Actor2D. More...
 
double GetWidth ()
 
void SetHeight (double h)
 
double GetHeight ()
 
vtkMTimeType GetMTime () override
 Return this objects MTime. More...
 
void GetActors2D (vtkPropCollection *pc) override
 For some exporters and other other operations we must be able to collect all the actors or volumes. More...
 
void ShallowCopy (vtkProp *prop) override
 Shallow copy of this vtkActor2D. More...
 
void ReleaseGraphicsResources (vtkWindow *) override
 Release any graphics resources that are being consumed by this actor. More...
 
virtual vtkCoordinateGetActualPositionCoordinate (void)
 Return the actual vtkCoordinate reference that the mapper should use to position the actor. More...
 
virtual vtkCoordinateGetActualPosition2Coordinate (void)
 Return the actual vtkCoordinate reference that the mapper should use to position the actor. More...
 
- Public Member Functions inherited from vtkProp
vtkPropNewInstance () const
 
void PrintSelf (ostream &os, vtkIndent indent) override
 Methods invoked by print to print information about the object including superclasses. More...
 
virtual void GetActors (vtkPropCollection *)
 For some exporters and other other operations we must be able to collect all the actors or volumes. More...
 
virtual void GetVolumes (vtkPropCollection *)
 
virtual void SetVisibility (vtkTypeBool)
 Set/Get visibility of this vtkProp. More...
 
virtual vtkTypeBool GetVisibility ()
 
virtual void VisibilityOn ()
 
virtual void VisibilityOff ()
 
virtual void SetPickable (vtkTypeBool)
 Set/Get the pickable instance variable. More...
 
virtual vtkTypeBool GetPickable ()
 
virtual void PickableOn ()
 
virtual void PickableOff ()
 
virtual void Pick ()
 Method fires PickEvent if the prop is picked. More...
 
virtual void SetDragable (vtkTypeBool)
 Set/Get the value of the dragable instance variable. More...
 
virtual vtkTypeBool GetDragable ()
 
virtual void DragableOn ()
 
virtual void DragableOff ()
 
virtual vtkMTimeType GetRedrawMTime ()
 Return the mtime of anything that would cause the rendered image to appear differently. More...
 
virtual void SetUseBounds (bool)
 In case the Visibility flag is true, tell if the bounds of this prop should be taken into account or ignored during the computation of other bounding boxes, like in vtkRenderer::ResetCamera(). More...
 
virtual bool GetUseBounds ()
 
virtual void UseBoundsOn ()
 
virtual void UseBoundsOff ()
 
virtual double * GetBounds ()
 Get the bounds for this Prop as (Xmin,Xmax,Ymin,Ymax,Zmin,Zmax). More...
 
virtual void InitPathTraversal ()
 vtkProp and its subclasses can be picked by subclasses of vtkAbstractPicker (e.g., vtkPropPicker). More...
 
virtual vtkAssemblyPathGetNextPath ()
 
virtual int GetNumberOfPaths ()
 
virtual void PokeMatrix (vtkMatrix4x4 *vtkNotUsed(matrix))
 These methods are used by subclasses to place a matrix (if any) in the prop prior to rendering. More...
 
virtual vtkMatrix4x4GetMatrix ()
 
virtual vtkInformationGetPropertyKeys ()
 Set/Get property keys. More...
 
virtual void SetPropertyKeys (vtkInformation *keys)
 
virtual bool HasKeys (vtkInformation *requiredKeys)
 Tells if the prop has all the required keys. More...
 
virtual int RenderVolumetricGeometry (vtkViewport *)
 
virtual bool RenderFilteredOpaqueGeometry (vtkViewport *v, vtkInformation *requiredKeys)
 Render the opaque geometry only if the prop has all the requiredKeys. More...
 
virtual bool RenderFilteredTranslucentPolygonalGeometry (vtkViewport *v, vtkInformation *requiredKeys)
 Render the translucent polygonal geometry only if the prop has all the requiredKeys. More...
 
virtual bool RenderFilteredVolumetricGeometry (vtkViewport *v, vtkInformation *requiredKeys)
 Render the volumetric geometry only if the prop has all the requiredKeys. More...
 
virtual bool RenderFilteredOverlay (vtkViewport *v, vtkInformation *requiredKeys)
 Render in the overlay of the viewport only if the prop has all the requiredKeys. More...
 
virtual vtkTypeBool HasOpaqueGeometry ()
 WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE DO NOT USE THESE METHODS OUTSIDE OF THE RENDERING PROCESS Does this prop have some opaque geometry? This method is called during the rendering process to know if there is some opaque geometry. More...
 
virtual double GetEstimatedRenderTime (vtkViewport *)
 WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE DO NOT USE THESE METHODS OUTSIDE OF THE RENDERING PROCESS The EstimatedRenderTime may be used to select between different props, for example in LODProp it is used to select the level-of-detail. More...
 
virtual double GetEstimatedRenderTime ()
 
virtual void SetEstimatedRenderTime (double t)
 WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE DO NOT USE THESE METHODS OUTSIDE OF THE RENDERING PROCESS This method is used by, for example, the vtkLODProp3D in order to initialize the estimated render time at start-up to some user defined value. More...
 
virtual void RestoreEstimatedRenderTime ()
 WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE DO NOT USE THESE METHODS OUTSIDE OF THE RENDERING PROCESS When the EstimatedRenderTime is first set to 0.0 (in the SetAllocatedRenderTime method) the old value is saved. More...
 
virtual void AddEstimatedRenderTime (double t, vtkViewport *vtkNotUsed(vp))
 WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE DO NOT USE THIS METHOD OUTSIDE OF THE RENDERING PROCESS This method is intended to allow the renderer to add to the EstimatedRenderTime in props that require information that the renderer has in order to do this. More...
 
virtual void SetAllocatedRenderTime (double t, vtkViewport *vtkNotUsed(v))
 WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE DO NOT USE THIS METHOD OUTSIDE OF THE RENDERING PROCESS The renderer may use the allocated rendering time to determine how to render this actor. More...
 
virtual double GetAllocatedRenderTime ()
 WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE DO NOT USE THIS METHOD OUTSIDE OF THE RENDERING PROCESS. More...
 
void SetRenderTimeMultiplier (double t)
 WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE DO NOT USE THIS METHOD OUTSIDE OF THE RENDERING PROCESS Get/Set the multiplier for the render time. More...
 
virtual double GetRenderTimeMultiplier ()
 
virtual void BuildPaths (vtkAssemblyPaths *paths, vtkAssemblyPath *path)
 WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE DO NOT USE THIS METHOD OUTSIDE OF THE RENDERING PROCESS Used to construct assembly paths and perform part traversal. More...
 
virtual bool GetSupportsSelection ()
 WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE DO NOT USE THIS METHOD OUTSIDE OF THE RENDERING PROCESS Used by vtkHardwareSelector to determine if the prop supports hardware selection. More...
 
virtual void ProcessSelectorPixelBuffers (vtkHardwareSelector *, std::vector< unsigned int > &)
 allows a prop to update a selections color buffers More...
 
virtual int GetNumberOfConsumers ()
 Get the number of consumers. More...
 
void AddConsumer (vtkObject *c)
 Add or remove or get or check a consumer,. More...
 
void RemoveConsumer (vtkObject *c)
 
vtkObjectGetConsumer (int i)
 
int IsConsumer (vtkObject *c)
 
virtual void SetShaderProperty (vtkShaderProperty *property)
 Set/Get the shader property. More...
 
virtual vtkShaderPropertyGetShaderProperty ()
 
virtual bool IsRenderingTranslucentPolygonalGeometry ()
 
- Public Member Functions inherited from vtkObject
 vtkBaseTypeMacro (vtkObject, vtkObjectBase)
 
virtual void DebugOn ()
 Turn debugging output on. More...
 
virtual void DebugOff ()
 Turn debugging output off. More...
 
bool GetDebug ()
 Get the value of the debug flag. More...
 
void SetDebug (bool debugFlag)
 Set the value of the debug flag. More...
 
virtual void Modified ()
 Update the modification time for this object. More...
 
unsigned long AddObserver (unsigned long event, vtkCommand *, float priority=0.0f)
 Allow people to add/remove/invoke observers (callbacks) to any VTK object. More...
 
unsigned long AddObserver (const char *event, vtkCommand *, float priority=0.0f)
 
vtkCommandGetCommand (unsigned long tag)
 
void RemoveObserver (vtkCommand *)
 
void RemoveObservers (unsigned long event, vtkCommand *)
 
void RemoveObservers (const char *event, vtkCommand *)
 
vtkTypeBool HasObserver (unsigned long event, vtkCommand *)
 
vtkTypeBool HasObserver (const char *event, vtkCommand *)
 
void RemoveObserver (unsigned long tag)
 
void RemoveObservers (unsigned long event)
 
void RemoveObservers (const char *event)
 
void RemoveAllObservers ()
 
vtkTypeBool HasObserver (unsigned long event)
 
vtkTypeBool HasObserver (const char *event)
 
template<class U , class T >
unsigned long AddObserver (unsigned long event, U observer, void(T::*callback)(), float priority=0.0f)
 Overloads to AddObserver that allow developers to add class member functions as callbacks for events. More...
 
template<class U , class T >
unsigned long AddObserver (unsigned long event, U observer, void(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f)
 
template<class U , class T >
unsigned long AddObserver (unsigned long event, U observer, bool(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f)
 Allow user to set the AbortFlagOn() with the return value of the callback method. More...
 
int InvokeEvent (unsigned long event, void *callData)
 This method invokes an event and return whether the event was aborted or not. More...
 
int InvokeEvent (const char *event, void *callData)
 
int InvokeEvent (unsigned long event)
 
int InvokeEvent (const char *event)
 
- Public Member Functions inherited from vtkObjectBase
const char * GetClassName () const
 Return the class name as a string. More...
 
virtual vtkIdType GetNumberOfGenerationsFromBase (const char *name)
 Given a the name of a base class of this class type, return the distance of inheritance between this class type and the named class (how many generations of inheritance are there between this class and the named class). More...
 
virtual void Delete ()
 Delete a VTK object. More...
 
virtual void FastDelete ()
 Delete a reference to this object. More...
 
void InitializeObjectBase ()
 
void Print (ostream &os)
 Print an object to an ostream. More...
 
virtual void PrintHeader (ostream &os, vtkIndent indent)
 
virtual void PrintTrailer (ostream &os, vtkIndent indent)
 
virtual void Register (vtkObjectBase *o)
 Increase the reference count (mark as used by another object). More...
 
virtual void UnRegister (vtkObjectBase *o)
 Decrease the reference count (release by another object). More...
 
int GetReferenceCount ()
 Return the current reference count of this object. More...
 
void SetReferenceCount (int)
 Sets the reference count. More...
 
void PrintRevisions (ostream &)
 Legacy. More...
 

Static Public Member Functions

static vtkTypeBool IsTypeOf (const char *type)
 
static vtkScalarBarActorSafeDownCast (vtkObjectBase *o)
 
static vtkScalarBarActorNew ()
 Instantiate object with 64 maximum colors; 5 labels; %%-#6.3g label format, no title, and vertical orientation. More...
 
- Static Public Member Functions inherited from vtkActor2D
static vtkTypeBool IsTypeOf (const char *type)
 
static vtkActor2DSafeDownCast (vtkObjectBase *o)
 
static vtkActor2DNew ()
 Creates an actor2D with the following defaults: position (0,0) (coordinate system is viewport); at layer 0. More...
 
- Static Public Member Functions inherited from vtkProp
static vtkTypeBool IsTypeOf (const char *type)
 
static vtkPropSafeDownCast (vtkObjectBase *o)
 
static vtkInformationIntegerKeyGeneralTextureUnit ()
 Optional Key Indicating the texture unit for general texture mapping Old OpenGL was a state machine where you would push or pop items. More...
 
static vtkInformationDoubleVectorKeyGeneralTextureTransform ()
 Optional Key Indicating the texture transform for general texture mapping Old OpenGL was a state machine where you would push or pop items. More...
 
- Static Public Member Functions inherited from vtkObject
static vtkObjectNew ()
 Create an object with Debug turned off, modified time initialized to zero, and reference counting on. More...
 
static void BreakOnError ()
 This method is called when vtkErrorMacro executes. More...
 
static void SetGlobalWarningDisplay (int val)
 This is a global flag that controls whether any debug, warning or error messages are displayed. More...
 
static void GlobalWarningDisplayOn ()
 
static void GlobalWarningDisplayOff ()
 
static int GetGlobalWarningDisplay ()
 
- Static Public Member Functions inherited from vtkObjectBase
static vtkTypeBool IsTypeOf (const char *name)
 Return 1 if this class type is the same type of (or a subclass of) the named class. More...
 
static vtkIdType GetNumberOfGenerationsFromBaseType (const char *name)
 Given a the name of a base class of this class type, return the distance of inheritance between this class type and the named class (how many generations of inheritance are there between this class and the named class). More...
 
static vtkObjectBaseNew ()
 Create an object with Debug turned off, modified time initialized to zero, and reference counting on. More...
 

Protected Member Functions

virtual vtkObjectBaseNewInstanceInternal () const
 
 vtkScalarBarActor ()
 
 ~vtkScalarBarActor () override
 
virtual void RebuildLayout (vtkViewport *viewport)
 Called from within RenderOpaqueGeometry when the internal state members need to be updated before rendering. More...
 
virtual int RebuildLayoutIfNeeded (vtkViewport *viewport)
 Calls RebuildLayout if it is needed such as when positions etc have changed. More...
 
virtual void FreeLayoutStorage ()
 Free internal storage used by the previous layout. More...
 
virtual void ComputeFrame ()
 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. More...
 
virtual void ComputeScalarBarThickness ()
 Determine how thick the scalar bar should be (on an axis perpendicular to the direction in which scalar values vary). More...
 
virtual void ComputeSwatchPad ()
 Compute a correct SwatchPad. More...
 
virtual void LayoutNanSwatch ()
 
virtual void LayoutBelowRangeSwatch ()
 Determine the size of the Below Range if it is to be rendered. More...
 
virtual void LayoutAboveRangeSwatch ()
 Determine the size of the Above Range if it is to be rendered. More...
 
virtual void LayoutAboveRangeSwatchPosn ()
 Determine the position of the Above Range if it is to be rendered. More...
 
virtual void PrepareTitleText ()
 Set the title actor's input to the latest title (and subtitle) text. More...
 
virtual void LayoutTitle ()
 Determine the position and size of the scalar bar title box. More...
 
virtual void LayoutForUnconstrainedFont ()
 This method sets the title and tick-box size and position for the UnconstrainedFontSize mode. More...
 
virtual void ComputeScalarBarLength ()
 Determine how long the scalar bar should be (on an axis parallel to the direction in which scalar values vary). More...
 
virtual void LayoutTicks ()
 Determine the size and placement of any tick marks to be rendered. More...
 
virtual void LayoutAnnotations ()
 This method must lay out annotation text and leader lines so they do not overlap. More...
 
virtual void ConfigureAnnotations ()
 Generate/configure the annotation labels using the laid-out geometry. More...
 
virtual void ConfigureFrame ()
 Generate/configure the representation of the frame from laid-out geometry. More...
 
virtual void DrawBoxes ()
 For debugging, add placement boxes to the frame polydata. More...
 
virtual void ConfigureScalarBar ()
 Generate/configure the scalar bar representation from laid-out geometry. More...
 
virtual void ConfigureTitle ()
 Generate/configure the title actor using the laid-out geometry. More...
 
virtual void ConfigureTicks ()
 Generate/configure the tick-mark actors using the laid-out geometry. More...
 
virtual void ConfigureNanSwatch ()
 Generate/configure the NaN swatch using the laid-out geometry. More...
 
virtual void ConfigureAboveBelowRangeSwatch (bool above)
 Generate/configure the above/below range swatch using the laid-out geometry. More...
 
virtual void EditAnnotations ()
 Subclasses may override this method to alter this->P->Labels, allowing the addition and removal of annotations. More...
 
virtual void SizeTitle (double *titleSize, int *size, vtkViewport *viewport)
 Compute the best size for the legend title. More...
 
int MapAnnotationLabels (vtkScalarsToColors *lkup, double start, double delta, const double *range)
 Allocate actors for lookup table annotations and position them properly. More...
 
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. More...
 
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. More...
 
- Protected Member Functions inherited from vtkActor2D
 vtkActor2D ()
 
 ~vtkActor2D () override
 
- Protected Member Functions inherited from vtkProp
 vtkProp ()
 
 ~vtkProp () override
 
- Protected Member Functions inherited from vtkObject
 vtkObject ()
 
 ~vtkObject () override
 
void RegisterInternal (vtkObjectBase *, vtkTypeBool check) override
 
void UnRegisterInternal (vtkObjectBase *, vtkTypeBool check) override
 
void InternalGrabFocus (vtkCommand *mouseEvents, vtkCommand *keypressEvents=nullptr)
 These methods allow a command to exclusively grab all events. More...
 
void InternalReleaseFocus ()
 
- Protected Member Functions inherited from vtkObjectBase
 vtkObjectBase ()
 
virtual ~vtkObjectBase ()
 
virtual void CollectRevisions (ostream &)
 
virtual void ReportReferences (vtkGarbageCollector *)
 
 vtkObjectBase (const vtkObjectBase &)
 
void operator= (const vtkObjectBase &)
 

Protected Attributes

int MaximumNumberOfColors
 User-changeable settings. More...
 
int NumberOfLabels
 
int NumberOfLabelsBuilt
 
int Orientation
 
vtkTypeBool DrawBackground
 
vtkTypeBool DrawFrame
 
vtkTypeBool DrawColorBar
 
vtkTypeBool DrawTickLabels
 
vtkTypeBool DrawAnnotations
 
vtkTypeBool DrawNanAnnotation
 
vtkTypeBool AnnotationTextScaling
 
vtkTypeBool FixedAnnotationLeaderLineColor
 
vtkProperty2DBackgroundProperty
 
vtkProperty2DFrameProperty
 
char * Title
 
char * ComponentTitle
 
char * LabelFormat
 
vtkTypeBool UseOpacity
 
double TextureGridWidth
 
int TextPosition
 
char * NanAnnotation
 
char * BelowRangeAnnotation
 
char * AboveRangeAnnotation
 
double AnnotationLeaderPadding
 
int MaximumWidthInPixels
 
int MaximumHeightInPixels
 
int TextPad
 
int VerticalTitleSeparation
 
double BarRatio
 
double TitleRatio
 
bool UnconstrainedFontSize
 
bool DrawBelowRangeSwatch
 
bool DrawAboveRangeSwatch
 
vtkTimeStamp BuildTime
 Internal state used for rendering. More...
 
int LastSize [2]
 Projected size in viewport coordinates of last build. More...
 
int LastOrigin [2]
 Projected origin (viewport coordinates) of last build. More...
 
vtkScalarBarActorInternalP
 Containers shared with subclasses. More...
 
vtkScalarsToColorsLookupTable
 The object this actor illustrates. More...
 
vtkTextPropertyTitleTextProperty
 Font for the legend title. More...
 
vtkTextPropertyLabelTextProperty
 Font for tick labels. More...
 
vtkTextPropertyAnnotationTextProperty
 Font for annotation labels. More...
 
vtkTextActorTitleActor
 The legend title text renderer. More...
 
vtkPolyDataScalarBar
 Polygon(s) colored by LookupTable. More...
 
vtkPolyDataMapper2DScalarBarMapper
 Mapper for ScalarBar. More...
 
vtkActor2DScalarBarActor
 Actor for ScalarBar. More...
 
vtkPolyDataTexturePolyData
 Polygon colored when UseOpacity is true. More...
 
vtkTextureTexture
 Color data for TexturePolyData. More...
 
vtkTexturedActor2DTextureActor
 Actor for TexturePolyData. More...
 
vtkPolyDataBackground
 Polygon used to fill the background. More...
 
vtkPolyDataMapper2DBackgroundMapper
 Mapper for Background. More...
 
vtkActor2DBackgroundActor
 Actor for Background. More...
 
vtkPolyDataFrame
 Polyline used to highlight frame. More...
 
vtkPolyDataMapper2DFrameMapper
 Mapper for Frame. More...
 
vtkActor2DFrameActor
 Actor for Frame. More...
 
- Protected Attributes inherited from vtkActor2D
vtkMapper2DMapper
 
int LayerNumber
 
vtkProperty2DProperty
 
vtkCoordinatePositionCoordinate
 
vtkCoordinatePosition2Coordinate
 
- Protected Attributes inherited from vtkProp
vtkTypeBool Visibility
 
vtkTypeBool Pickable
 
vtkTypeBool Dragable
 
bool UseBounds
 
double AllocatedRenderTime
 
double EstimatedRenderTime
 
double SavedEstimatedRenderTime
 
double RenderTimeMultiplier
 
int NumberOfConsumers
 
vtkObject ** Consumers
 
vtkAssemblyPathsPaths
 
vtkInformationPropertyKeys
 
vtkShaderPropertyShaderProperty
 
- Protected Attributes inherited from vtkObject
bool Debug
 
vtkTimeStamp MTime
 
vtkSubjectHelper * SubjectHelper
 
- Protected Attributes inherited from vtkObjectBase
std::atomic< int32_t > ReferenceCount
 
vtkWeakPointerBase ** WeakPointers
 

Detailed Description

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.

Warning
If a vtkLogLookupTable is specified as the lookup table to use, then the labels are created using a logarithmic scale.
See also
vtkActor2D vtkTextProperty vtkTextMapper vtkPolyDataMapper2D

Definition at line 77 of file vtkScalarBarActor.h.

Member Typedef Documentation

◆ Superclass

Definition at line 80 of file vtkScalarBarActor.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
PrecedeScalarBar 
SucceedScalarBar 

Definition at line 239 of file vtkScalarBarActor.h.

Constructor & Destructor Documentation

◆ vtkScalarBarActor()

vtkScalarBarActor::vtkScalarBarActor ( )
protected

◆ ~vtkScalarBarActor()

vtkScalarBarActor::~vtkScalarBarActor ( )
overrideprotected

Member Function Documentation

◆ IsTypeOf()

static vtkTypeBool vtkScalarBarActor::IsTypeOf ( const char *  type)
static

◆ IsA()

virtual vtkTypeBool 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.

◆ SafeDownCast()

static vtkScalarBarActor* vtkScalarBarActor::SafeDownCast ( vtkObjectBase o)
static

◆ NewInstanceInternal()

virtual vtkObjectBase* vtkScalarBarActor::NewInstanceInternal ( ) const
protectedvirtual

Reimplemented from vtkActor2D.

◆ NewInstance()

vtkScalarBarActor* vtkScalarBarActor::NewInstance ( ) const

◆ PrintSelf()

void vtkScalarBarActor::PrintSelf ( ostream &  os,
vtkIndent  indent 
)
overridevirtual

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 vtkObject.

◆ New()

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.

◆ RenderOpaqueGeometry()

int vtkScalarBarActor::RenderOpaqueGeometry ( vtkViewport viewport)
overridevirtual

Draw the scalar bar and annotation text to the screen.

Reimplemented from vtkProp.

◆ RenderTranslucentPolygonalGeometry()

int vtkScalarBarActor::RenderTranslucentPolygonalGeometry ( vtkViewport )
inlineoverridevirtual

Reimplemented from vtkProp.

Definition at line 95 of file vtkScalarBarActor.h.

◆ RenderOverlay()

int vtkScalarBarActor::RenderOverlay ( vtkViewport viewport)
overridevirtual

Reimplemented from vtkProp.

◆ HasTranslucentPolygonalGeometry()

vtkTypeBool vtkScalarBarActor::HasTranslucentPolygonalGeometry ( )
overridevirtual

Does this prop have some translucent polygonal geometry?

Reimplemented from vtkProp.

◆ ReleaseGraphicsResources()

void vtkScalarBarActor::ReleaseGraphicsResources ( vtkWindow )
overridevirtual

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 vtkProp.

◆ GetScalarBarRect()

virtual void vtkScalarBarActor::GetScalarBarRect ( int  rect[4],
vtkViewport viewport 
)
virtual

Fills rect with the dimensions of the scalar bar in viewport coordinates.

Only the color bar is considered – text labels are not considered. rect is {xmin, xmax, width, height}

◆ SetLookupTable()

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.

◆ GetLookupTable()

virtual vtkScalarsToColors* vtkScalarBarActor::GetLookupTable ( )
virtual

◆ SetUseOpacity()

virtual void vtkScalarBarActor::SetUseOpacity ( vtkTypeBool  )
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]

◆ GetUseOpacity()

virtual vtkTypeBool vtkScalarBarActor::GetUseOpacity ( )
virtual

◆ UseOpacityOn()

virtual void vtkScalarBarActor::UseOpacityOn ( )
virtual

◆ UseOpacityOff()

virtual void vtkScalarBarActor::UseOpacityOff ( )
virtual

◆ SetMaximumNumberOfColors()

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.

◆ GetMaximumNumberOfColors()

virtual int vtkScalarBarActor::GetMaximumNumberOfColors ( )
virtual

◆ SetNumberOfLabels()

virtual void vtkScalarBarActor::SetNumberOfLabels ( int  )
virtual

Set/Get the number of tick labels to show.

◆ GetNumberOfLabels()

virtual int vtkScalarBarActor::GetNumberOfLabels ( )
virtual

◆ SetOrientation()

virtual void vtkScalarBarActor::SetOrientation ( int  )
virtual

Control the orientation of the scalar bar.

◆ GetOrientation()

virtual int vtkScalarBarActor::GetOrientation ( )
virtual

◆ SetOrientationToHorizontal()

void vtkScalarBarActor::SetOrientationToHorizontal ( )
inline

Definition at line 166 of file vtkScalarBarActor.h.

◆ SetOrientationToVertical()

void vtkScalarBarActor::SetOrientationToVertical ( )
inline

Definition at line 167 of file vtkScalarBarActor.h.

◆ SetTitleTextProperty()

virtual void vtkScalarBarActor::SetTitleTextProperty ( vtkTextProperty p)
virtual

Set/Get the title text property.

◆ GetTitleTextProperty()

virtual vtkTextProperty* vtkScalarBarActor::GetTitleTextProperty ( )
virtual

◆ SetLabelTextProperty()

virtual void vtkScalarBarActor::SetLabelTextProperty ( vtkTextProperty p)
virtual

Set/Get the labels text property.

◆ GetLabelTextProperty()

virtual vtkTextProperty* vtkScalarBarActor::GetLabelTextProperty ( )
virtual

◆ SetAnnotationTextProperty()

virtual void vtkScalarBarActor::SetAnnotationTextProperty ( vtkTextProperty p)
virtual

Set/Get the annotation text property.

◆ GetAnnotationTextProperty()

virtual vtkTextProperty* vtkScalarBarActor::GetAnnotationTextProperty ( )
virtual

◆ SetLabelFormat()

virtual void vtkScalarBarActor::SetLabelFormat ( const char *  )
virtual

Set/Get the format with which to print the labels on the scalar bar.

◆ GetLabelFormat()

virtual char* vtkScalarBarActor::GetLabelFormat ( )
virtual

◆ SetTitle()

virtual void vtkScalarBarActor::SetTitle ( const char *  )
virtual

Set/Get the title of the scalar bar actor,.

◆ GetTitle()

virtual char* vtkScalarBarActor::GetTitle ( )
virtual

◆ SetComponentTitle()

virtual void vtkScalarBarActor::SetComponentTitle ( const char *  )
virtual

Set/Get the title for the component that is selected,.

◆ GetComponentTitle()

virtual char* vtkScalarBarActor::GetComponentTitle ( )
virtual

◆ ShallowCopy()

void vtkScalarBarActor::ShallowCopy ( vtkProp prop)
overridevirtual

Shallow copy of a scalar bar actor.

Overloads the virtual vtkProp method.

Reimplemented from vtkProp.

◆ SetTextureGridWidth()

virtual void vtkScalarBarActor::SetTextureGridWidth ( double  )
virtual

Set the width of the texture grid.

Used only if UseOpacity is ON.

◆ GetTextureGridWidth()

virtual double vtkScalarBarActor::GetTextureGridWidth ( )
virtual

◆ GetTextureActor()

virtual vtkTexturedActor2D* vtkScalarBarActor::GetTextureActor ( )
virtual

Get the texture actor.

. you may want to change some properties on it

◆ SetTextPosition()

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.

◆ GetTextPosition()

virtual int vtkScalarBarActor::GetTextPosition ( )
virtual

◆ SetTextPositionToPrecedeScalarBar()

virtual void vtkScalarBarActor::SetTextPositionToPrecedeScalarBar ( )
inlinevirtual

Definition at line 256 of file vtkScalarBarActor.h.

◆ SetTextPositionToSucceedScalarBar()

virtual void vtkScalarBarActor::SetTextPositionToSucceedScalarBar ( )
inlinevirtual

Definition at line 260 of file vtkScalarBarActor.h.

◆ SetMaximumWidthInPixels()

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 undesirably stretch 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.

◆ GetMaximumWidthInPixels()

virtual int vtkScalarBarActor::GetMaximumWidthInPixels ( )
virtual

◆ SetMaximumHeightInPixels()

virtual void vtkScalarBarActor::SetMaximumHeightInPixels ( int  )
virtual

◆ GetMaximumHeightInPixels()

virtual int vtkScalarBarActor::GetMaximumHeightInPixels ( )
virtual

◆ SetAnnotationLeaderPadding()

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.

◆ GetAnnotationLeaderPadding()

virtual double vtkScalarBarActor::GetAnnotationLeaderPadding ( )
virtual

◆ SetDrawAnnotations()

virtual void vtkScalarBarActor::SetDrawAnnotations ( vtkTypeBool  )
virtual

Set/get whether text annotations should be rendered or not.

Currently, this only affects rendering when IndexedLookup is true. The default is true.

◆ GetDrawAnnotations()

virtual vtkTypeBool vtkScalarBarActor::GetDrawAnnotations ( )
virtual

◆ DrawAnnotationsOn()

virtual void vtkScalarBarActor::DrawAnnotationsOn ( )
virtual

◆ DrawAnnotationsOff()

virtual void vtkScalarBarActor::DrawAnnotationsOff ( )
virtual

◆ SetDrawNanAnnotation()

virtual void vtkScalarBarActor::SetDrawNanAnnotation ( vtkTypeBool  )
virtual

Set/get whether the NaN annotation should be rendered or not.

This only affects rendering when DrawAnnotations is true. The default is false.

◆ GetDrawNanAnnotation()

virtual vtkTypeBool vtkScalarBarActor::GetDrawNanAnnotation ( )
virtual

◆ DrawNanAnnotationOn()

virtual void vtkScalarBarActor::DrawNanAnnotationOn ( )
virtual

◆ DrawNanAnnotationOff()

virtual void vtkScalarBarActor::DrawNanAnnotationOff ( )
virtual

◆ SetDrawBelowRangeSwatch()

virtual void vtkScalarBarActor::SetDrawBelowRangeSwatch ( bool  )
virtual

Set/get whether the Below range swatch should be rendered or not.

This only affects rendering when DrawAnnotations is true. The default is false.

◆ GetDrawBelowRangeSwatch()

virtual bool vtkScalarBarActor::GetDrawBelowRangeSwatch ( )
virtual

◆ DrawBelowRangeSwatchOn()

virtual void vtkScalarBarActor::DrawBelowRangeSwatchOn ( )
virtual

◆ DrawBelowRangeSwatchOff()

virtual void vtkScalarBarActor::DrawBelowRangeSwatchOff ( )
virtual

◆ SetBelowRangeAnnotation()

virtual void vtkScalarBarActor::SetBelowRangeAnnotation ( const char *  )
virtual

Set/get the annotation text for "Below Range" values.

◆ GetBelowRangeAnnotation()

virtual char* vtkScalarBarActor::GetBelowRangeAnnotation ( )
virtual

◆ SetDrawAboveRangeSwatch()

virtual void vtkScalarBarActor::SetDrawAboveRangeSwatch ( bool  )
virtual

Set/get whether the Above range swatch should be rendered or not.

This only affects rendering when DrawAnnotations is true. The default is false.

◆ GetDrawAboveRangeSwatch()

virtual bool vtkScalarBarActor::GetDrawAboveRangeSwatch ( )
virtual

◆ DrawAboveRangeSwatchOn()

virtual void vtkScalarBarActor::DrawAboveRangeSwatchOn ( )
virtual

◆ DrawAboveRangeSwatchOff()

virtual void vtkScalarBarActor::DrawAboveRangeSwatchOff ( )
virtual

◆ SetAboveRangeAnnotation()

virtual void vtkScalarBarActor::SetAboveRangeAnnotation ( const char *  )
virtual

Set/get the annotation text for "Above Range Swatch" values.

◆ GetAboveRangeAnnotation()

virtual char* vtkScalarBarActor::GetAboveRangeAnnotation ( )
virtual

◆ SetFixedAnnotationLeaderLineColor()

virtual void vtkScalarBarActor::SetFixedAnnotationLeaderLineColor ( vtkTypeBool  )
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.

◆ GetFixedAnnotationLeaderLineColor()

virtual vtkTypeBool vtkScalarBarActor::GetFixedAnnotationLeaderLineColor ( )
virtual

◆ FixedAnnotationLeaderLineColorOn()

virtual void vtkScalarBarActor::FixedAnnotationLeaderLineColorOn ( )
virtual

◆ FixedAnnotationLeaderLineColorOff()

virtual void vtkScalarBarActor::FixedAnnotationLeaderLineColorOff ( )
virtual

◆ SetNanAnnotation()

virtual void vtkScalarBarActor::SetNanAnnotation ( const char *  )
virtual

Set/get the annotation text for "NaN" values.

◆ GetNanAnnotation()

virtual char* vtkScalarBarActor::GetNanAnnotation ( )
virtual

◆ SetAnnotationTextScaling()

virtual void vtkScalarBarActor::SetAnnotationTextScaling ( vtkTypeBool  )
virtual

Set/get whether annotation labels should be scaled with the viewport.

The default value is 0 (no scaling). If non-zero, the vtkTextActor instances used to render annotation labels will have their TextScaleMode set to viewport-based scaling, which nonlinearly scales font size with the viewport size.

◆ GetAnnotationTextScaling()

virtual vtkTypeBool vtkScalarBarActor::GetAnnotationTextScaling ( )
virtual

◆ AnnotationTextScalingOn()

virtual void vtkScalarBarActor::AnnotationTextScalingOn ( )
virtual

◆ AnnotationTextScalingOff()

virtual void vtkScalarBarActor::AnnotationTextScalingOff ( )
virtual

◆ SetDrawBackground()

virtual void vtkScalarBarActor::SetDrawBackground ( vtkTypeBool  )
virtual

Set/Get whether a background should be drawn around the scalar bar.

Default is off.

◆ GetDrawBackground()

virtual vtkTypeBool vtkScalarBarActor::GetDrawBackground ( )
virtual

◆ DrawBackgroundOn()

virtual void vtkScalarBarActor::DrawBackgroundOn ( )
virtual

◆ DrawBackgroundOff()

virtual void vtkScalarBarActor::DrawBackgroundOff ( )
virtual

◆ SetDrawFrame()

virtual void vtkScalarBarActor::SetDrawFrame ( vtkTypeBool  )
virtual

Set/Get whether a frame should be drawn around the scalar bar.

Default is off.

◆ GetDrawFrame()

virtual vtkTypeBool vtkScalarBarActor::GetDrawFrame ( )
virtual

◆ DrawFrameOn()

virtual void vtkScalarBarActor::DrawFrameOn ( )
virtual

◆ DrawFrameOff()

virtual void vtkScalarBarActor::DrawFrameOff ( )
virtual

◆ SetDrawColorBar()

virtual void vtkScalarBarActor::SetDrawColorBar ( vtkTypeBool  )
virtual

Set/Get whether the color bar should be drawn.

If off, only the tickmarks and text will be drawn. Default is on.

◆ GetDrawColorBar()

virtual vtkTypeBool vtkScalarBarActor::GetDrawColorBar ( )
virtual

◆ DrawColorBarOn()

virtual void vtkScalarBarActor::DrawColorBarOn ( )
virtual

◆ DrawColorBarOff()

virtual void vtkScalarBarActor::DrawColorBarOff ( )
virtual

◆ SetDrawTickLabels()

virtual void vtkScalarBarActor::SetDrawTickLabels ( vtkTypeBool  )
virtual

Set/Get whether the tick labels should be drawn.

Default is on.

◆ GetDrawTickLabels()

virtual vtkTypeBool vtkScalarBarActor::GetDrawTickLabels ( )
virtual

◆ DrawTickLabelsOn()

virtual void vtkScalarBarActor::DrawTickLabelsOn ( )
virtual

◆ DrawTickLabelsOff()

virtual void vtkScalarBarActor::DrawTickLabelsOff ( )
virtual

◆ SetBackgroundProperty()

virtual void vtkScalarBarActor::SetBackgroundProperty ( vtkProperty2D p)
virtual

Set/Get the background property.

◆ GetBackgroundProperty()

virtual vtkProperty2D* vtkScalarBarActor::GetBackgroundProperty ( )
virtual

◆ SetFrameProperty()

virtual void vtkScalarBarActor::SetFrameProperty ( vtkProperty2D p)
virtual

Set/Get the frame property.

◆ GetFrameProperty()

virtual vtkProperty2D* vtkScalarBarActor::GetFrameProperty ( )
virtual

◆ GetTextPad()

virtual int vtkScalarBarActor::GetTextPad ( )
virtual

Set/get the amount of padding around text boxes.

The default is 1 pixel.

◆ SetTextPad()

virtual void vtkScalarBarActor::SetTextPad ( int  )
virtual

◆ GetVerticalTitleSeparation()

virtual int vtkScalarBarActor::GetVerticalTitleSeparation ( )
virtual

Set/get the margin in pixels, between the title and the bar, when the Orientation is vertical.

The default is 0 pixels.

◆ SetVerticalTitleSeparation()

virtual void vtkScalarBarActor::SetVerticalTitleSeparation ( int  )
virtual

◆ GetBarRatio()

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[.

◆ SetBarRatio()

virtual void vtkScalarBarActor::SetBarRatio ( double  )
virtual

◆ GetTitleRatio()

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[.

◆ SetTitleRatio()

virtual void vtkScalarBarActor::SetTitleRatio ( double  )
virtual

◆ SetUnconstrainedFontSize()

virtual void vtkScalarBarActor::SetUnconstrainedFontSize ( bool  )
virtual

Set/Get whether the font size of title and labels is unconstrained.

Default is off. When it is constrained, the size of the scalar bar will constrained the font size When it is not, the size of the font will always be respected

◆ GetUnconstrainedFontSize()

virtual bool vtkScalarBarActor::GetUnconstrainedFontSize ( )
virtual

◆ UnconstrainedFontSizeOn()

virtual void vtkScalarBarActor::UnconstrainedFontSizeOn ( )
virtual

◆ UnconstrainedFontSizeOff()

virtual void vtkScalarBarActor::UnconstrainedFontSizeOff ( )
virtual

◆ RebuildLayout()

virtual void vtkScalarBarActor::RebuildLayout ( vtkViewport viewport)
protectedvirtual

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.

◆ RebuildLayoutIfNeeded()

virtual int vtkScalarBarActor::RebuildLayoutIfNeeded ( vtkViewport viewport)
protectedvirtual

Calls RebuildLayout if it is needed such as when positions etc have changed.

Return 1 on success zero on error

◆ FreeLayoutStorage()

virtual void vtkScalarBarActor::FreeLayoutStorage ( )
protectedvirtual

Free internal storage used by the previous layout.

◆ ComputeFrame()

virtual void vtkScalarBarActor::ComputeFrame ( )
protectedvirtual

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).

◆ ComputeScalarBarThickness()

virtual void vtkScalarBarActor::ComputeScalarBarThickness ( )
protectedvirtual

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).

◆ ComputeSwatchPad()

virtual void vtkScalarBarActor::ComputeSwatchPad ( )
protectedvirtual

Compute a correct SwatchPad.

◆ LayoutNanSwatch()

virtual void vtkScalarBarActor::LayoutNanSwatch ( )
protectedvirtual

◆ LayoutBelowRangeSwatch()

virtual void vtkScalarBarActor::LayoutBelowRangeSwatch ( )
protectedvirtual

Determine the size of the Below Range if it is to be rendered.

This method must set this->P->BelowSwatchSize and this->P->BelowBox. It may depend on layout performed by ComputeScalarBarThickness.

◆ LayoutAboveRangeSwatch()

virtual void vtkScalarBarActor::LayoutAboveRangeSwatch ( )
protectedvirtual

Determine the size of the Above Range if it is to be rendered.

This method must set this->P->AboveBox. It may depend on layout performed by ComputeScalarBarThickness.

◆ LayoutAboveRangeSwatchPosn()

virtual void vtkScalarBarActor::LayoutAboveRangeSwatchPosn ( )
protectedvirtual

Determine the position of the Above Range if it is to be rendered.

This method must set this->P->AboveRangeSize. It may depend on layout performed by ComputeScalarBarLength.

◆ PrepareTitleText()

virtual void vtkScalarBarActor::PrepareTitleText ( )
protectedvirtual

Set the title actor's input to the latest title (and subtitle) text.

◆ LayoutTitle()

virtual void vtkScalarBarActor::LayoutTitle ( )
protectedvirtual

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.

◆ LayoutForUnconstrainedFont()

virtual void vtkScalarBarActor::LayoutForUnconstrainedFont ( )
protectedvirtual

This method sets the title and tick-box size and position for the UnconstrainedFontSize mode.

◆ ComputeScalarBarLength()

virtual void vtkScalarBarActor::ComputeScalarBarLength ( )
protectedvirtual

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.

◆ LayoutTicks()

virtual void vtkScalarBarActor::LayoutTicks ( )
protectedvirtual

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.

◆ LayoutAnnotations()

virtual void vtkScalarBarActor::LayoutAnnotations ( )
protectedvirtual

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.

◆ ConfigureAnnotations()

virtual void vtkScalarBarActor::ConfigureAnnotations ( )
protectedvirtual

Generate/configure the annotation labels using the laid-out geometry.

◆ ConfigureFrame()

virtual void vtkScalarBarActor::ConfigureFrame ( )
protectedvirtual

Generate/configure the representation of the frame from laid-out geometry.

◆ DrawBoxes()

virtual void vtkScalarBarActor::DrawBoxes ( )
protectedvirtual

For debugging, add placement boxes to the frame polydata.

◆ ConfigureScalarBar()

virtual void vtkScalarBarActor::ConfigureScalarBar ( )
protectedvirtual

Generate/configure the scalar bar representation from laid-out geometry.

◆ ConfigureTitle()

virtual void vtkScalarBarActor::ConfigureTitle ( )
protectedvirtual

Generate/configure the title actor using the laid-out geometry.

◆ ConfigureTicks()

virtual void vtkScalarBarActor::ConfigureTicks ( )
protectedvirtual

Generate/configure the tick-mark actors using the laid-out geometry.

◆ ConfigureNanSwatch()

virtual void vtkScalarBarActor::ConfigureNanSwatch ( )
protectedvirtual

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.

◆ ConfigureAboveBelowRangeSwatch()

virtual void vtkScalarBarActor::ConfigureAboveBelowRangeSwatch ( bool  above)
protectedvirtual

Generate/configure the above/below range swatch using the laid-out geometry.

◆ EditAnnotations()

virtual void vtkScalarBarActor::EditAnnotations ( )
inlineprotectedvirtual

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 691 of file vtkScalarBarActor.h.

◆ SizeTitle()

virtual void vtkScalarBarActor::SizeTitle ( double *  titleSize,
int *  size,
vtkViewport viewport 
)
protectedvirtual

Compute the best size for the legend title.

This guarantees that the title will fit within the frame defined by Position and Position2.

◆ MapAnnotationLabels()

int vtkScalarBarActor::MapAnnotationLabels ( vtkScalarsToColors lkup,
double  start,
double  delta,
const double *  range 
)
protected

Allocate actors for lookup table annotations and position them properly.

◆ PlaceAnnotationsVertically()

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.

◆ PlaceAnnotationsHorizontally()

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.

Member Data Documentation

◆ MaximumNumberOfColors

int vtkScalarBarActor::MaximumNumberOfColors
protected

User-changeable settings.

Definition at line 720 of file vtkScalarBarActor.h.

◆ NumberOfLabels

int vtkScalarBarActor::NumberOfLabels
protected

Definition at line 721 of file vtkScalarBarActor.h.

◆ NumberOfLabelsBuilt

int vtkScalarBarActor::NumberOfLabelsBuilt
protected

Definition at line 722 of file vtkScalarBarActor.h.

◆ Orientation

int vtkScalarBarActor::Orientation
protected

Definition at line 723 of file vtkScalarBarActor.h.

◆ DrawBackground

vtkTypeBool vtkScalarBarActor::DrawBackground
protected

Definition at line 724 of file vtkScalarBarActor.h.

◆ DrawFrame

vtkTypeBool vtkScalarBarActor::DrawFrame
protected

Definition at line 725 of file vtkScalarBarActor.h.

◆ DrawColorBar

vtkTypeBool vtkScalarBarActor::DrawColorBar
protected

Definition at line 726 of file vtkScalarBarActor.h.

◆ DrawTickLabels

vtkTypeBool vtkScalarBarActor::DrawTickLabels
protected

Definition at line 727 of file vtkScalarBarActor.h.

◆ DrawAnnotations

vtkTypeBool vtkScalarBarActor::DrawAnnotations
protected

Definition at line 728 of file vtkScalarBarActor.h.

◆ DrawNanAnnotation

vtkTypeBool vtkScalarBarActor::DrawNanAnnotation
protected

Definition at line 729 of file vtkScalarBarActor.h.

◆ AnnotationTextScaling

vtkTypeBool vtkScalarBarActor::AnnotationTextScaling
protected

Definition at line 730 of file vtkScalarBarActor.h.

◆ FixedAnnotationLeaderLineColor

vtkTypeBool vtkScalarBarActor::FixedAnnotationLeaderLineColor
protected

Definition at line 731 of file vtkScalarBarActor.h.

◆ BackgroundProperty

vtkProperty2D* vtkScalarBarActor::BackgroundProperty
protected

Definition at line 732 of file vtkScalarBarActor.h.

◆ FrameProperty

vtkProperty2D* vtkScalarBarActor::FrameProperty
protected

Definition at line 733 of file vtkScalarBarActor.h.

◆ Title

char* vtkScalarBarActor::Title
protected

Definition at line 734 of file vtkScalarBarActor.h.

◆ ComponentTitle

char* vtkScalarBarActor::ComponentTitle
protected

Definition at line 735 of file vtkScalarBarActor.h.

◆ LabelFormat

char* vtkScalarBarActor::LabelFormat
protected

Definition at line 736 of file vtkScalarBarActor.h.

◆ UseOpacity

vtkTypeBool vtkScalarBarActor::UseOpacity
protected

Definition at line 737 of file vtkScalarBarActor.h.

◆ TextureGridWidth

double vtkScalarBarActor::TextureGridWidth
protected

Definition at line 738 of file vtkScalarBarActor.h.

◆ TextPosition

int vtkScalarBarActor::TextPosition
protected

Definition at line 739 of file vtkScalarBarActor.h.

◆ NanAnnotation

char* vtkScalarBarActor::NanAnnotation
protected

Definition at line 740 of file vtkScalarBarActor.h.

◆ BelowRangeAnnotation

char* vtkScalarBarActor::BelowRangeAnnotation
protected

Definition at line 741 of file vtkScalarBarActor.h.

◆ AboveRangeAnnotation

char* vtkScalarBarActor::AboveRangeAnnotation
protected

Definition at line 742 of file vtkScalarBarActor.h.

◆ AnnotationLeaderPadding

double vtkScalarBarActor::AnnotationLeaderPadding
protected

Definition at line 743 of file vtkScalarBarActor.h.

◆ MaximumWidthInPixels

int vtkScalarBarActor::MaximumWidthInPixels
protected

Definition at line 744 of file vtkScalarBarActor.h.

◆ MaximumHeightInPixels

int vtkScalarBarActor::MaximumHeightInPixels
protected

Definition at line 745 of file vtkScalarBarActor.h.

◆ TextPad

int vtkScalarBarActor::TextPad
protected

Definition at line 746 of file vtkScalarBarActor.h.

◆ VerticalTitleSeparation

int vtkScalarBarActor::VerticalTitleSeparation
protected

Definition at line 747 of file vtkScalarBarActor.h.

◆ BarRatio

double vtkScalarBarActor::BarRatio
protected

Definition at line 748 of file vtkScalarBarActor.h.

◆ TitleRatio

double vtkScalarBarActor::TitleRatio
protected

Definition at line 749 of file vtkScalarBarActor.h.

◆ UnconstrainedFontSize

bool vtkScalarBarActor::UnconstrainedFontSize
protected

Definition at line 750 of file vtkScalarBarActor.h.

◆ DrawBelowRangeSwatch

bool vtkScalarBarActor::DrawBelowRangeSwatch
protected

Definition at line 752 of file vtkScalarBarActor.h.

◆ DrawAboveRangeSwatch

bool vtkScalarBarActor::DrawAboveRangeSwatch
protected

Definition at line 753 of file vtkScalarBarActor.h.

◆ BuildTime

vtkTimeStamp vtkScalarBarActor::BuildTime
protected

Internal state used for rendering.

Last time internal state changed.

Definition at line 758 of file vtkScalarBarActor.h.

◆ LastSize

int vtkScalarBarActor::LastSize[2]
protected

Projected size in viewport coordinates of last build.

Definition at line 759 of file vtkScalarBarActor.h.

◆ LastOrigin

int vtkScalarBarActor::LastOrigin[2]
protected

Projected origin (viewport coordinates) of last build.

Definition at line 760 of file vtkScalarBarActor.h.

◆ P

vtkScalarBarActorInternal* vtkScalarBarActor::P
protected

Containers shared with subclasses.

Definition at line 762 of file vtkScalarBarActor.h.

◆ LookupTable

vtkScalarsToColors* vtkScalarBarActor::LookupTable
protected

The object this actor illustrates.

Definition at line 764 of file vtkScalarBarActor.h.

◆ TitleTextProperty

vtkTextProperty* vtkScalarBarActor::TitleTextProperty
protected

Font for the legend title.

Definition at line 766 of file vtkScalarBarActor.h.

◆ LabelTextProperty

vtkTextProperty* vtkScalarBarActor::LabelTextProperty
protected

Font for tick labels.

Definition at line 767 of file vtkScalarBarActor.h.

◆ AnnotationTextProperty

vtkTextProperty* vtkScalarBarActor::AnnotationTextProperty
protected

Font for annotation labels.

Definition at line 768 of file vtkScalarBarActor.h.

◆ TitleActor

vtkTextActor* vtkScalarBarActor::TitleActor
protected

The legend title text renderer.

Definition at line 769 of file vtkScalarBarActor.h.

◆ ScalarBar

vtkPolyData* vtkScalarBarActor::ScalarBar
protected

Polygon(s) colored by LookupTable.

Definition at line 771 of file vtkScalarBarActor.h.

◆ ScalarBarMapper

vtkPolyDataMapper2D* vtkScalarBarActor::ScalarBarMapper
protected

Mapper for ScalarBar.

Definition at line 772 of file vtkScalarBarActor.h.

◆ ScalarBarActor

vtkActor2D* vtkScalarBarActor::ScalarBarActor
protected

Actor for ScalarBar.

Definition at line 773 of file vtkScalarBarActor.h.

◆ TexturePolyData

vtkPolyData* vtkScalarBarActor::TexturePolyData
protected

Polygon colored when UseOpacity is true.

Definition at line 774 of file vtkScalarBarActor.h.

◆ Texture

vtkTexture* vtkScalarBarActor::Texture
protected

Color data for TexturePolyData.

Definition at line 775 of file vtkScalarBarActor.h.

◆ TextureActor

vtkTexturedActor2D* vtkScalarBarActor::TextureActor
protected

Actor for TexturePolyData.

Definition at line 776 of file vtkScalarBarActor.h.

◆ Background

vtkPolyData* vtkScalarBarActor::Background
protected

Polygon used to fill the background.

Definition at line 778 of file vtkScalarBarActor.h.

◆ BackgroundMapper

vtkPolyDataMapper2D* vtkScalarBarActor::BackgroundMapper
protected

Mapper for Background.

Definition at line 779 of file vtkScalarBarActor.h.

◆ BackgroundActor

vtkActor2D* vtkScalarBarActor::BackgroundActor
protected

Actor for Background.

Definition at line 780 of file vtkScalarBarActor.h.

◆ Frame

vtkPolyData* vtkScalarBarActor::Frame
protected

Polyline used to highlight frame.

Definition at line 782 of file vtkScalarBarActor.h.

◆ FrameMapper

vtkPolyDataMapper2D* vtkScalarBarActor::FrameMapper
protected

Mapper for Frame.

Definition at line 783 of file vtkScalarBarActor.h.

◆ FrameActor

vtkActor2D* vtkScalarBarActor::FrameActor
protected

Actor for Frame.

Definition at line 784 of file vtkScalarBarActor.h.


The documentation for this class was generated from the following file: