VTK
vtkPlotHistogram2D.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtk2DHistogramItem.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
15 
23 #ifndef vtk2DHistogramItem_h
24 #define vtk2DHistogramItem_h
25 
26 #include "vtkChartsCoreModule.h" // For export macro
27 #include "vtkPlot.h"
28 #include "vtkSmartPointer.h" // Needed for SP ivars
29 #include "vtkRect.h" // Needed for vtkRectf
30 
31 class vtkImageData;
32 class vtkScalarsToColors;
33 
35 {
36 public:
37  vtkTypeMacro(vtkPlotHistogram2D, vtkPlot);
38  virtual void PrintSelf(ostream &os, vtkIndent indent);
39 
41  static vtkPlotHistogram2D *New();
42 
46  virtual void Update();
47 
49  virtual bool Paint(vtkContext2D *painter);
50 
52 
55  virtual void SetInputData(vtkImageData *data, vtkIdType z = 0);
56  virtual void SetInputData(vtkTable*) { }
57  virtual void SetInputData(vtkTable*, const vtkStdString&, const vtkStdString&) { }
59 
61  vtkImageData * GetInputImageData();
62 
65  void SetTransferFunction(vtkScalarsToColors *transfer);
66 
69  vtkScalarsToColors * GetTransferFunction();
70 
71  virtual void GetBounds(double bounds[4]);
72 
73  virtual void SetPosition(const vtkRectf& pos);
74  virtual vtkRectf GetPosition();
75 
76 //BTX
78 
91  virtual vtkStdString GetTooltipLabel(const vtkVector2d &plotPos,
92  vtkIdType seriesIndex,
93  vtkIdType segmentIndex);
95 
97 
104  const vtkVector2f& tolerance,
107 
108 protected:
111 
113  void GenerateHistogram();
114 
119 
120 private:
121  vtkPlotHistogram2D(const vtkPlotHistogram2D &); // Not implemented.
122  void operator=(const vtkPlotHistogram2D &); // Not implemented.
123 
124 //ETX
125 };
126 
127 #endif //vtk2DHistogramItem_h
Wrapper around std::string to keep symbols short.
Definition: vtkStdString.h:46
virtual bool Paint(vtkContext2D *painter)
virtual void SetInputData(vtkTable *)
virtual void GetBounds(double bounds[4])
Definition: vtkPlot.h:276
int vtkIdType
Definition: vtkType.h:275
Superclass for mapping scalar values to colors.
Class for drawing 2D primitives to a graphical context.
Definition: vtkContext2D.h:56
a simple class to control print indentation
Definition: vtkIndent.h:38
topologically and geometrically regular array of data
Definition: vtkImageData.h:44
vtkSmartPointer< vtkScalarsToColors > TransferFunction
Abstract class for 2D plots.
Definition: vtkPlot.h:51
virtual vtkIdType GetNearestPoint(const vtkVector2f &point, const vtkVector2f &tolerance, vtkVector2f *location)
A table, which contains similar-typed columns of data.
Definition: vtkTable.h:67
virtual void SetInputData(vtkTable *table)
virtual void PrintSelf(ostream &os, vtkIndent indent)
virtual void SetInputData(vtkTable *, const vtkStdString &, const vtkStdString &)
vtkSmartPointer< vtkImageData > Input
static vtkObject * New()
vtkSmartPointer< vtkImageData > Output
virtual void Update()
#define VTKCHARTSCORE_EXPORT
virtual vtkStdString GetTooltipLabel(const vtkVector2d &plotPos, vtkIdType seriesIndex, vtkIdType segmentIndex)