VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkPlot3D.h 00005 00006 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen 00007 All rights reserved. 00008 See Copyright.txt or http://www.kitware.com/Copyright.htm for details. 00009 00010 This software is distributed WITHOUT ANY WARRANTY; without even 00011 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00012 PURPOSE. See the above copyright notice for more information. 00013 00014 =========================================================================*/ 00015 00026 #ifndef __vtkPlot3D_h 00027 #define __vtkPlot3D_h 00028 00029 #include "vtkChartsCoreModule.h" // For export macro 00030 #include "vtkContextItem.h" 00031 #include "vtkNew.h" // Needed to hold vtkNew ivars 00032 #include "vtkSmartPointer.h" // Needed to hold SP ivars 00033 #include "vtkVector.h" // For Points ivar 00034 #include <vector> // For ivars 00035 00036 class vtkChartXYZ; 00037 class vtkDataArray; 00038 class vtkIdTypeArray; 00039 class vtkTable; 00040 class vtkUnsignedCharArray; 00041 class vtkPen; 00042 00043 class VTKCHARTSCORE_EXPORT vtkPlot3D : public vtkContextItem 00044 { 00045 public: 00046 vtkTypeMacro(vtkPlot3D, vtkContextItem); 00047 virtual void PrintSelf(ostream &os, vtkIndent indent); 00048 00050 00052 void SetPen(vtkPen *pen); 00053 vtkPen* GetPen(); 00055 00057 00058 virtual void SetInputData(vtkTable *input); 00059 virtual void SetInputData(vtkTable *input, const vtkStdString &xName, 00060 const vtkStdString &yName, 00061 const vtkStdString &zName); 00062 virtual void SetInputData(vtkTable *input, const vtkStdString &xName, 00063 const vtkStdString &yName, 00064 const vtkStdString &zName, 00065 const vtkStdString &colorName); 00066 virtual void SetInputData(vtkTable *input, vtkIdType xColumn, 00067 vtkIdType yColumn, vtkIdType zColumn); 00069 00074 virtual void SetColors(vtkDataArray *colorArr); 00075 00077 std::vector<vtkVector3f> GetPoints(); 00078 00080 00081 vtkGetObjectMacro(Chart, vtkChartXYZ); 00082 virtual void SetChart(vtkChartXYZ* chart); 00084 00086 std::string GetXAxisLabel(); 00087 00089 std::string GetYAxisLabel(); 00090 00092 std::string GetZAxisLabel(); 00093 00095 std::vector<vtkVector3f> GetDataBounds() { return this->DataBounds; } 00096 00098 00099 virtual void SetSelection(vtkIdTypeArray *id); 00100 virtual vtkIdTypeArray* GetSelection(); 00102 00103 //BTX 00104 protected: 00105 vtkPlot3D(); 00106 ~vtkPlot3D(); 00107 00109 virtual void ComputeDataBounds(); 00110 00112 vtkSmartPointer<vtkPen> Pen; 00113 00115 vtkNew<vtkUnsignedCharArray> Colors; 00116 00120 int NumberOfComponents; 00121 00123 std::string XAxisLabel; 00124 00126 std::string YAxisLabel; 00127 00129 std::string ZAxisLabel; 00130 00132 std::vector<vtkVector3f> Points; 00133 00135 vtkTimeStamp PointsBuildTime; 00136 00138 vtkChartXYZ* Chart; 00139 00141 std::vector<vtkVector3f> DataBounds; 00142 00144 vtkSmartPointer<vtkIdTypeArray> Selection; 00145 00146 private: 00147 vtkPlot3D(const vtkPlot3D &); // Not implemented. 00148 void operator=(const vtkPlot3D &); // Not implemented. 00149 00150 //ETX 00151 }; 00152 00153 #endif //__vtkPlot3D_h