VTK
vtkPlotSurface.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkPlotSurface.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 
27 #ifndef vtkPlotSurface_h
28 #define vtkPlotSurface_h
29 
30 #include "vtkChartsCoreModule.h" // For export macro
31 #include "vtkNew.h" // For vtkNew ivar
32 #include "vtkPlot3D.h"
33 
34 class vtkContext2D;
35 class vtkLookupTable;
36 class vtkTable;
37 
39 {
40 public:
41  vtkTypeMacro(vtkPlotSurface, vtkPlot3D);
42  virtual void PrintSelf(ostream &os, vtkIndent indent);
43  static vtkPlotSurface * New();
44 
47  virtual bool Paint(vtkContext2D *painter);
48 
50  virtual void SetInputData(vtkTable *input);
51 
53 
55  virtual void SetInputData(vtkTable *input, const vtkStdString &xName,
56  const vtkStdString &yName,
57  const vtkStdString &zName);
58  virtual void SetInputData(vtkTable *input, const vtkStdString &xName,
59  const vtkStdString &yName,
60  const vtkStdString &zName,
61  const vtkStdString &colorName);
62  virtual void SetInputData(vtkTable *input, vtkIdType xColumn,
63  vtkIdType yColumn, vtkIdType zColumn);
65 
70  void SetXRange(float min, float max);
71 
76  void SetYRange(float min, float max);
77 
78 //BTX
79 protected:
81  ~vtkPlotSurface();
82 
84  void GenerateSurface();
85 
87  void InsertSurfaceVertex(float *data, float value, int i, int j, int &pos);
88 
90  void RescaleData();
91 
93  float ColumnToX(int columnIndex);
94 
96  float RowToY(int rowIndex);
97 
99  std::vector<vtkVector3f> Surface;
100 
103 
106 
109 
112 
115 
118 
121 
123 
124  float XMinimum;
125  float XMaximum;
126  float YMinimum;
127  float YMaximum;
129 
133 
134 private:
135  vtkPlotSurface(const vtkPlotSurface &); // Not implemented.
136  void operator=(const vtkPlotSurface &); // Not implemented.
137 
138 //ETX
139 };
140 
141 #endif //vtkPlotSurface_h
Wrapper around std::string to keep symbols short.
Definition: vtkStdString.h:46
virtual bool Paint(vtkContext2D *painter)
map scalar values into colors via a lookup table
int vtkIdType
Definition: vtkType.h:275
3D surface plot.
vtkTable * InputTable
vtkIdType NumberOfVertices
vtkNew< vtkUnsignedCharArray > Colors
std::vector< vtkVector3f > Surface
vtkIdType NumberOfColumns
virtual void PrintSelf(ostream &os, vtkIndent indent)
Class for drawing 2D primitives to a graphical context.
Definition: vtkContext2D.h:56
vtkNew< vtkLookupTable > LookupTable
a simple class to control print indentation
Definition: vtkIndent.h:38
vtkIdType NumberOfRows
virtual void SetInputData(vtkTable *input)
A table, which contains similar-typed columns of data.
Definition: vtkTable.h:67
Abstract class for 3D plots.
Definition: vtkPlot3D.h:43
static vtkObject * New()
#define max(a, b)
#define VTKCHARTSCORE_EXPORT