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 "vtkPlot.h"
27 #include "vtkSmartPointer.h" // Needed for SP ivars
28 #include "vtkRect.h" // Needed for vtkRectf
29 
30 class vtkImageData;
31 class vtkScalarsToColors;
32 
34 {
35 public:
36  vtkTypeMacro(vtkPlotHistogram2D, vtkPlot);
37  virtual void PrintSelf(ostream &os, vtkIndent indent);
38 
40  static vtkPlotHistogram2D *New();
41 
45  virtual void Update();
46 
48  virtual bool Paint(vtkContext2D *painter);
49 
51 
54  virtual void SetInput(vtkImageData *data, vtkIdType z = 0);
55  virtual void SetInput(vtkTable*) { }
56  virtual void SetInput(vtkTable*, const vtkStdString&, const vtkStdString&) { }
58 
60  vtkImageData * GetInputImageData();
61 
64  void SetTransferFunction(vtkScalarsToColors *transfer);
65 
68  vtkScalarsToColors * GetTransferFunction();
69 
70  virtual void GetBounds(double bounds[4]);
71 
72  virtual void SetPosition(const vtkRectf& pos);
73  virtual vtkRectf GetPosition();
74 
75 //BTX
76 protected:
79 
81  void GenerateHistogram();
82 
87 
88 private:
89  vtkPlotHistogram2D(const vtkPlotHistogram2D &); // Not implemented.
90  void operator=(const vtkPlotHistogram2D &); // Not implemented.
91 
92 //ETX
93 };
94 
95 #endif //__vtk2DHistogramItem_h
#define VTK_CHARTS_EXPORT
Wrapper around vtkstd::string to keep symbols short.
Definition: vtkStdString.h:45
virtual void SetInput(vtkTable *)
virtual bool Paint(vtkContext2D *painter)
virtual void GetBounds(double bounds[4])
Definition: vtkPlot.h:213
int vtkIdType
Definition: vtkType.h:255
Superclass for mapping scalar values into colors.
Class for drawing 2D primitives to a graphical context.
Definition: vtkContext2D.h:54
a simple class to control print indentation
Definition: vtkIndent.h:37
topologically and geometrically regular array of data
Definition: vtkImageData.h:43
vtkSmartPointer< vtkScalarsToColors > TransferFunction
Abstract class for 2D plots.
Definition: vtkPlot.h:50
virtual void SetInput(vtkTable *table)
virtual void PrintSelf(ostream &os, vtkIndent indent)
vtkSmartPointer< vtkImageData > Input
static vtkObject * New()
vtkSmartPointer< vtkImageData > Output
virtual void Update()
virtual void SetInput(vtkTable *, const vtkStdString &, const vtkStdString &)