Main Page | Directories | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

vtkContourGrid.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkContourGrid.h,v $
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 =========================================================================*/
00063 #ifndef __vtkContourGrid_h
00064 #define __vtkContourGrid_h
00065 
00066 #include "vtkUnstructuredGridToPolyDataFilter.h"
00067 
00068 #include "vtkContourValues.h" // Needed for inline methods
00069 
00070 class vtkEdgeTable;
00071 class vtkPointLocator;
00072 class vtkScalarTree;
00073 
00074 class VTK_GRAPHICS_EXPORT vtkContourGrid : public vtkUnstructuredGridToPolyDataFilter
00075 {
00076 public:
00077   vtkTypeRevisionMacro(vtkContourGrid,vtkUnstructuredGridToPolyDataFilter);
00078   void PrintSelf(ostream& os, vtkIndent indent);
00079 
00082   static vtkContourGrid *New();
00083 
00085 
00086   void SetValue(int i, double value);
00087   double GetValue(int i);
00088   double *GetValues();
00089   void GetValues(double *contourValues);
00090   void SetNumberOfContours(int number);
00091   int GetNumberOfContours();
00092   void GenerateValues(int numContours, double range[2]);
00093   void GenerateValues(int numContours, double rangeStart, double rangeEnd);
00095 
00097   unsigned long GetMTime();
00098 
00100 
00104   vtkSetMacro(ComputeNormals,int);
00105   vtkGetMacro(ComputeNormals,int);
00106   vtkBooleanMacro(ComputeNormals,int);
00108 
00110 
00116   vtkSetMacro(ComputeGradients,int);
00117   vtkGetMacro(ComputeGradients,int);
00118   vtkBooleanMacro(ComputeGradients,int);
00120 
00122 
00123   vtkSetMacro(ComputeScalars,int);
00124   vtkGetMacro(ComputeScalars,int);
00125   vtkBooleanMacro(ComputeScalars,int);
00127 
00129 
00130   vtkSetMacro(UseScalarTree,int);
00131   vtkGetMacro(UseScalarTree,int);
00132   vtkBooleanMacro(UseScalarTree,int);
00134 
00136 
00138   void SetLocator(vtkPointLocator *locator);
00139   vtkGetObjectMacro(Locator,vtkPointLocator);
00141 
00144   void CreateDefaultLocator();
00145 
00147 
00150   vtkGetStringMacro(InputScalarsSelection);
00151   void SelectInputScalars(const char *fieldName) 
00152     {this->SetInputScalarsSelection(fieldName);}
00154 
00155 protected:
00156   vtkContourGrid();
00157   ~vtkContourGrid();
00158 
00159   void Execute();
00160 
00161   vtkContourValues *ContourValues;
00162   int ComputeNormals;
00163   int ComputeGradients;
00164   int ComputeScalars;
00165   vtkPointLocator *Locator;
00166   int UseScalarTree;
00167   vtkScalarTree *ScalarTree;
00168   vtkEdgeTable *EdgeTable;
00169   
00170   char *InputScalarsSelection;
00171   vtkSetStringMacro(InputScalarsSelection);
00172 
00173 private:
00174   vtkContourGrid(const vtkContourGrid&);  // Not implemented.
00175   void operator=(const vtkContourGrid&);  // Not implemented.
00176 };
00177 
00180 inline void vtkContourGrid::SetValue(int i, double value)
00181 {this->ContourValues->SetValue(i,value);}
00182 
00184 
00185 inline double vtkContourGrid::GetValue(int i)
00186 {return this->ContourValues->GetValue(i);}
00188 
00190 
00192 inline double *vtkContourGrid::GetValues()
00193 {return this->ContourValues->GetValues();}
00195 
00199 inline void vtkContourGrid::GetValues(double *contourValues)
00200 {this->ContourValues->GetValues(contourValues);}
00201 
00205 inline void vtkContourGrid::SetNumberOfContours(int number)
00206 {this->ContourValues->SetNumberOfContours(number);}
00207 
00209 
00210 inline int vtkContourGrid::GetNumberOfContours()
00211 {return this->ContourValues->GetNumberOfContours();}
00213 
00215 
00217 inline void vtkContourGrid::GenerateValues(int numContours, double range[2])
00218 {this->ContourValues->GenerateValues(numContours, range);}
00220 
00222 
00224 inline void vtkContourGrid::GenerateValues(int numContours, double
00225                                              rangeStart, double rangeEnd)
00226 {this->ContourValues->GenerateValues(numContours, rangeStart, rangeEnd);}
00228 
00229 
00230 #endif
00231 
00232