VTK
9.6.2
Main Page
Related Pages
Topics
Namespaces
Classes
Files
File List
File Members
Charts
Core
vtkPlotBox.h
Go to the documentation of this file.
1
// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2
// SPDX-License-Identifier: BSD-3-Clause
3
15
16
#ifndef vtkPlotBox_h
17
#define vtkPlotBox_h
18
19
#include "vtkChartsCoreModule.h"
// For export macro
20
#include "
vtkPlot.h
"
21
#include "
vtkWrappingHints.h
"
// For VTK_MARSHALAUTO
22
23
VTK_ABI_NAMESPACE_BEGIN
24
class
vtkBrush
;
25
class
vtkTextProperty
;
26
class
vtkTable
;
27
class
vtkStdString
;
28
class
vtkScalarsToColors
;
29
30
class
VTKCHARTSCORE_EXPORT
VTK_MARSHALAUTO
vtkPlotBox
:
public
vtkPlot
31
{
32
public
:
33
vtkTypeMacro(
vtkPlotBox
,
vtkPlot
);
34
void
PrintSelf
(ostream& os,
vtkIndent
indent)
override
;
35
39
static
vtkPlotBox
*
New
();
40
44
bool
Paint
(
vtkContext2D
* painter)
override
;
45
52
bool
PaintLegend
(
vtkContext2D
* painter,
const
vtkRectf
& rect,
int
legendIndex)
override
;
53
55
58
void
SetInputData
(
vtkTable
* table)
override
;
59
void
SetInputData
(
vtkTable
* table,
const
vtkStdString
&,
const
vtkStdString
&)
override
60
{
61
this->
SetInputData
(table);
62
}
63
64
69
vtkStringArray
*
GetLabels
()
override
;
70
76
vtkIdType
GetNearestPoint
(
const
vtkVector2f
& point,
const
vtkVector2f
& tolerance,
77
vtkVector2f
* location,
vtkIdType
* segmentId)
override
;
78
using
vtkPlot::GetNearestPoint
;
79
81
84
void
SetLookupTable
(
vtkScalarsToColors
* lut);
85
vtkScalarsToColors
*
GetLookupTable
();
87
91
void
SetColumnColor
(
const
vtkStdString
& colName,
double
* rgb);
92
97
virtual
void
CreateDefaultLookupTable
();
98
100
103
vtkGetMacro(
BoxWidth
,
float
);
104
vtkSetMacro(
BoxWidth
,
float
);
106
108
111
vtkGetObjectMacro(
TitleProperties
,
vtkTextProperty
);
113
120
bool
UpdateCache
()
override
;
121
122
protected
:
123
vtkPlotBox
();
124
~vtkPlotBox
()
override
;
125
126
void
DrawBoxPlot
(
int
,
unsigned
char
*,
double
,
vtkContext2D
*);
127
129
132
class
Private;
133
Private*
Storage
;
135
139
float
BoxWidth
;
140
144
vtkScalarsToColors
*
LookupTable
;
145
149
vtkTextProperty
*
TitleProperties
;
150
151
private
:
152
vtkPlotBox
(
const
vtkPlotBox
&) =
delete
;
153
void
operator=(
const
vtkPlotBox
&) =
delete
;
154
};
155
156
VTK_ABI_NAMESPACE_END
157
#endif
// vtkPlotBox_h
vtkBrush
provides a brush that fills shapes drawn by vtkContext2D.
Definition
vtkBrush.h:31
vtkContext2D
Class for drawing 2D primitives to a graphical context.
Definition
vtkContext2D.h:50
vtkIndent
a simple class to control print indentation
Definition
vtkIndent.h:29
vtkPlotBox::LookupTable
vtkScalarsToColors * LookupTable
Lookup Table for coloring points by scalar value.
Definition
vtkPlotBox.h:144
vtkPlotBox::GetLabels
vtkStringArray * GetLabels() override
Get the plot labels.
vtkPlotBox::BoxWidth
float BoxWidth
Width of boxes.
Definition
vtkPlotBox.h:139
vtkPlotBox::SetLookupTable
void SetLookupTable(vtkScalarsToColors *lut)
Specify a lookup table for the mapper to use.
vtkPlotBox::UpdateCache
bool UpdateCache() override
Update the internal cache.
vtkPlotBox::DrawBoxPlot
void DrawBoxPlot(int, unsigned char *, double, vtkContext2D *)
vtkPlotBox::vtkPlotBox
vtkPlotBox()
vtkPlotBox::GetLookupTable
vtkScalarsToColors * GetLookupTable()
Specify a lookup table for the mapper to use.
vtkPlotBox::SetColumnColor
void SetColumnColor(const vtkStdString &colName, double *rgb)
Helper function to set the color of a given column.
vtkPlotBox::CreateDefaultLookupTable
virtual void CreateDefaultLookupTable()
Create default lookup table.