VTK
/Users/kitware/Dashboards/MyTests/VTK_BLD_Release_docs/Utilities/Doxygen/dox/Filters/Core/vtkContourGrid.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkContourGrid.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 =========================================================================*/
00051 #ifndef vtkContourGrid_h
00052 #define vtkContourGrid_h
00053 
00054 #include "vtkFiltersCoreModule.h" // For export macro
00055 #include "vtkPolyDataAlgorithm.h"
00056 
00057 #include "vtkContourValues.h" // Needed for inline methods
00058 
00059 class vtkEdgeTable;
00060 class vtkScalarTree;
00061 class vtkIncrementalPointLocator;
00062 
00063 class VTKFILTERSCORE_EXPORT vtkContourGrid : public vtkPolyDataAlgorithm
00064 {
00065 public:
00066   vtkTypeMacro(vtkContourGrid,vtkPolyDataAlgorithm);
00067   void PrintSelf(ostream& os, vtkIndent indent);
00068 
00071   static vtkContourGrid *New();
00072 
00074 
00075   void SetValue(int i, double value);
00076   double GetValue(int i);
00077   double *GetValues();
00078   void GetValues(double *contourValues);
00079   void SetNumberOfContours(int number);
00080   int GetNumberOfContours();
00081   void GenerateValues(int numContours, double range[2]);
00082   void GenerateValues(int numContours, double rangeStart, double rangeEnd);
00084 
00086   unsigned long GetMTime();
00087 
00089 
00093   vtkSetMacro(ComputeNormals,int);
00094   vtkGetMacro(ComputeNormals,int);
00095   vtkBooleanMacro(ComputeNormals,int);
00097 
00099 
00106   vtkSetMacro(ComputeGradients,int);
00107   vtkGetMacro(ComputeGradients,int);
00108   vtkBooleanMacro(ComputeGradients,int);
00110 
00112 
00113   vtkSetMacro(ComputeScalars,int);
00114   vtkGetMacro(ComputeScalars,int);
00115   vtkBooleanMacro(ComputeScalars,int);
00117 
00119 
00120   vtkSetMacro(UseScalarTree,int);
00121   vtkGetMacro(UseScalarTree,int);
00122   vtkBooleanMacro(UseScalarTree,int);
00124 
00126 
00128   void SetLocator(vtkIncrementalPointLocator *locator);
00129   vtkGetObjectMacro(Locator,vtkIncrementalPointLocator);
00131 
00132 
00134 
00138   vtkSetMacro(GenerateTriangles,int);
00139   vtkGetMacro(GenerateTriangles,int);
00140   vtkBooleanMacro(GenerateTriangles,int);
00142 
00143 
00146   void CreateDefaultLocator();
00147 
00149 
00152   void SetOutputPointsPrecision(int precision);
00153   int GetOutputPointsPrecision() const;
00155 
00156 protected:
00157   vtkContourGrid();
00158   ~vtkContourGrid();
00159 
00160   virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *);
00161   virtual int FillInputPortInformation(int port, vtkInformation *info);
00162 
00163   vtkContourValues *ContourValues;
00164   int ComputeNormals;
00165   int ComputeGradients;
00166   int ComputeScalars;
00167   int GenerateTriangles;
00168 
00169   vtkIncrementalPointLocator *Locator;
00170   int UseScalarTree;
00171   int OutputPointsPrecision;
00172   vtkScalarTree *ScalarTree;
00173   vtkEdgeTable *EdgeTable;
00174 
00175 private:
00176   vtkContourGrid(const vtkContourGrid&);  // Not implemented.
00177   void operator=(const vtkContourGrid&);  // Not implemented.
00178 };
00179 
00181 
00183 inline void vtkContourGrid::SetValue(int i, double value)
00184 {this->ContourValues->SetValue(i,value);}
00186 
00188 
00189 inline double vtkContourGrid::GetValue(int i)
00190 {return this->ContourValues->GetValue(i);}
00192 
00194 
00196 inline double *vtkContourGrid::GetValues()
00197 {return this->ContourValues->GetValues();}
00199 
00201 
00204 inline void vtkContourGrid::GetValues(double *contourValues)
00205 {this->ContourValues->GetValues(contourValues);}
00207 
00209 
00212 inline void vtkContourGrid::SetNumberOfContours(int number)
00213 {this->ContourValues->SetNumberOfContours(number);}
00215 
00217 
00218 inline int vtkContourGrid::GetNumberOfContours()
00219 {return this->ContourValues->GetNumberOfContours();}
00221 
00223 
00225 inline void vtkContourGrid::GenerateValues(int numContours, double range[2])
00226 {this->ContourValues->GenerateValues(numContours, range);}
00228 
00230 
00232 inline void vtkContourGrid::GenerateValues(int numContours, double
00233                                              rangeStart, double rangeEnd)
00234 {this->ContourValues->GenerateValues(numContours, rangeStart, rangeEnd);}
00236 
00237 
00238 #endif
00239 
00240