VTK
vtkPlotFunctionalBag.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkPlotFunctionalBag.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 
32 #ifndef vtkPlotFunctionalBag_h
33 #define vtkPlotFunctionalBag_h
34 
35 #include "vtkChartsCoreModule.h" // For export macro
36 #include "vtkPlot.h"
37 #include "vtkNew.h" // Needed to hold SP ivars
38 
39 class vtkDataArray;
40 class vtkPlotFuntionalBagInternal;
41 class vtkPlotLine;
42 class vtkPoints2D;
43 class vtkScalarsToColors;
44 
45 class VTKCHARTSCORE_EXPORT vtkPlotFunctionalBag : public vtkPlot
46 {
47 public:
48  vtkTypeMacro(vtkPlotFunctionalBag, vtkPlot);
49  void PrintSelf(ostream &os, vtkIndent indent) VTK_OVERRIDE;
50 
54  static vtkPlotFunctionalBag *New();
55 
60  virtual bool IsBag();
61 
65  bool GetVisible() VTK_OVERRIDE;
66 
72  void Update() VTK_OVERRIDE;
73 
77  bool Paint(vtkContext2D *painter) VTK_OVERRIDE;
78 
85  bool PaintLegend(vtkContext2D *painter, const vtkRectf& rect,
86  int legendIndex) VTK_OVERRIDE;
87 
91  void GetBounds(double bounds[4]) VTK_OVERRIDE;
92 
97  void GetUnscaledInputBounds(double bounds[4]) VTK_OVERRIDE;
98 
100 
103  void SetLookupTable(vtkScalarsToColors *lut);
104  vtkScalarsToColors *GetLookupTable();
106 
111  virtual void CreateDefaultLookupTable();
112 
118  vtkIdType GetNearestPoint(const vtkVector2f& point,
119  const vtkVector2f& tolerance,
120  vtkVector2f* location) VTK_OVERRIDE;
121 
125  bool SelectPoints(const vtkVector2f& min, const vtkVector2f& max) VTK_OVERRIDE;
126 
130  bool SelectPointsInPolygon(const vtkContextPolygon &polygon) VTK_OVERRIDE;
131 
132 protected:
134  ~vtkPlotFunctionalBag() VTK_OVERRIDE;
135 
139  bool GetDataArrays(vtkTable *table, vtkDataArray *array[2]);
140 
144  bool UpdateTableCache(vtkTable*);
145 
150 
154  vtkScalarsToColors *LookupTable;
155 
160 
164  vtkNew<vtkPoints2D> BagPoints;
165 
166  bool LogX, LogY;
167 
168 private:
169  vtkPlotFunctionalBag(const vtkPlotFunctionalBag &) VTK_DELETE_FUNCTION;
170  void operator=(const vtkPlotFunctionalBag &) VTK_DELETE_FUNCTION;
171 };
172 
173 #endif //vtkPlotFunctionalBag_h
vtkTimeStamp BuildTime
Class for drawing an XY line plot or bag given two columns from a vtkTable.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
record modification and/or execution time
Definition: vtkTimeStamp.h:32
virtual void Update()
Updates the extensions string.
int vtkIdType
Definition: vtkType.h:345
Superclass for mapping scalar values to colors.
Class for drawing 2D primitives to a graphical context.
Definition: vtkContext2D.h:52
a simple class to control print indentation
Definition: vtkIndent.h:33
represent and manipulate 2D points
Definition: vtkPoints2D.h:33
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:48
Abstract class for 2D plots.
Definition: vtkPlot.h:46
A table, which contains similar-typed columns of data.
Definition: vtkTable.h:62
Allocate and hold a VTK object.
Definition: vtkNew.h:61
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...
Class for drawing an XY line plot given two columns from a vtkTable.
Definition: vtkPlotLine.h:31
virtual bool GetVisible()
Get the visibility of the item (should it be drawn).
#define max(a, b)