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 
24 #ifndef vtkPlotHistogram2D_h
25 #define vtkPlotHistogram2D_h
26 
27 #include "vtkChartsCoreModule.h" // For export macro
28 #include "vtkPlot.h"
29 #include "vtkSmartPointer.h" // Needed for SP ivars
30 #include "vtkRect.h" // Needed for vtkRectf
31 
32 class vtkImageData;
33 class vtkScalarsToColors;
34 
35 class VTKCHARTSCORE_EXPORT vtkPlotHistogram2D : public vtkPlot
36 {
37 public:
38  vtkTypeMacro(vtkPlotHistogram2D, vtkPlot);
39  virtual void PrintSelf(ostream &os, vtkIndent indent);
40 
45 
51  virtual void Update();
52 
56  virtual bool Paint(vtkContext2D *painter);
57 
63  virtual void SetInputData(vtkImageData *data, vtkIdType z = 0);
64  virtual void SetInputData(vtkTable*) { }
65  virtual void SetInputData(vtkTable*, const vtkStdString&, const vtkStdString&) { }
66 
71 
77 
82 
83  virtual void GetBounds(double bounds[4]);
84 
85  virtual void SetPosition(const vtkRectf& pos);
86  virtual vtkRectf GetPosition();
87 
106  virtual vtkStdString GetTooltipLabel(const vtkVector2d &plotPos,
107  vtkIdType seriesIndex,
108  vtkIdType segmentIndex);
109 
119  const vtkVector2f& tolerance,
121 
122 protected:
125 
130 
135 
136 private:
137  vtkPlotHistogram2D(const vtkPlotHistogram2D &) VTK_DELETE_FUNCTION;
138  void operator=(const vtkPlotHistogram2D &) VTK_DELETE_FUNCTION;
139 
140 };
141 
142 #endif //vtkPlotHistogram2D_h
vtkPlotHistogram2D::Input
vtkSmartPointer< vtkImageData > Input
Definition: vtkPlotHistogram2D.h:131
vtkPlotHistogram2D::SetPosition
virtual void SetPosition(const vtkRectf &pos)
vtkPlotHistogram2D::GetNearestPoint
virtual vtkIdType GetNearestPoint(const vtkVector2f &point, const vtkVector2f &tolerance, vtkVector2f *location)
Function to query a plot for the nearest point to the specified coordinate.
vtkPlotHistogram2D::Update
virtual void Update()
Perform any updates to the item that may be necessary before rendering.
vtkPlotHistogram2D::TransferFunction
vtkSmartPointer< vtkScalarsToColors > TransferFunction
Definition: vtkPlotHistogram2D.h:133
vtkPlotHistogram2D::GetTransferFunction
vtkScalarsToColors * GetTransferFunction()
Get the color transfer function that is used to generate the histogram.
vtkPlot.h
vtkIdType
int vtkIdType
Definition: vtkType.h:287
vtkX3D::data
@ data
Definition: vtkX3D.h:315
vtkPlotHistogram2D::~vtkPlotHistogram2D
~vtkPlotHistogram2D()
vtkTable
A table, which contains similar-typed columns of data.
Definition: vtkTable.h:69
vtkPlotHistogram2D
Definition: vtkPlotHistogram2D.h:36
vtkPlotHistogram2D::New
static vtkPlotHistogram2D * New()
Creates a new object.
vtkSmartPointer< vtkImageData >
vtkContext2D
Class for drawing 2D primitives to a graphical context.
Definition: vtkContext2D.h:58
vtkPlot
Abstract class for 2D plots.
Definition: vtkPlot.h:53
vtkPlotHistogram2D::vtkPlotHistogram2D
vtkPlotHistogram2D()
vtkPlotHistogram2D::GetInputImageData
vtkImageData * GetInputImageData()
Get the input table used by the plot.
vtkPlotHistogram2D::GetPosition
virtual vtkRectf GetPosition()
vtkPlotHistogram2D::GetBounds
virtual void GetBounds(double bounds[4])
Get the bounds for this plot as (Xmin, Xmax, Ymin, Ymax).
vtkVector2d
Definition: vtkVector.h:347
vtkPlotHistogram2D::SetInputData
virtual void SetInputData(vtkTable *, const vtkStdString &, const vtkStdString &)
Definition: vtkPlotHistogram2D.h:65
vtkX3D::point
@ point
Definition: vtkX3D.h:236
vtkPlotHistogram2D::Position
vtkRectf Position
Definition: vtkPlotHistogram2D.h:134
vtkRect.h
vtkImageData
topologically and geometrically regular array of data
Definition: vtkImageData.h:46
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:40
vtkPlotHistogram2D::SetTransferFunction
void SetTransferFunction(vtkScalarsToColors *transfer)
Set the color transfer function that will be used to generate the 2D histogram.
vtkSmartPointer.h
vtkPlotHistogram2D::GetTooltipLabel
virtual vtkStdString GetTooltipLabel(const vtkVector2d &plotPos, vtkIdType seriesIndex, vtkIdType segmentIndex)
Generate and return the tooltip label string for this plot The segmentIndex parameter is ignored.
vtkScalarsToColors
Superclass for mapping scalar values to colors.
Definition: vtkScalarsToColors.h:67
vtkPlotHistogram2D::Output
vtkSmartPointer< vtkImageData > Output
Definition: vtkPlotHistogram2D.h:132
vtkPlotHistogram2D::SetInputData
virtual void SetInputData(vtkImageData *data, vtkIdType z=0)
Set the input, we are expecting a vtkImageData with just one component, this would normally be a floa...
vtkPlotHistogram2D::GenerateHistogram
void GenerateHistogram()
Where all the magic happens...
vtkPlotHistogram2D::Paint
virtual bool Paint(vtkContext2D *painter)
Paint event for the item, called whenever it needs to be drawn.
vtkX3D::location
@ location
Definition: vtkX3D.h:406
vtkStdString
Wrapper around std::string to keep symbols short.
Definition: vtkStdString.h:49
vtkPlotHistogram2D::SetInputData
virtual void SetInputData(vtkTable *)
This is a convenience function to set the input table and the x, y column for the plot.
Definition: vtkPlotHistogram2D.h:64
vtkRectf
Definition: vtkRect.h:297
vtkVector2f
Definition: vtkVector.h:338
vtkPlotHistogram2D::PrintSelf
virtual void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.