VTK  9.3.20240328
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:
29  void PrintSelf(ostream& os, vtkIndent indent) override;
30 
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 
55 
56 protected:
59 
61 
66 
67  class Private;
68  Private* Storage;
69 
70  bool UpdateLayout(vtkContext2D* painter) override;
71 
72 private:
74  void operator=(const vtkChartHistogram2D&) = delete;
75 };
76 
77 VTK_ABI_NAMESPACE_END
78 #endif // vtkChartHistogram2D_h
static vtkChartHistogram2D * New()
Creates a 2D histogram chart.
void Update() override
Perform any updates to the item that may be necessary before rendering.
bool UpdateLayout(vtkContext2D *painter) override
Update the layout of the chart, this may require the vtkContext2D in order to get font metrics etc.
vtkSmartPointer< vtkPlotHistogram2D > Histogram
bool Hit(const vtkContextMouseEvent &mouse) override
Return true if the supplied x, y coordinate is inside the item.
virtual void SetInputData(vtkImageData *data, vtkIdType z=0)
virtual void SetTransferFunction(vtkScalarsToColors *function)
vtkPlot * GetPlot(vtkIdType index) override
Get the plot at the specified index, returns null if the index is invalid.
vtkTimeStamp BuildTime
The point cache is marked dirty until it has been initialized.
~vtkChartHistogram2D() override
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
Factory class for drawing XY charts.
Definition: vtkChartXY.h:157
Legend item to display vtkScalarsToColors.
Class for drawing 2D primitives to a graphical context.
Definition: vtkContext2D.h:69
data structure to represent mouse events.
topologically and geometrically regular array of data
Definition: vtkImageData.h:155
a simple class to control print indentation
Definition: vtkIndent.h:108
Abstract class for 2D plots.
Definition: vtkPlot.h:153
Superclass for mapping scalar values to colors.
record modification and/or execution time
Definition: vtkTimeStamp.h:44
@ index
Definition: vtkX3D.h:246
@ data
Definition: vtkX3D.h:315
int vtkIdType
Definition: vtkType.h:315