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

Graphics/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 =========================================================================*/
00051 #ifndef __vtkContourGrid_h
00052 #define __vtkContourGrid_h
00053 
00054 #include "vtkUnstructuredGridToPolyDataFilter.h"
00055 
00056 #include "vtkContourValues.h" // Needed for inline methods
00057 
00058 class vtkEdgeTable;
00059 class vtkPointLocator;
00060 class vtkScalarTree;
00061 
00062 class VTK_GRAPHICS_EXPORT vtkContourGrid : public vtkUnstructuredGridToPolyDataFilter
00063 {
00064 public:
00065   vtkTypeRevisionMacro(vtkContourGrid,vtkUnstructuredGridToPolyDataFilter);
00066   void PrintSelf(ostream& os, vtkIndent indent);
00067 
00070   static vtkContourGrid *New();
00071 
00073 
00074   void SetValue(int i, double value);
00075   double GetValue(int i);
00076   double *GetValues();
00077   void GetValues(double *contourValues);
00078   void SetNumberOfContours(int number);
00079   int GetNumberOfContours();
00080   void GenerateValues(int numContours, double range[2]);
00081   void GenerateValues(int numContours, double rangeStart, double rangeEnd);
00083 
00085   unsigned long GetMTime();
00086 
00088 
00092   vtkSetMacro(ComputeNormals,int);
00093   vtkGetMacro(ComputeNormals,int);
00094   vtkBooleanMacro(ComputeNormals,int);
00096 
00098 
00104   vtkSetMacro(ComputeGradients,int);
00105   vtkGetMacro(ComputeGradients,int);
00106   vtkBooleanMacro(ComputeGradients,int);
00108 
00110 
00111   vtkSetMacro(ComputeScalars,int);
00112   vtkGetMacro(ComputeScalars,int);
00113   vtkBooleanMacro(ComputeScalars,int);
00115 
00117 
00118   vtkSetMacro(UseScalarTree,int);
00119   vtkGetMacro(UseScalarTree,int);
00120   vtkBooleanMacro(UseScalarTree,int);
00122 
00124 
00126   void SetLocator(vtkPointLocator *locator);
00127   vtkGetObjectMacro(Locator,vtkPointLocator);
00129 
00132   void CreateDefaultLocator();
00133 
00135 
00138   vtkGetStringMacro(InputScalarsSelection);
00139   void SelectInputScalars(const char *fieldName) 
00140     {this->SetInputScalarsSelection(fieldName);}
00142 
00143 protected:
00144   vtkContourGrid();
00145   ~vtkContourGrid();
00146 
00147   void Execute();
00148 
00149   vtkContourValues *ContourValues;
00150   int ComputeNormals;
00151   int ComputeGradients;
00152   int ComputeScalars;
00153   vtkPointLocator *Locator;
00154   int UseScalarTree;
00155   vtkScalarTree *ScalarTree;
00156   vtkEdgeTable *EdgeTable;
00157   
00158   char *InputScalarsSelection;
00159   vtkSetStringMacro(InputScalarsSelection);
00160 
00161 private:
00162   vtkContourGrid(const vtkContourGrid&);  // Not implemented.
00163   void operator=(const vtkContourGrid&);  // Not implemented.
00164 };
00165 
00168 inline void vtkContourGrid::SetValue(int i, double value)
00169 {this->ContourValues->SetValue(i,value);}
00170 
00172 
00173 inline double vtkContourGrid::GetValue(int i)
00174 {return this->ContourValues->GetValue(i);}
00176 
00178 
00180 inline double *vtkContourGrid::GetValues()
00181 {return this->ContourValues->GetValues();}
00183 
00187 inline void vtkContourGrid::GetValues(double *contourValues)
00188 {this->ContourValues->GetValues(contourValues);}
00189 
00193 inline void vtkContourGrid::SetNumberOfContours(int number)
00194 {this->ContourValues->SetNumberOfContours(number);}
00195 
00197 
00198 inline int vtkContourGrid::GetNumberOfContours()
00199 {return this->ContourValues->GetNumberOfContours();}
00201 
00203 
00205 inline void vtkContourGrid::GenerateValues(int numContours, double range[2])
00206 {this->ContourValues->GenerateValues(numContours, range);}
00208 
00210 
00212 inline void vtkContourGrid::GenerateValues(int numContours, double
00213                                              rangeStart, double rangeEnd)
00214 {this->ContourValues->GenerateValues(numContours, rangeStart, rangeEnd);}
00216 
00217 
00218 #endif
00219 
00220