VTK
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 =========================================================================*/
00048 #ifndef __vtkContourGrid_h
00049 #define __vtkContourGrid_h
00050 
00051 #include "vtkFiltersCoreModule.h" // For export macro
00052 #include "vtkPolyDataAlgorithm.h"
00053 
00054 #include "vtkContourValues.h" // Needed for inline methods
00055 
00056 class vtkEdgeTable;
00057 class vtkScalarTree;
00058 class vtkIncrementalPointLocator;
00059 
00060 class VTKFILTERSCORE_EXPORT vtkContourGrid : public vtkPolyDataAlgorithm
00061 {
00062 public:
00063   vtkTypeMacro(vtkContourGrid,vtkPolyDataAlgorithm);
00064   void PrintSelf(ostream& os, vtkIndent indent);
00065 
00068   static vtkContourGrid *New();
00069 
00071 
00072   void SetValue(int i, double value);
00073   double GetValue(int i);
00074   double *GetValues();
00075   void GetValues(double *contourValues);
00076   void SetNumberOfContours(int number);
00077   int GetNumberOfContours();
00078   void GenerateValues(int numContours, double range[2]);
00079   void GenerateValues(int numContours, double rangeStart, double rangeEnd);
00081 
00083   unsigned long GetMTime();
00084 
00086 
00090   vtkSetMacro(ComputeNormals,int);
00091   vtkGetMacro(ComputeNormals,int);
00092   vtkBooleanMacro(ComputeNormals,int);
00094 
00096 
00103   vtkSetMacro(ComputeGradients,int);
00104   vtkGetMacro(ComputeGradients,int);
00105   vtkBooleanMacro(ComputeGradients,int);
00107 
00109 
00110   vtkSetMacro(ComputeScalars,int);
00111   vtkGetMacro(ComputeScalars,int);
00112   vtkBooleanMacro(ComputeScalars,int);
00114 
00116 
00117   vtkSetMacro(UseScalarTree,int);
00118   vtkGetMacro(UseScalarTree,int);
00119   vtkBooleanMacro(UseScalarTree,int);
00121 
00123 
00125   void SetLocator(vtkIncrementalPointLocator *locator);
00126   vtkGetObjectMacro(Locator,vtkIncrementalPointLocator);
00128 
00129 
00131 
00135   vtkSetMacro(GenerateTriangles,int);
00136   vtkGetMacro(GenerateTriangles,int);
00137   vtkBooleanMacro(GenerateTriangles,int);
00139 
00140 
00143   void CreateDefaultLocator();
00144 
00146 
00149   void SetOutputPointsPrecision(int precision);
00150   int GetOutputPointsPrecision() const;
00152 
00153 protected:
00154   vtkContourGrid();
00155   ~vtkContourGrid();
00156 
00157   virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *);
00158   virtual int FillInputPortInformation(int port, vtkInformation *info);
00159 
00160   vtkContourValues *ContourValues;
00161   int ComputeNormals;
00162   int ComputeGradients;
00163   int ComputeScalars;
00164   int GenerateTriangles;
00165 
00166   vtkIncrementalPointLocator *Locator;
00167   int UseScalarTree;
00168   int OutputPointsPrecision;
00169   vtkScalarTree *ScalarTree;
00170   vtkEdgeTable *EdgeTable;
00171 
00172 private:
00173   vtkContourGrid(const vtkContourGrid&);  // Not implemented.
00174   void operator=(const vtkContourGrid&);  // Not implemented.
00175 };
00176 
00178 
00180 inline void vtkContourGrid::SetValue(int i, double value)
00181 {this->ContourValues->SetValue(i,value);}
00183 
00185 
00186 inline double vtkContourGrid::GetValue(int i)
00187 {return this->ContourValues->GetValue(i);}
00189 
00191 
00193 inline double *vtkContourGrid::GetValues()
00194 {return this->ContourValues->GetValues();}
00196 
00198 
00201 inline void vtkContourGrid::GetValues(double *contourValues)
00202 {this->ContourValues->GetValues(contourValues);}
00204 
00206 
00209 inline void vtkContourGrid::SetNumberOfContours(int number)
00210 {this->ContourValues->SetNumberOfContours(number);}
00212 
00214 
00215 inline int vtkContourGrid::GetNumberOfContours()
00216 {return this->ContourValues->GetNumberOfContours();}
00218 
00220 
00222 inline void vtkContourGrid::GenerateValues(int numContours, double range[2])
00223 {this->ContourValues->GenerateValues(numContours, range);}
00225 
00227 
00229 inline void vtkContourGrid::GenerateValues(int numContours, double
00230                                              rangeStart, double rangeEnd)
00231 {this->ContourValues->GenerateValues(numContours, rangeStart, rangeEnd);}
00233 
00234 
00235 #endif
00236 
00237