VTK
vtkPlotPoints.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkPlotPoints.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 vtkPlotPoints_h
33 #define vtkPlotPoints_h
34 
35 #include "vtkChartsCoreModule.h" // For export macro
36 #include "vtkPlot.h"
37 #include "vtkScalarsToColors.h" // For VTK_COLOR_MODE_DEFAULT and _MAP_SCALARS
38 #include "vtkStdString.h" // For color array name
39 #include "vtkNew.h" // For ivars
40 #include "vtkRenderingCoreEnums.h" // For marker enum
41 
42 class vtkCharArray;
43 class vtkContext2D;
44 class vtkTable;
45 class vtkPoints2D;
46 class vtkFloatArray;
47 class vtkStdString;
48 class vtkImageData;
49 class vtkScalarsToColors;
51 
53 {
54 public:
56  virtual void PrintSelf(ostream &os, vtkIndent indent);
57 
59  static vtkPlotPoints *New();
60 
64  virtual void Update();
65 
68  virtual bool Paint(vtkContext2D *painter);
69 
71 
76  virtual bool PaintLegend(vtkContext2D *painter, const vtkRectf& rect,
77  int legendIndex);
79 
81  virtual void GetBounds(double bounds[4]);
82 
85  virtual void GetUnscaledInputBounds(double bounds[4]);
86 
88 
89  void SetLookupTable(vtkScalarsToColors *lut);
90  vtkScalarsToColors *GetLookupTable();
92 
95  virtual void CreateDefaultLookupTable();
96 
98 
100  vtkSetMacro(ScalarVisibility,int);
101  vtkGetMacro(ScalarVisibility,int);
102  vtkBooleanMacro(ScalarVisibility,int);
104 
106 
109  void SelectColorArray(vtkIdType arrayNum);
110  void SelectColorArray(const vtkStdString& arrayName);
112 
114  vtkStdString GetColorArrayName();
115 
116 //BTX
118 
122  const vtkVector2f& tolerance,
125 
127  virtual bool SelectPoints(const vtkVector2f& min, const vtkVector2f& max);
128 
130  virtual bool SelectPointsInPolygon(const vtkContextPolygon &polygon);
131 
133 
134  enum {
141  };
142 //ETX
144 
146 
148  vtkGetMacro(MarkerStyle, int);
149  vtkSetMacro(MarkerStyle, int);
151 
153 
156  vtkGetMacro(MarkerSize, float);
157  vtkSetMacro(MarkerSize, float);
159 
161 
162  vtkGetMacro(ValidPointMaskName, vtkStdString)
163  vtkSetMacro(ValidPointMaskName, vtkStdString)
165 
166 //BTX
167 protected:
168  vtkPlotPoints();
169  ~vtkPlotPoints();
170 
172  bool GetDataArrays(vtkTable *table, vtkDataArray *array[2]);
173 
175  bool UpdateTableCache(vtkTable *table);
176 
178  void CalculateUnscaledInputBounds();
179 
183  void CalculateLogSeries();
184 
188  void FindBadPoints();
189 
191  void CalculateBounds(double bounds[4]);
192 
194  void CreateSortedPoints();
195 
197 
201 
203 
204  class VectorPIMPL;
205  VectorPIMPL* Sorted;
207 
211 
215 
218 
221 
223 
225  float MarkerSize;
227 
228  bool LogX, LogY;
229 
231 
237 
239  double UnscaledInputBounds[4];
240 
241 private:
242  vtkPlotPoints(const vtkPlotPoints &); // Not implemented.
243  void operator=(const vtkPlotPoints &); // Not implemented.
244 
245 // #define VTK_COLOR_MODE_DEFAULT 0
246 // #define VTK_COLOR_MODE_MAP_SCALARS 1
247 //ETX
248 };
249 
250 #endif //vtkPlotPoints_h
Wrapper around std::string to keep symbols short.
Definition: vtkStdString.h:46
vtkCharArray * ValidPointMask
virtual bool PaintLegend(vtkContext2D *painter, const vtkRectf &rect, int legendIndex)
virtual bool Paint(vtkContext2D *painter)
#define vtkGetMacro(name, type)
Definition: vtkSetGet.h:93
Class for drawing an points given two columns from a vtkTable.
Definition: vtkPlotPoints.h:52
record modification and/or execution time
Definition: vtkTimeStamp.h:34
dynamic, self-adjusting array of float
Definition: vtkFloatArray.h:45
virtual void GetBounds(double bounds[4])
Definition: vtkPlot.h:276
dynamic, self-adjusting array of vtkIdType
int vtkIdType
Definition: vtkType.h:275
#define vtkTypeMacro(thisClass, superclass)
Definition: vtkSetGet.h:642
Superclass for mapping scalar values to colors.
dynamic, self-adjusting array of char
Definition: vtkCharArray.h:42
Class for drawing 2D primitives to a graphical context.
Definition: vtkContext2D.h:56
vtkStdString ColorArrayName
virtual bool SelectPoints(const vtkVector2f &min, const vtkVector2f &max)
a simple class to control print indentation
Definition: vtkIndent.h:38
vtkStdString ValidPointMaskName
represent and manipulate 2D points
Definition: vtkPoints2D.h:35
topologically and geometrically regular array of data
Definition: vtkImageData.h:44
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:54
Abstract class for 2D plots.
Definition: vtkPlot.h:51
vtkUnsignedCharArray * Colors
dynamic, self-adjusting array of unsigned char
virtual vtkIdType GetNearestPoint(const vtkVector2f &point, const vtkVector2f &tolerance, vtkVector2f *location)
virtual bool SelectPointsInPolygon(const vtkContextPolygon &polygon)
vtkScalarsToColors * LookupTable
A table, which contains similar-typed columns of data.
Definition: vtkTable.h:67
vtkNew< vtkFloatArray > SelectedPoints
virtual void GetUnscaledInputBounds(double bounds[4])
Definition: vtkPlot.h:295
virtual void PrintSelf(ostream &os, vtkIndent indent)
vtkPoints2D * Points
#define vtkBooleanMacro(name, type)
Definition: vtkSetGet.h:244
static vtkObject * New()
vtkTimeStamp BuildTime
virtual void Update()
VectorPIMPL * Sorted
#define max(a, b)
#define VTKCHARTSCORE_EXPORT
#define vtkSetMacro(name, type)
Definition: vtkSetGet.h:79
vtkIdTypeArray * BadPoints