forked from Kitware/ParaView
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvtkPVBagChartRepresentation.h
235 lines (200 loc) · 5.42 KB
/
vtkPVBagChartRepresentation.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
/*=========================================================================
Program: ParaView
Module: vtkPVBagChartRepresentation.h
Copyright (c) Kitware, Inc.
All rights reserved.
See Copyright.txt or http://www.paraview.org/HTML/Copyright.html for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notice for more information.
=========================================================================*/
/**
* @class vtkPVBagChartRepresentation
*
* vtkPVagChartRepresentation is the vtkChartRepresentation
* subclass for bag plots representation. It exposes API from
* underlying vtkXYChart and vtkPlotBag.
*/
#ifndef vtkPVBagChartRepresentation_h
#define vtkPVBagChartRepresentation_h
#include "vtkBagPlotViewsAndFiltersBagPlotModule.h"
#include "vtkChartRepresentation.h"
class vtkChartXY;
class vtkImageData;
class vtkScalarsToColors;
class VTKBAGPLOTVIEWSANDFILTERSBAGPLOT_EXPORT vtkPVBagChartRepresentation
: public vtkChartRepresentation
{
public:
static vtkPVBagChartRepresentation* New();
vtkTypeMacro(vtkPVBagChartRepresentation, vtkChartRepresentation);
void PrintSelf(ostream& os, vtkIndent indent) override;
/**
* Set visibility of the representation.
*/
void SetVisibility(bool visible) override;
/**
* Provides access to the underlying VTK representation.
*/
vtkChartXY* GetChart();
//@{
/**
* Set/get the line thickness for the plot.
*/
vtkSetMacro(LineThickness, int);
vtkGetMacro(LineThickness, int);
//@}
//@{
/**
* Set/get the line style for the plot.
*/
vtkSetMacro(LineStyle, int);
vtkGetMacro(LineStyle, int);
//@}
//@{
/**
* Set/get the color to used for the points in the plot.
*/
vtkSetVector3Macro(LineColor, double);
vtkGetVector3Macro(LineColor, double);
//@}
//@{
/**
* Set/get the color to used for the points in the plot.
*/
void SetLookupTable(vtkScalarsToColors* lut);
vtkGetObjectMacro(LookupTable, vtkScalarsToColors);
//@}
//@{
/**
* Set/get the color to used for the bag in the plot.
*/
vtkSetVector3Macro(BagColor, double);
vtkGetVector3Macro(BagColor, double);
//@}
//@{
/**
* Set/get the color to used for the bag in the plot.
*/
vtkSetVector3Macro(SelectionColor, double);
vtkGetVector3Macro(SelectionColor, double);
//@}
//@{
/**
* Set/get the opacity for the bag in the plot.
*/
vtkSetMacro(Opacity, double);
vtkGetMacro(Opacity, double);
//@}
//@{
/**
* Set/get the point size in the plot.
*/
vtkSetMacro(PointSize, int);
vtkGetMacro(PointSize, int);
//@}
//@{
/**
* Set/get the color to used for the points in the plot.
*/
vtkSetVector3Macro(PointColor, double);
vtkGetVector3Macro(PointColor, double);
//@}
//@{
/**
* Set/get the line thickness for the plot.
*/
vtkSetMacro(GridLineThickness, int);
vtkGetMacro(GridLineThickness, int);
//@}
//@{
/**
* Set/get the line style for the plot.
*/
vtkSetMacro(GridLineStyle, int);
vtkGetMacro(GridLineStyle, int);
//@}
//@{
/**
* Set/get the color to used for the user defined quartile isoline in the plot.
*/
vtkSetVector3Macro(PUserColor, double);
vtkGetVector3Macro(PUserColor, double);
//@}
//@{
/**
* Set/get the color to used for the P50 isoline in the plot.
*/
vtkSetVector3Macro(P50Color, double);
vtkGetVector3Macro(P50Color, double);
//@}
//@{
/**
* Set/get the series to use as the X-axis.
*/
vtkSetStringMacro(XAxisSeriesName);
vtkGetStringMacro(XAxisSeriesName);
//@}
//@{
/**
* Set/get whether the index should be used for the x axis. When true, XSeriesName
* is ignored.
*/
vtkSetMacro(UseIndexForXAxis, bool);
vtkGetMacro(UseIndexForXAxis, bool);
//@}
//@{
/**
* Set/get the series to use as the density
*/
vtkSetStringMacro(DensitySeriesName);
vtkGetStringMacro(DensitySeriesName);
//@}
//@{
/**
* Set/get the series to use as the Y-axis
*/
vtkSetStringMacro(YAxisSeriesName);
vtkGetStringMacro(YAxisSeriesName);
//@}
protected:
vtkPVBagChartRepresentation();
~vtkPVBagChartRepresentation() override;
/**
* Overridden to pass information about changes to series visibility etc. to
* the plot-matrix.
*/
void PrepareForRendering() override;
void SetPolyLineToTable(vtkPolyData* polydata, vtkTable* table);
bool AddToView(vtkView* view) override;
/**
* Removes the representation to the view. This is called from
* vtkView::RemoveRepresentation(). Subclasses should override this method.
* Returns true if the removal succeeds.
*/
bool RemoveFromView(vtkView* view) override;
vtkSmartPointer<vtkDataObject> ReduceDataToRoot(vtkDataObject* data) override;
private:
vtkPVBagChartRepresentation(const vtkPVBagChartRepresentation&) = delete;
void operator=(const vtkPVBagChartRepresentation&) = delete;
int LineThickness;
int LineStyle;
double LineColor[3];
vtkScalarsToColors* LookupTable;
double BagColor[3];
double SelectionColor[3];
double Opacity;
int PointSize;
double PointColor[3];
int GridLineThickness;
int GridLineStyle;
double PUserColor[3];
double P50Color[3];
char* XAxisSeriesName;
char* YAxisSeriesName;
char* DensitySeriesName;
bool UseIndexForXAxis;
vtkSmartPointer<vtkImageData> LocalGrid;
vtkSmartPointer<vtkTable> LocalThreshold;
};
#endif