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 "vtkPlot.h"
36 #include "vtkScalarsToColors.h" // For VTK_COLOR_MODE_DEFAULT and _MAP_SCALARS
37 #include "vtkStdString.h" // For color array name
38 
39 class vtkContext2D;
40 class vtkTable;
41 class vtkPoints2D;
42 class vtkStdString;
43 class vtkImageData;
44 class vtkScalarsToColors;
46 
48 {
49 public:
50  vtkTypeMacro(vtkPlotPoints, vtkPlot);
51  virtual void PrintSelf(ostream &os, vtkIndent indent);
52 
54  static vtkPlotPoints *New();
55 
59  virtual void Update();
60 
63  virtual bool Paint(vtkContext2D *painter);
64 
66 
71  virtual bool PaintLegend(vtkContext2D *painter, const vtkRectf& rect,
72  int legendIndex);
74 
76  virtual void GetBounds(double bounds[4]);
77 
79 
80  void SetLookupTable(vtkScalarsToColors *lut);
81  vtkScalarsToColors *GetLookupTable();
83 
86  virtual void CreateDefaultLookupTable();
87 
89 
91  vtkSetMacro(ScalarVisibility,int);
92  vtkGetMacro(ScalarVisibility,int);
93  vtkBooleanMacro(ScalarVisibility,int);
95 
97 
100  void SelectColorArray(vtkIdType arrayNum);
101  void SelectColorArray(const vtkStdString& arrayName);
103 
105  vtkStdString GetColorArrayName();
106 
107 //BTX
109 
112  virtual vtkIdType GetNearestPoint(const vtkVector2f& point,
113  const vtkVector2f& tolerance,
114  vtkVector2f* location);
116 
118  virtual bool SelectPoints(const vtkVector2f& min, const vtkVector2f& max);
119 
121 
122  enum {
123  NONE = 0,
128  DIAMOND
129  };
130 //ETX
132 
134 
136  vtkGetMacro(MarkerStyle, int);
137  vtkSetMacro(MarkerStyle, int);
139 
141 
144  vtkGetMacro(MarkerSize, float);
145  vtkSetMacro(MarkerSize, float);
147 
148 //BTX
149 protected:
150  vtkPlotPoints();
151  ~vtkPlotPoints();
152 
154  void GeneraterMarker(int width, bool highlight = false);
155 
157  bool UpdateTableCache(vtkTable *table);
158 
162  void CalculateLogSeries();
163 
167  void FindBadPoints();
168 
170  void CalculateBounds(double bounds[4]);
171 
173  void CreateSortedPoints();
174 
177 
179 
180  class VectorPIMPL;
181  VectorPIMPL* Sorted;
183 
187 
190 
192 
194  float MarkerSize;
198 
199  bool LogX, LogY;
200 
202 
208 
209 private:
210  vtkPlotPoints(const vtkPlotPoints &); // Not implemented.
211  void operator=(const vtkPlotPoints &); // Not implemented.
212 
213 // #define VTK_COLOR_MODE_DEFAULT 0
214 // #define VTK_COLOR_MODE_MAP_SCALARS 1
215 //ETX
216 };
217 
218 #endif //__vtkPlotPoints_h
#define VTK_CHARTS_EXPORT
Wrapper around vtkstd::string to keep symbols short.
Definition: vtkStdString.h:45
vtkImageData * Marker
vtkImageData * HighlightMarker
virtual bool PaintLegend(vtkContext2D *painter, const vtkRectf &rect, int legendIndex)
virtual bool Paint(vtkContext2D *painter)
Class for drawing an points given two columns from a vtkTable.
Definition: vtkPlotPoints.h:47
record modification and/or execution time
Definition: vtkTimeStamp.h:33
virtual void GetBounds(double bounds[4])
Definition: vtkPlot.h:213
dynamic, self-adjusting array of vtkIdType
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
vtkStdString ColorArrayName
virtual bool SelectPoints(const vtkVector2f &min, const vtkVector2f &max)
a simple class to control print indentation
Definition: vtkIndent.h:37
represent and manipulate 2D points
Definition: vtkPoints2D.h:34
topologically and geometrically regular array of data
Definition: vtkImageData.h:43
Abstract class for 2D plots.
Definition: vtkPlot.h:50
vtkUnsignedCharArray * Colors
dynamic, self-adjusting array of unsigned char
virtual vtkIdType GetNearestPoint(const vtkVector2f &point, const vtkVector2f &tolerance, vtkVector2f *location)
vtkScalarsToColors * LookupTable
virtual void PrintSelf(ostream &os, vtkIndent indent)
vtkPoints2D * Points
static vtkObject * New()
vtkTimeStamp BuildTime
virtual void Update()
VectorPIMPL * Sorted
vtkIdTypeArray * BadPoints