VTK: Charts/Core/vtkChartHistogram2D.h Source File

| VTK 9.3.1

vtkChartHistogram2D.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
12 #ifndef vtkChartHistogram2D_h
13 #define vtkChartHistogram2D_h
14
15 #include "vtkChartXY.h"
16 #include "vtkChartsCoreModule.h" // For export macro
17 #include "vtkSmartPointer.h" // For SP ivars
18
19 VTK_ABI_NAMESPACE_BEGIN
20 class vtkColorLegend;
21 class vtkPlotHistogram2D;
22 class vtkImageData;
23 class vtkScalarsToColors;
24
25 class VTKCHARTSCORE_EXPORT vtkChartHistogram2D : public vtkChartXY
26 {
27 public:
28 vtkTypeMacro(vtkChartHistogram2D, vtkChartXY);
29 void PrintSelf(ostream& os, vtkIndent indent) override;
30
34 static vtkChartHistogram2D* New();
35
41 void Update() override;
42
43 virtual void SetInputData(vtkImageData* data, vtkIdType z = 0);
44 virtual void SetTransferFunction(vtkScalarsToColors* function);
45
49 bool Hit(const vtkContextMouseEvent& mouse) override;
50
54 vtkPlot* GetPlot(vtkIdType index) override;
55
56 protected:
57 vtkChartHistogram2D();
58 ~vtkChartHistogram2D() override;
59
60 vtkSmartPointer<vtkPlotHistogram2D> Histogram;
61
65 vtkTimeStamp BuildTime;
66
67 class Private;
68 Private* Storage;
69
70 bool UpdateLayout(vtkContext2D* painter) override;
71
72 private:
73 vtkChartHistogram2D(const vtkChartHistogram2D&) = delete;
74 void operator=(const vtkChartHistogram2D&) = delete;
75 };
76
77 VTK_ABI_NAMESPACE_END
78 #endif // vtkChartHistogram2D_h
vtkChartHistogram2D
Definition: vtkChartHistogram2D.h:26
vtkChartHistogram2D::New
static vtkChartHistogram2D * New()
Creates a 2D histogram chart.
vtkChartHistogram2D::vtkChartHistogram2D
vtkChartHistogram2D()
vtkChartHistogram2D::Update
void Update() override
Perform any updates to the item that may be necessary before rendering.
vtkChartHistogram2D::UpdateLayout
bool UpdateLayout(vtkContext2D *painter) override
Update the layout of the chart, this may require the vtkContext2D in order to get font metrics etc.
vtkChartHistogram2D::Histogram
vtkSmartPointer< vtkPlotHistogram2D > Histogram
Definition: vtkChartHistogram2D.h:60
vtkChartHistogram2D::Hit
bool Hit(const vtkContextMouseEvent &mouse) override
Return true if the supplied x, y coordinate is inside the item.
vtkChartHistogram2D::SetInputData
virtual void SetInputData(vtkImageData *data, vtkIdType z=0)
vtkChartHistogram2D::Storage
Private * Storage
Definition: vtkChartHistogram2D.h:67
vtkChartHistogram2D::SetTransferFunction
virtual void SetTransferFunction(vtkScalarsToColors *function)
vtkChartHistogram2D::GetPlot
vtkPlot * GetPlot(vtkIdType index) override
Get the plot at the specified index, returns null if the index is invalid.
vtkChartHistogram2D::BuildTime
vtkTimeStamp BuildTime
The point cache is marked dirty until it has been initialized.
Definition: vtkChartHistogram2D.h:65
vtkChartHistogram2D::~vtkChartHistogram2D
~vtkChartHistogram2D() override
vtkChartHistogram2D::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkChartXY
Factory class for drawing XY charts.
Definition: vtkChartXY.h:57
vtkColorLegend
Legend item to display vtkScalarsToColors.
Definition: vtkColorLegend.h:37
vtkContext2D
Class for drawing 2D primitives to a graphical context.
Definition: vtkContext2D.h:59
vtkContextMouseEvent
data structure to represent mouse events.
Definition: vtkContextMouseEvent.h:39
vtkImageData
topologically and geometrically regular array of data
Definition: vtkImageData.h:52
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:38
vtkPlotHistogram2D
Definition: vtkPlotHistogram2D.h:29
vtkPlot
Abstract class for 2D plots.
Definition: vtkPlot.h:53
vtkScalarsToColors
Superclass for mapping scalar values to colors.
Definition: vtkScalarsToColors.h:65
vtkSmartPointer< vtkPlotHistogram2D >
vtkTimeStamp
record modification and/or execution time
Definition: vtkTimeStamp.h:34
vtkX3D::index
@ index
Definition: vtkX3D.h:246
vtkX3D::data
@ data
Definition: vtkX3D.h:315
vtkChartXY.h
vtkSmartPointer.h
vtkIdType
int vtkIdType
Definition: vtkType.h:315