VTK
vtkPlot3D.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkPlot3D.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 vtkPlot3D_h
28 #define vtkPlot3D_h
29 
30 #include "vtkChartsCoreModule.h" // For export macro
31 #include "vtkContextItem.h"
32 #include "vtkNew.h" // Needed to hold vtkNew ivars
33 #include "vtkSmartPointer.h" // Needed to hold SP ivars
34 #include "vtkVector.h" // For Points ivar
35 #include <vector> // For ivars
36 
37 class vtkChartXYZ;
38 class vtkDataArray;
39 class vtkIdTypeArray;
40 class vtkTable;
42 class vtkPen;
43 
44 class VTKCHARTSCORE_EXPORT vtkPlot3D : public vtkContextItem
45 {
46 public:
47  vtkTypeMacro(vtkPlot3D, vtkContextItem);
48  virtual void PrintSelf(ostream &os, vtkIndent indent);
49 
51 
54  void SetPen(vtkPen *pen);
57 
59 
62  void SetSelectionPen(vtkPen *pen);
65 
67 
70  virtual void SetInputData(vtkTable *input);
71  virtual void SetInputData(vtkTable *input, const vtkStdString &xName,
72  const vtkStdString &yName,
73  const vtkStdString &zName);
74  virtual void SetInputData(vtkTable *input, const vtkStdString &xName,
75  const vtkStdString &yName,
76  const vtkStdString &zName,
77  const vtkStdString &colorName);
78  virtual void SetInputData(vtkTable *input, vtkIdType xColumn,
79  vtkIdType yColumn, vtkIdType zColumn);
81 
87  virtual void SetColors(vtkDataArray *colorArr);
88 
92  std::vector<vtkVector3f> GetPoints();
93 
95 
98  vtkGetObjectMacro(Chart, vtkChartXYZ);
99  virtual void SetChart(vtkChartXYZ* chart);
101 
106 
111 
116 
120  std::vector<vtkVector3f> GetDataBounds() { return this->DataBounds; }
121 
123 
126  virtual void SetSelection(vtkIdTypeArray *id);
129 
130 protected:
133 
137  virtual void ComputeDataBounds();
138 
143 
148 
153 
159 
164 
169 
174 
178  std::vector<vtkVector3f> Points;
179 
184 
189 
193  std::vector<vtkVector3f> DataBounds;
194 
199 
200 private:
201  vtkPlot3D(const vtkPlot3D &) VTK_DELETE_FUNCTION;
202  void operator=(const vtkPlot3D &) VTK_DELETE_FUNCTION;
203 
204 };
205 
206 #endif //vtkPlot3D_h
vtkPlot3D::SetInputData
virtual void SetInputData(vtkTable *input)
Set the input to the plot.
vtkPlot3D::PointsBuildTime
vtkTimeStamp PointsBuildTime
When the points were last built.
Definition: vtkPlot3D.h:183
vtkPlot3D::GetPoints
std::vector< vtkVector3f > GetPoints()
Get all the data points within this plot.
vtkPlot3D::Chart
vtkChartXYZ * Chart
The chart containing this plot.
Definition: vtkPlot3D.h:188
vtkIdType
int vtkIdType
Definition: vtkType.h:287
vtkTable
A table, which contains similar-typed columns of data.
Definition: vtkTable.h:69
vtkTimeStamp
record modification and/or execution time
Definition: vtkTimeStamp.h:36
vtkChartXYZ
Factory class for drawing 3D XYZ charts.
Definition: vtkChartXYZ.h:49
vtkUnsignedCharArray
dynamic, self-adjusting array of unsigned char
Definition: vtkUnsignedCharArray.h:42
vtkSmartPointer< vtkPen >
vtkPlot3D::GetXAxisLabel
std::string GetXAxisLabel()
Get the label for the X axis.
vtkVector.h
vtkPlot3D::GetSelection
virtual vtkIdTypeArray * GetSelection()
vtkPlot3D::SetSelectionPen
void SetSelectionPen(vtkPen *pen)
Set/get the vtkPen object that controls how this plot draws (out)lines.
vtkPlot3D::PrintSelf
virtual void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
vtkDataArray
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:55
vtkPlot3D::SetInputData
virtual void SetInputData(vtkTable *input, vtkIdType xColumn, vtkIdType yColumn, vtkIdType zColumn)
vtkContextItem.h
vtkPlot3D::GetZAxisLabel
std::string GetZAxisLabel()
Get the label for the Z axis.
vtkPlot3D::vtkPlot3D
vtkPlot3D()
vtkPlot3D::XAxisLabel
std::string XAxisLabel
The label for the X Axis.
Definition: vtkPlot3D.h:163
vtkPlot3D::SetSelection
virtual void SetSelection(vtkIdTypeArray *id)
Set/get the selection array for the plot.
vtkPlot3D::NumberOfComponents
int NumberOfComponents
Number of components in our color vectors.
Definition: vtkPlot3D.h:158
vtkPlot3D::ZAxisLabel
std::string ZAxisLabel
The label for the Z Axis.
Definition: vtkPlot3D.h:173
vtkPlot3D::GetYAxisLabel
std::string GetYAxisLabel()
Get the label for the Y axis.
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:40
vtkSmartPointer.h
vtkPlot3D::Colors
vtkNew< vtkUnsignedCharArray > Colors
This array assigns a color to each datum in the plot.
Definition: vtkPlot3D.h:152
vtkPlot3D::SetColors
virtual void SetColors(vtkDataArray *colorArr)
Set the color of each point in the plot.
vtkPlot3D::SelectionPen
vtkSmartPointer< vtkPen > SelectionPen
This object stores the vtkPen that controls how the plot is drawn.
Definition: vtkPlot3D.h:147
vtkPlot3D::Points
std::vector< vtkVector3f > Points
The data points read in during SetInputData().
Definition: vtkPlot3D.h:178
vtkNew< vtkUnsignedCharArray >
vtkPlot3D::SetInputData
virtual void SetInputData(vtkTable *input, const vtkStdString &xName, const vtkStdString &yName, const vtkStdString &zName)
vtkPlot3D::GetPen
vtkPen * GetPen()
vtkPlot3D::YAxisLabel
std::string YAxisLabel
The label for the Y Axis.
Definition: vtkPlot3D.h:168
vtkContextItem
base class for items that are part of a vtkContextScene.
Definition: vtkContextItem.h:35
vtkPlot3D
Abstract class for 3D plots.
Definition: vtkPlot3D.h:45
vtkPlot3D::GetSelectionPen
vtkPen * GetSelectionPen()
vtkX3D::string
@ string
Definition: vtkX3D.h:490
vtkIdTypeArray
dynamic, self-adjusting array of vtkIdType
Definition: vtkIdTypeArray.h:42
vtkNew.h
vtkPlot3D::SetChart
virtual void SetChart(vtkChartXYZ *chart)
vtkPlot3D::SetPen
void SetPen(vtkPen *pen)
Set/get the vtkPen object that controls how this plot draws (out)lines.
vtkPlot3D::GetDataBounds
std::vector< vtkVector3f > GetDataBounds()
Get the bounding cube surrounding the currently rendered data points.
Definition: vtkPlot3D.h:120
vtkPlot3D::~vtkPlot3D
~vtkPlot3D()
vtkPen
provides a pen that draws the outlines of shapes drawn by vtkContext2D.
Definition: vtkPen.h:40
vtkStdString
Wrapper around std::string to keep symbols short.
Definition: vtkStdString.h:49
vtkPlot3D::ComputeDataBounds
virtual void ComputeDataBounds()
Generate a bounding cube for our data.
vtkPlot3D::Pen
vtkSmartPointer< vtkPen > Pen
This object stores the vtkPen that controls how the plot is drawn.
Definition: vtkPlot3D.h:142
vtkPlot3D::DataBounds
std::vector< vtkVector3f > DataBounds
A bounding cube surrounding the currently rendered data points.
Definition: vtkPlot3D.h:193
vtkPlot3D::SetInputData
virtual void SetInputData(vtkTable *input, const vtkStdString &xName, const vtkStdString &yName, const vtkStdString &zName, const vtkStdString &colorName)
vtkPlot3D::Selection
vtkSmartPointer< vtkIdTypeArray > Selection
Selected indices for the table the plot is rendering.
Definition: vtkPlot3D.h:198