Graphics/vtkContourGrid.h Source File

Main Page Class Hierarchy Alphabetical List Compound List File List Compound 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   Language:  C++
    00006
    00007   Copyright (c) 1993-2002 Ken Martin, Will Schroeder, Bill Lorensen
    00008   All rights reserved.
    00009   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
    00010
    00011      This software is distributed WITHOUT ANY WARRANTY; without even
    00012      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
    00013      PURPOSE.  See the above copyright notice for more information.
    00014
    00015 =========================================================================*/
    00067 #ifndef __vtkContourGrid_h
    00068 #define __vtkContourGrid_h
    00069
    00070 #include "vtkUnstructuredGridToPolyDataFilter.h"
    00071
    00072 #include "vtkContourValues.h" // Needed for inline methods
    00073
    00074 class vtkEdgeTable;
    00075 class vtkPointLocator;
    00076 class vtkScalarTree;
    00077
    00078 class VTK_GRAPHICS_EXPORT vtkContourGrid : public vtkUnstructuredGridToPolyDataFilter
    00079 {
    00080 public:
    00081   vtkTypeRevisionMacro(vtkContourGrid,vtkUnstructuredGridToPolyDataFilter);
    00082   void PrintSelf(ostream& os, vtkIndent indent);
    00083
    00086   static vtkContourGrid *New();
    00087
    00089
    00090   void SetValue(int i, float value);
    00091   float GetValue(int i);
    00092   float *GetValues();
    00093   void GetValues(float *contourValues);
    00094   void SetNumberOfContours(int number);
    00095   int GetNumberOfContours();
    00096   void GenerateValues(int numContours, float range[2]);
    00097   void GenerateValues(int numContours, float rangeStart, float rangeEnd);
    00099
    00101   unsigned long GetMTime();
    00102
    00104
    00108   vtkSetMacro(ComputeNormals,int);
    00109   vtkGetMacro(ComputeNormals,int);
    00110   vtkBooleanMacro(ComputeNormals,int);
    00112
    00114
    00120   vtkSetMacro(ComputeGradients,int);
    00121   vtkGetMacro(ComputeGradients,int);
    00122   vtkBooleanMacro(ComputeGradients,int);
    00124
    00126
    00127   vtkSetMacro(ComputeScalars,int);
    00128   vtkGetMacro(ComputeScalars,int);
    00129   vtkBooleanMacro(ComputeScalars,int);
    00131
    00133
    00134   vtkSetMacro(UseScalarTree,int);
    00135   vtkGetMacro(UseScalarTree,int);
    00136   vtkBooleanMacro(UseScalarTree,int);
    00138
    00140
    00142   void SetLocator(vtkPointLocator *locator);
    00143   vtkGetObjectMacro(Locator,vtkPointLocator);
    00145
    00148   void CreateDefaultLocator();
    00149
    00150 protected:
    00151   vtkContourGrid();
    00152   ~vtkContourGrid();
    00153
    00154 //BTX
    00155
    00156   // This is temporary solution. The vtkContourFilter must be able
    00157   // to call SelectInputScalars().
    00158   friend class vtkContourFilter;
    00159
    00161
    00164   vtkGetStringMacro(InputScalarsSelection);
    00165   void SelectInputScalars(const char *fieldName)
    00166     {this->SetInputScalarsSelection(fieldName);}
    00168
    00169 //ETX
    00170
    00171   void Execute();
    00172
    00173   vtkContourValues *ContourValues;
    00174   int ComputeNormals;
    00175   int ComputeGradients;
    00176   int ComputeScalars;
    00177   vtkPointLocator *Locator;
    00178   int UseScalarTree;
    00179   vtkScalarTree *ScalarTree;
    00180   vtkEdgeTable *EdgeTable;
    00181
    00182   char *InputScalarsSelection;
    00183   vtkSetStringMacro(InputScalarsSelection);
    00184
    00185 private:
    00186   vtkContourGrid(const vtkContourGrid&);  // Not implemented.
    00187   void operator=(const vtkContourGrid&);  // Not implemented.
    00188 };
    00189
    00192 inline void vtkContourGrid::SetValue(int i, float value)
    00193 {this->ContourValues->SetValue(i,value);}
    00194
    00196
    00197 inline float vtkContourGrid::GetValue(int i)
    00198 {return this->ContourValues->GetValue(i);}
    00200
    00202
    00204 inline float *vtkContourGrid::GetValues()
    00205 {return this->ContourValues->GetValues();}
    00207
    00211 inline void vtkContourGrid::GetValues(float *contourValues)
    00212 {this->ContourValues->GetValues(contourValues);}
    00213
    00217 inline void vtkContourGrid::SetNumberOfContours(int number)
    00218 {this->ContourValues->SetNumberOfContours(number);}
    00219
    00221
    00222 inline int vtkContourGrid::GetNumberOfContours()
    00223 {return this->ContourValues->GetNumberOfContours();}
    00225
    00227
    00229 inline void vtkContourGrid::GenerateValues(int numContours, float range[2])
    00230 {this->ContourValues->GenerateValues(numContours, range);}
    00232
    00234
    00236 inline void vtkContourGrid::GenerateValues(int numContours, float
    00237                                              rangeStart, float rangeEnd)
    00238 {this->ContourValues->GenerateValues(numContours, rangeStart, rangeEnd);}
    00240
    00241
    00242 #endif
    00243
    00244