ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
vtkScalarBarActorCustom Class Reference

#include <vtkScalarBarActorCustom.h>

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

Public Member Functions

 vtkTypeMacro (vtkScalarBarActorCustom, vtkScalarBarActor)
 
void PrintSelf (ostream &os, vtkIndent indent) override
 
 vtkGetMacro (AspectRatio, double)
 
 vtkSetMacro (AspectRatio, double)
 
 vtkGetMacro (AutomaticLabelFormat, int)
 
 vtkSetMacro (AutomaticLabelFormat, int)
 
 vtkBooleanMacro (AutomaticLabelFormat, int)
 
 vtkGetMacro (DrawTickMarks, int)
 
 vtkSetMacro (DrawTickMarks, int)
 
 vtkBooleanMacro (DrawTickMarks, int)
 
 vtkGetMacro (DrawSubTickMarks, int)
 
 vtkSetMacro (DrawSubTickMarks, int)
 
 vtkBooleanMacro (DrawSubTickMarks, int)
 
 vtkGetMacro (AddRangeLabels, int)
 
 vtkSetMacro (AddRangeLabels, int)
 
 vtkBooleanMacro (AddRangeLabels, int)
 
 vtkSetMacro (AutomaticAnnotations, int)
 
 vtkGetMacro (AutomaticAnnotations, int)
 
 vtkBooleanMacro (AutomaticAnnotations, int)
 
 vtkGetStringMacro (RangeLabelFormat)
 
 vtkSetStringMacro (RangeLabelFormat)
 
virtual void AddValueLabelIfUnoccluded (double value, double pos, double diff)
 
 vtkGetMacro (TitleJustification, int)
 
 vtkSetClampMacro (TitleJustification, int, VTK_TEXT_LEFT, VTK_TEXT_RIGHT)
 
 vtkGetMacro (AddRangeAnnotations, int)
 
 vtkSetMacro (AddRangeAnnotations, int)
 
 vtkBooleanMacro (AddRangeAnnotations, int)
 
void ReleaseGraphicsResources (vtkWindow *) override
 
int RenderOpaqueGeometry (vtkViewport *viewport) override
 
int RenderOverlay (vtkViewport *viewport) override
 

Static Public Member Functions

static vtkScalarBarActorCustom * New ()
 

Protected Member Functions

 vtkScalarBarActorCustom ()
 
 ~vtkScalarBarActorCustom () override
 
void PrepareTitleText () override
 
void ComputeScalarBarThickness () override
 
void LayoutTitle () override
 
void ComputeScalarBarLength () override
 
void LayoutTicks () override
 
void ConfigureAnnotations () override
 
void ConfigureTitle () override
 
void ConfigureTicks () override
 
void EditAnnotations () override
 
virtual void BuildScalarBarTexture ()
 
virtual int CreateLabel (double value, int minDigits, int targetWidth, int targetHeight, vtkViewport *viewport)
 

Protected Attributes

double AspectRatio
 
int AutomaticLabelFormat
 
int DrawTickMarks
 
int DrawSubTickMarks
 
int AddRangeLabels
 
int AutomaticAnnotations
 
char * RangeLabelFormat
 
vtkTexture * ScalarBarTexture
 
vtkPolyData * TickMarks
 
vtkPolyDataMapper2D * TickMarksMapper
 
vtkActor2D * TickMarksActor
 
vtkNew< vtkAxis > TickLayoutHelper
 
vtkNew< vtkContextScene > TickLayoutHelperScene
 
int LabelSpace
 
int TitleJustification
 
int AddRangeAnnotations
 

Constructor & Destructor Documentation

◆ vtkScalarBarActorCustom()

◆ ~vtkScalarBarActorCustom()

vtkScalarBarActorCustom::~vtkScalarBarActorCustom ( )
overrideprotected

Member Function Documentation

◆ AddValueLabelIfUnoccluded()

void vtkScalarBarActorCustom::AddValueLabelIfUnoccluded ( double  value,
double  pos,
double  diff 
)
virtual

Add value as annotation label on scalar bar at the given position

References cloudViewer::utility::ceil(), cloudViewer::utility::floor(), and SNPRINTF.

Referenced by EditAnnotations().

◆ BuildScalarBarTexture()

void vtkScalarBarActorCustom::BuildScalarBarTexture ( )
protectedvirtual

Set up the ScalarBar, ScalarBarMapper, and ScalarBarActor based on the current position and orientation of this actor. virtual void PositionScalarBar(const int propSize[2], vtkViewport *viewport); Set up the texture used to render the scalar bar.

References COLOR_TEXTURE_MAP_SIZE, colors, and ScalarBarTexture.

◆ ComputeScalarBarLength()

void vtkScalarBarActorCustom::ComputeScalarBarLength ( )
overrideprotected

◆ ComputeScalarBarThickness()

void vtkScalarBarActorCustom::ComputeScalarBarThickness ( )
overrideprotected

◆ ConfigureAnnotations()

void vtkScalarBarActorCustom::ConfigureAnnotations ( )
overrideprotected

◆ ConfigureTicks()

◆ ConfigureTitle()

void vtkScalarBarActorCustom::ConfigureTitle ( )
overrideprotected

References x, and y.

◆ CreateLabel()

int vtkScalarBarActorCustom::CreateLabel ( double  value,
int  minDigits,
int  targetWidth,
int  targetHeight,
vtkViewport *  viewport 
)
protectedvirtual

A convenience function for creating one of the labels. A text mapper and associated actor are added to LabelMappers and LabelActors respectively. The index to the newly created entries is returned.

References AutomaticLabelFormat, format, and SNPRINTF.

Referenced by ConfigureTicks().

◆ EditAnnotations()

void vtkScalarBarActorCustom::EditAnnotations ( )
overrideprotected

Annotate the min/max values on the scalar bar (in interval/ratio mode).

This overrides the subclass implementation.

References AddRangeAnnotations, and AddValueLabelIfUnoccluded().

◆ LayoutTicks()

void vtkScalarBarActorCustom::LayoutTicks ( )
overrideprotected

◆ LayoutTitle()

void vtkScalarBarActorCustom::LayoutTitle ( )
overrideprotected

References NULL, and TitleJustification.

◆ New()

static vtkScalarBarActorCustom* vtkScalarBarActorCustom::New ( )
static

◆ PrepareTitleText()

void vtkScalarBarActorCustom::PrepareTitleText ( )
overrideprotected

These methods override the subclass implementation.

◆ PrintSelf()

◆ ReleaseGraphicsResources()

void vtkScalarBarActorCustom::ReleaseGraphicsResources ( vtkWindow *  window)
override

Release any graphics resources that are being consumed by this actor. The parameter window could be used to determine which graphic resources to release.

References ScalarBarTexture, and TickMarksActor.

◆ RenderOpaqueGeometry()

int vtkScalarBarActorCustom::RenderOpaqueGeometry ( vtkViewport *  viewport)
override

Overridden to sync internal variables with renderer state.

References TickLayoutHelperScene.

◆ RenderOverlay()

int vtkScalarBarActorCustom::RenderOverlay ( vtkViewport *  viewport)
override

Draw the scalar bar and annotation text to the screen.

References DrawTickMarks, and TickMarksActor.

◆ vtkBooleanMacro() [1/6]

vtkScalarBarActorCustom::vtkBooleanMacro ( AddRangeAnnotations  ,
int   
)

◆ vtkBooleanMacro() [2/6]

vtkScalarBarActorCustom::vtkBooleanMacro ( AddRangeLabels  ,
int   
)

◆ vtkBooleanMacro() [3/6]

vtkScalarBarActorCustom::vtkBooleanMacro ( AutomaticAnnotations  ,
int   
)

◆ vtkBooleanMacro() [4/6]

vtkScalarBarActorCustom::vtkBooleanMacro ( AutomaticLabelFormat  ,
int   
)

◆ vtkBooleanMacro() [5/6]

vtkScalarBarActorCustom::vtkBooleanMacro ( DrawSubTickMarks  ,
int   
)

◆ vtkBooleanMacro() [6/6]

vtkScalarBarActorCustom::vtkBooleanMacro ( DrawTickMarks  ,
int   
)

◆ vtkGetMacro() [1/8]

vtkScalarBarActorCustom::vtkGetMacro ( AddRangeAnnotations  ,
int   
)

Set whether the scalar data range endpoints (minimum and maximum) are added as annotations.

◆ vtkGetMacro() [2/8]

vtkScalarBarActorCustom::vtkGetMacro ( AddRangeLabels  ,
int   
)

Set whether the range endpoints (minimum and maximum) are added as labels alongside other value labels.

◆ vtkGetMacro() [3/8]

vtkScalarBarActorCustom::vtkGetMacro ( AspectRatio  ,
double   
)

The bar aspect ratio (length/width). Defaults to 20. Note that this the aspect ratio of the color bar only, not including labels.

◆ vtkGetMacro() [4/8]

vtkScalarBarActorCustom::vtkGetMacro ( AutomaticAnnotations  ,
int   
)

◆ vtkGetMacro() [5/8]

vtkScalarBarActorCustom::vtkGetMacro ( AutomaticLabelFormat  ,
int   
)

If true (the default), the printf format used for the labels will be automatically generated to make the numbers best fit within the widget. If false, the LabelFormat ivar will be used.

◆ vtkGetMacro() [6/8]

vtkScalarBarActorCustom::vtkGetMacro ( DrawSubTickMarks  ,
int   
)

If true (the default), sub-tick marks will be drawn.

◆ vtkGetMacro() [7/8]

vtkScalarBarActorCustom::vtkGetMacro ( DrawTickMarks  ,
int   
)

If true (the default), tick marks will be drawn.

◆ vtkGetMacro() [8/8]

vtkScalarBarActorCustom::vtkGetMacro ( TitleJustification  ,
int   
)

Set the title justification. Valid values are VTK_TEXT_LEFT, VTK_TEXT_CENTERED, and VTK_TEXT_RIGHT.

◆ vtkGetStringMacro()

vtkScalarBarActorCustom::vtkGetStringMacro ( RangeLabelFormat  )

Set the C-style format string for the range labels.

◆ vtkSetClampMacro()

vtkScalarBarActorCustom::vtkSetClampMacro ( TitleJustification  ,
int  ,
VTK_TEXT_LEFT  ,
VTK_TEXT_RIGHT   
)

◆ vtkSetMacro() [1/7]

vtkScalarBarActorCustom::vtkSetMacro ( AddRangeAnnotations  ,
int   
)

◆ vtkSetMacro() [2/7]

vtkScalarBarActorCustom::vtkSetMacro ( AddRangeLabels  ,
int   
)

◆ vtkSetMacro() [3/7]

vtkScalarBarActorCustom::vtkSetMacro ( AspectRatio  ,
double   
)

◆ vtkSetMacro() [4/7]

vtkScalarBarActorCustom::vtkSetMacro ( AutomaticAnnotations  ,
int   
)

Set whether annotions are automatically created according the number of discrete colors. Default is FALSE;

◆ vtkSetMacro() [5/7]

vtkScalarBarActorCustom::vtkSetMacro ( AutomaticLabelFormat  ,
int   
)

◆ vtkSetMacro() [6/7]

vtkScalarBarActorCustom::vtkSetMacro ( DrawSubTickMarks  ,
int   
)

◆ vtkSetMacro() [7/7]

vtkScalarBarActorCustom::vtkSetMacro ( DrawTickMarks  ,
int   
)

◆ vtkSetStringMacro()

vtkScalarBarActorCustom::vtkSetStringMacro ( RangeLabelFormat  )

◆ vtkTypeMacro()

vtkScalarBarActorCustom::vtkTypeMacro ( vtkScalarBarActorCustom  ,
vtkScalarBarActor   
)

Member Data Documentation

◆ AddRangeAnnotations

int vtkScalarBarActorCustom::AddRangeAnnotations
protected

Flag to add minimum and maximum as annotations

Referenced by EditAnnotations(), PrintSelf(), and vtkScalarBarActorCustom().

◆ AddRangeLabels

int vtkScalarBarActorCustom::AddRangeLabels
protected

◆ AspectRatio

double vtkScalarBarActorCustom::AspectRatio
protected

◆ AutomaticAnnotations

int vtkScalarBarActorCustom::AutomaticAnnotations
protected

Flag indicating whether automatic annotations are computed and shown.

Referenced by PrintSelf(), and vtkScalarBarActorCustom().

◆ AutomaticLabelFormat

int vtkScalarBarActorCustom::AutomaticLabelFormat
protected

◆ DrawSubTickMarks

int vtkScalarBarActorCustom::DrawSubTickMarks
protected

◆ DrawTickMarks

int vtkScalarBarActorCustom::DrawTickMarks
protected

◆ LabelSpace

int vtkScalarBarActorCustom::LabelSpace
protected

Space, in pixels, between the labels and the bar itself. Currently set in PositionTitle.

Referenced by ComputeScalarBarThickness(), ConfigureTicks(), LayoutTicks(), and PrintSelf().

◆ RangeLabelFormat

char* vtkScalarBarActorCustom::RangeLabelFormat
protected

◆ ScalarBarTexture

vtkTexture* vtkScalarBarActorCustom::ScalarBarTexture
protected

◆ TickLayoutHelper

vtkNew<vtkAxis> vtkScalarBarActorCustom::TickLayoutHelper
protected

These are used to calculate the tick spacing.

Referenced by ConfigureTicks(), and vtkScalarBarActorCustom().

◆ TickLayoutHelperScene

vtkNew<vtkContextScene> vtkScalarBarActorCustom::TickLayoutHelperScene
protected

◆ TickMarks

vtkPolyData* vtkScalarBarActorCustom::TickMarks
protected

◆ TickMarksActor

vtkActor2D* vtkScalarBarActorCustom::TickMarksActor
protected

◆ TickMarksMapper

vtkPolyDataMapper2D* vtkScalarBarActorCustom::TickMarksMapper
protected

◆ TitleJustification

int vtkScalarBarActorCustom::TitleJustification
protected

The justification/alignment of the title.

Referenced by LayoutTitle(), PrintSelf(), and vtkScalarBarActorCustom().


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