VTK
/Users/kitware/Dashboards/MyTests/VTK_BLD_Release_docs/Utilities/Doxygen/dox/Charts/Core/vtkPlot3D.h
Go to the documentation of this file.
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 
00059   void SetSelectionPen(vtkPen *pen);
00060   vtkPen* GetSelectionPen();
00062 
00064 
00065   virtual void SetInputData(vtkTable *input);
00066   virtual void SetInputData(vtkTable *input, const vtkStdString &xName,
00067                             const vtkStdString &yName,
00068                             const vtkStdString &zName);
00069   virtual void SetInputData(vtkTable *input, const vtkStdString &xName,
00070                             const vtkStdString &yName,
00071                             const vtkStdString &zName,
00072                             const vtkStdString &colorName);
00073   virtual void SetInputData(vtkTable *input, vtkIdType xColumn,
00074                             vtkIdType yColumn, vtkIdType zColumn);
00076 
00081   virtual void SetColors(vtkDataArray *colorArr);
00082 
00084   std::vector<vtkVector3f> GetPoints();
00085 
00087 
00088   vtkGetObjectMacro(Chart, vtkChartXYZ);
00089   virtual void SetChart(vtkChartXYZ* chart);
00091 
00093   std::string GetXAxisLabel();
00094 
00096   std::string GetYAxisLabel();
00097 
00099   std::string GetZAxisLabel();
00100 
00102   std::vector<vtkVector3f> GetDataBounds() { return this->DataBounds; }
00103 
00105 
00106   virtual void SetSelection(vtkIdTypeArray *id);
00107   virtual vtkIdTypeArray* GetSelection();
00109 
00110 //BTX
00111 protected:
00112   vtkPlot3D();
00113   ~vtkPlot3D();
00114 
00116   virtual void ComputeDataBounds();
00117 
00119   vtkSmartPointer<vtkPen> Pen;
00120 
00122   vtkSmartPointer<vtkPen> SelectionPen;
00123 
00125   vtkNew<vtkUnsignedCharArray> Colors;
00126 
00130   int NumberOfComponents;
00131 
00133   std::string XAxisLabel;
00134 
00136   std::string YAxisLabel;
00137 
00139   std::string ZAxisLabel;
00140 
00142   std::vector<vtkVector3f> Points;
00143 
00145   vtkTimeStamp PointsBuildTime;
00146 
00148   vtkChartXYZ* Chart;
00149 
00151   std::vector<vtkVector3f> DataBounds;
00152 
00154   vtkSmartPointer<vtkIdTypeArray> Selection;
00155 
00156 private:
00157   vtkPlot3D(const vtkPlot3D &); // Not implemented.
00158   void operator=(const vtkPlot3D &); // Not implemented.
00159 
00160 //ETX
00161 };
00162 
00163 #endif //vtkPlot3D_h