|
| virtual int | IsA (const char *type) |
| |
| vtkScalarBarActor * | NewInstance () const |
| |
| void | PrintSelf (ostream &os, vtkIndent indent) |
| |
| int | RenderOpaqueGeometry (vtkViewport *viewport) |
| |
| virtual int | RenderTranslucentPolygonalGeometry (vtkViewport *) |
| |
| int | RenderOverlay (vtkViewport *viewport) |
| |
| virtual int | HasTranslucentPolygonalGeometry () |
| |
| virtual void | ReleaseGraphicsResources (vtkWindow *) |
| |
| virtual void | GetScalarBarRect (int rect[4], vtkViewport *viewport) |
| |
| virtual void | SetLookupTable (vtkScalarsToColors *) |
| |
| virtual vtkScalarsToColors * | GetLookupTable () |
| |
| virtual void | SetUseOpacity (int) |
| |
| virtual int | GetUseOpacity () |
| |
| virtual void | UseOpacityOn () |
| |
| virtual void | UseOpacityOff () |
| |
| virtual void | SetMaximumNumberOfColors (int) |
| |
| virtual int | GetMaximumNumberOfColors () |
| |
| virtual void | SetNumberOfLabels (int) |
| |
| virtual int | GetNumberOfLabels () |
| |
| virtual void | SetOrientation (int) |
| |
| virtual int | GetOrientation () |
| |
| void | SetOrientationToHorizontal () |
| |
| void | SetOrientationToVertical () |
| |
| virtual void | SetTitleTextProperty (vtkTextProperty *p) |
| |
| virtual vtkTextProperty * | GetTitleTextProperty () |
| |
| virtual void | SetLabelTextProperty (vtkTextProperty *p) |
| |
| virtual vtkTextProperty * | GetLabelTextProperty () |
| |
| virtual void | SetLabelFormat (const char *) |
| |
| virtual char * | GetLabelFormat () |
| |
| virtual void | SetTitle (const char *) |
| |
| virtual char * | GetTitle () |
| |
| virtual void | SetComponentTitle (const char *) |
| |
| virtual char * | GetComponentTitle () |
| |
| void | ShallowCopy (vtkProp *prop) |
| |
| virtual void | SetTextureGridWidth (double) |
| |
| virtual double | GetTextureGridWidth () |
| |
| virtual vtkTexturedActor2D * | GetTextureActor () |
| |
| virtual void | SetTextPosition (int) |
| |
| virtual int | GetTextPosition () |
| |
| virtual void | SetTextPositionToPrecedeScalarBar () |
| |
| virtual void | SetTextPositionToSucceedScalarBar () |
| |
| virtual void | SetMaximumWidthInPixels (int) |
| |
| virtual int | GetMaximumWidthInPixels () |
| |
| virtual void | SetMaximumHeightInPixels (int) |
| |
| virtual int | GetMaximumHeightInPixels () |
| |
| virtual void | SetAnnotationLeaderPadding (double) |
| |
| virtual double | GetAnnotationLeaderPadding () |
| |
| virtual void | SetDrawAnnotations (int) |
| |
| virtual int | GetDrawAnnotations () |
| |
| virtual void | DrawAnnotationsOn () |
| |
| virtual void | DrawAnnotationsOff () |
| |
| virtual void | SetDrawNanAnnotation (int) |
| |
| virtual int | GetDrawNanAnnotation () |
| |
| virtual void | DrawNanAnnotationOn () |
| |
| virtual void | DrawNanAnnotationOff () |
| |
| virtual void | SetFixedAnnotationLeaderLineColor (int) |
| |
| virtual int | GetFixedAnnotationLeaderLineColor () |
| |
| virtual void | FixedAnnotationLeaderLineColorOn () |
| |
| virtual void | FixedAnnotationLeaderLineColorOff () |
| |
| virtual void | SetNanAnnotation (const char *) |
| |
| virtual char * | GetNanAnnotation () |
| |
| virtual void | SetAnnotationTextScaling (int) |
| |
| virtual int | GetAnnotationTextScaling () |
| |
| virtual void | SetDrawBackground (int) |
| |
| virtual int | GetDrawBackground () |
| |
| virtual void | DrawBackgroundOn () |
| |
| virtual void | DrawBackgroundOff () |
| |
| virtual void | SetDrawFrame (int) |
| |
| virtual int | GetDrawFrame () |
| |
| virtual void | DrawFrameOn () |
| |
| virtual void | DrawFrameOff () |
| |
| virtual void | SetDrawColorBar (int) |
| |
| virtual int | GetDrawColorBar () |
| |
| virtual void | DrawColorBarOn () |
| |
| virtual void | DrawColorBarOff () |
| |
| virtual void | SetDrawTickLabels (int) |
| |
| virtual int | GetDrawTickLabels () |
| |
| virtual void | DrawTickLabelsOn () |
| |
| virtual void | DrawTickLabelsOff () |
| |
| virtual void | SetBackgroundProperty (vtkProperty2D *p) |
| |
| virtual vtkProperty2D * | GetBackgroundProperty () |
| |
| virtual void | SetFrameProperty (vtkProperty2D *p) |
| |
| virtual vtkProperty2D * | GetFrameProperty () |
| |
| virtual int | GetTextPad () |
| |
| virtual void | SetTextPad (int) |
| |
| virtual int | GetVerticalTitleSeparation () |
| |
| virtual void | SetVerticalTitleSeparation (int) |
| |
| virtual double | GetBarRatio () |
| |
| virtual void | SetBarRatio (double) |
| |
| virtual double | GetTitleRatio () |
| |
| virtual void | SetTitleRatio (double) |
| |
| void | PrintSelf (ostream &os, vtkIndent indent) |
| |
| vtkActor2D * | NewInstance () const |
| |
| virtual void | SetMapper (vtkMapper2D *mapper) |
| |
| virtual vtkMapper2D * | GetMapper () |
| |
| virtual void | SetLayerNumber (int) |
| |
| virtual int | GetLayerNumber () |
| |
| vtkProperty2D * | GetProperty () |
| |
| virtual void | SetProperty (vtkProperty2D *) |
| |
| virtual vtkCoordinate * | GetPositionCoordinate () |
| |
| virtual void | SetPosition (float x[2]) |
| |
| virtual void | SetPosition (float x, float y) |
| |
| virtual float * | GetPosition () |
| |
| void | SetDisplayPosition (int, int) |
| |
| virtual vtkCoordinate * | GetPosition2Coordinate () |
| |
| virtual void | SetPosition2 (float x[2]) |
| |
| virtual void | SetPosition2 (float x, float y) |
| |
| virtual float * | GetPosition2 () |
| |
| void | SetWidth (double w) |
| |
| double | GetWidth () |
| |
| void | SetHeight (double h) |
| |
| double | GetHeight () |
| |
| virtual unsigned long | GetMTime () |
| |
| virtual void | GetActors2D (vtkPropCollection *pc) |
| |
| virtual vtkCoordinate * | GetActualPositionCoordinate (void) |
| |
| virtual vtkCoordinate * | GetActualPosition2Coordinate (void) |
| |
| vtkProp * | NewInstance () const |
| |
| void | PrintSelf (ostream &os, vtkIndent indent) |
| |
| virtual void | GetActors (vtkPropCollection *) |
| |
| virtual void | GetVolumes (vtkPropCollection *) |
| |
| virtual void | SetVisibility (int) |
| |
| virtual int | GetVisibility () |
| |
| virtual void | VisibilityOn () |
| |
| virtual void | VisibilityOff () |
| |
| virtual void | SetPickable (int) |
| |
| virtual int | GetPickable () |
| |
| virtual void | PickableOn () |
| |
| virtual void | PickableOff () |
| |
| virtual void | Pick () |
| |
| virtual void | SetDragable (int) |
| |
| virtual int | GetDragable () |
| |
| virtual void | DragableOn () |
| |
| virtual void | DragableOff () |
| |
| virtual unsigned long | GetRedrawMTime () |
| |
| virtual void | SetUseBounds (bool) |
| |
| virtual bool | GetUseBounds () |
| |
| virtual void | UseBoundsOn () |
| |
| virtual void | UseBoundsOff () |
| |
| virtual double * | GetBounds () |
| |
| virtual void | InitPathTraversal () |
| |
| virtual vtkAssemblyPath * | GetNextPath () |
| |
| virtual int | GetNumberOfPaths () |
| |
| virtual void | PokeMatrix (vtkMatrix4x4 *vtkNotUsed(matrix)) |
| |
| virtual vtkMatrix4x4 * | GetMatrix () |
| |
| virtual vtkInformation * | GetPropertyKeys () |
| |
| virtual void | SetPropertyKeys (vtkInformation *keys) |
| |
| virtual bool | HasKeys (vtkInformation *requiredKeys) |
| |
| virtual int | RenderVolumetricGeometry (vtkViewport *) |
| |
| virtual bool | RenderFilteredOpaqueGeometry (vtkViewport *v, vtkInformation *requiredKeys) |
| |
| virtual bool | RenderFilteredTranslucentPolygonalGeometry (vtkViewport *v, vtkInformation *requiredKeys) |
| |
| virtual bool | RenderFilteredVolumetricGeometry (vtkViewport *v, vtkInformation *requiredKeys) |
| |
| virtual bool | RenderFilteredOverlay (vtkViewport *v, vtkInformation *requiredKeys) |
| |
| virtual double | GetEstimatedRenderTime (vtkViewport *) |
| |
| virtual double | GetEstimatedRenderTime () |
| |
| virtual void | SetEstimatedRenderTime (double t) |
| |
| virtual void | RestoreEstimatedRenderTime () |
| |
| virtual void | AddEstimatedRenderTime (double t, vtkViewport *vtkNotUsed(vp)) |
| |
| virtual void | SetAllocatedRenderTime (double t, vtkViewport *vtkNotUsed(v)) |
| |
| virtual double | GetAllocatedRenderTime () |
| |
| void | SetRenderTimeMultiplier (double t) |
| |
| virtual double | GetRenderTimeMultiplier () |
| |
| virtual void | BuildPaths (vtkAssemblyPaths *paths, vtkAssemblyPath *path) |
| |
| virtual bool | GetSupportsSelection () |
| |
| virtual int | GetNumberOfConsumers () |
| |
| void | AddConsumer (vtkObject *c) |
| |
| void | RemoveConsumer (vtkObject *c) |
| |
| vtkObject * | GetConsumer (int i) |
| |
| int | IsConsumer (vtkObject *c) |
| |
| vtkObject * | NewInstance () const |
| |
| virtual void | DebugOn () |
| |
| virtual void | DebugOff () |
| |
| bool | GetDebug () |
| |
| void | SetDebug (bool debugFlag) |
| |
| virtual void | Modified () |
| |
| unsigned long | AddObserver (unsigned long event, vtkCommand *, float priority=0.0f) |
| |
| unsigned long | AddObserver (const char *event, vtkCommand *, float priority=0.0f) |
| |
| vtkCommand * | GetCommand (unsigned long tag) |
| |
| void | RemoveObserver (vtkCommand *) |
| |
| void | RemoveObservers (unsigned long event, vtkCommand *) |
| |
| void | RemoveObservers (const char *event, vtkCommand *) |
| |
| int | HasObserver (unsigned long event, vtkCommand *) |
| |
| int | HasObserver (const char *event, vtkCommand *) |
| |
| void | RemoveObserver (unsigned long tag) |
| |
| void | RemoveObservers (unsigned long event) |
| |
| void | RemoveObservers (const char *event) |
| |
| void | RemoveAllObservers () |
| |
| int | HasObserver (unsigned long event) |
| |
| int | HasObserver (const char *event) |
| |
| template<class U , class T > |
| unsigned long | AddObserver (unsigned long event, U observer, void(T::*callback)(), float priority=0.0f) |
| |
| 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) |
| |
| int | InvokeEvent (unsigned long event, void *callData) |
| |
| int | InvokeEvent (const char *event, void *callData) |
| |
| int | InvokeEvent (unsigned long event) |
| |
| int | InvokeEvent (const char *event) |
| |
| const char * | GetClassName () const |
| |
| virtual void | Delete () |
| |
| virtual void | FastDelete () |
| |
| void | Print (ostream &os) |
| |
| virtual void | PrintHeader (ostream &os, vtkIndent indent) |
| |
| virtual void | PrintTrailer (ostream &os, vtkIndent indent) |
| |
| virtual void | Register (vtkObjectBase *o) |
| |
| virtual void | UnRegister (vtkObjectBase *o) |
| |
| int | GetReferenceCount () |
| |
| void | SetReferenceCount (int) |
| |
| void | PrintRevisions (ostream &) |
| |
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
- Tests:
- vtkScalarBarActor (Tests)
Definition at line 79 of file vtkScalarBarActor.h.
| 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.