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 
35 #ifndef vtkPlotFunctionalBag_h
36 #define vtkPlotFunctionalBag_h
37 
38 #include "vtkChartsCoreModule.h" // For export macro
39 #include "vtkPlot.h"
40 #include "vtkNew.h" // Needed to hold SP ivars
41 
42 class vtkDataArray;
43 class vtkPlotFuntionalBagInternal;
44 class vtkPlotLine;
45 class vtkPoints2D;
46 class vtkScalarsToColors;
47 
48 class VTKCHARTSCORE_EXPORT vtkPlotFunctionalBag : public vtkPlot
49 {
50 public:
51  vtkTypeMacro(vtkPlotFunctionalBag, vtkPlot);
52  void PrintSelf(ostream &os, vtkIndent indent) VTK_OVERRIDE;
53 
57  static vtkPlotFunctionalBag *New();
58 
63  virtual bool IsBag();
64 
68  bool GetVisible() VTK_OVERRIDE;
69 
75  void Update() VTK_OVERRIDE;
76 
80  bool Paint(vtkContext2D *painter) VTK_OVERRIDE;
81 
88  bool PaintLegend(vtkContext2D *painter, const vtkRectf& rect,
89  int legendIndex) VTK_OVERRIDE;
90 
94  void GetBounds(double bounds[4]) VTK_OVERRIDE;
95 
100  void GetUnscaledInputBounds(double bounds[4]) VTK_OVERRIDE;
101 
103 
106  void SetLookupTable(vtkScalarsToColors *lut);
107  vtkScalarsToColors *GetLookupTable();
109 
114  virtual void CreateDefaultLookupTable();
115 
121  vtkIdType GetNearestPoint(const vtkVector2f& point,
122  const vtkVector2f& tolerance,
123  vtkVector2f* location) VTK_OVERRIDE;
124 
128  bool SelectPoints(const vtkVector2f& min, const vtkVector2f& max) VTK_OVERRIDE;
129 
133  bool SelectPointsInPolygon(const vtkContextPolygon &polygon) VTK_OVERRIDE;
134 
135 protected:
137  ~vtkPlotFunctionalBag() VTK_OVERRIDE;
138 
142  bool GetDataArrays(vtkTable *table, vtkDataArray *array[2]);
143 
147  bool UpdateTableCache(vtkTable*);
148 
153 
157  vtkScalarsToColors *LookupTable;
158 
163 
167  vtkNew<vtkPoints2D> BagPoints;
168 
169  bool LogX, LogY;
170 
171 private:
172  vtkPlotFunctionalBag(const vtkPlotFunctionalBag &) VTK_DELETE_FUNCTION;
173  void operator=(const vtkPlotFunctionalBag &) VTK_DELETE_FUNCTION;
174 };
175 
176 #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:35
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:58
a simple class to control print indentation
Definition: vtkIndent.h:39
represent and manipulate 2D points
Definition: vtkPoints2D.h:36
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:54
Abstract class for 2D plots.
Definition: vtkPlot.h:52
A table, which contains similar-typed columns of data.
Definition: vtkTable.h:68
Allocate and hold a VTK object.
Definition: vtkNew.h:67
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:34
virtual bool GetVisible()
Get the visibility of the item (should it be drawn).
#define max(a, b)