00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00076 #ifndef __vtkMarchingCubes_h
00077 #define __vtkMarchingCubes_h
00078
00079 #include "vtkStructuredPointsToPolyDataFilter.h"
00080 #include "vtkContourValues.h"
00081
00082 class VTK_EXPORT vtkMarchingCubes : public vtkStructuredPointsToPolyDataFilter
00083 {
00084 public:
00085 static vtkMarchingCubes *New();
00086 vtkTypeMacro(vtkMarchingCubes,vtkStructuredPointsToPolyDataFilter);
00087 void PrintSelf(ostream& os, vtkIndent indent);
00088
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);
00098
00099
00100 unsigned long int GetMTime();
00101
00106 vtkSetMacro(ComputeNormals,int);
00107 vtkGetMacro(ComputeNormals,int);
00108 vtkBooleanMacro(ComputeNormals,int);
00109
00116 vtkSetMacro(ComputeGradients,int);
00117 vtkGetMacro(ComputeGradients,int);
00118 vtkBooleanMacro(ComputeGradients,int);
00119
00121 vtkSetMacro(ComputeScalars,int);
00122 vtkGetMacro(ComputeScalars,int);
00123 vtkBooleanMacro(ComputeScalars,int);
00124
00125 void SetLocator(vtkPointLocator *locator);
00126 vtkGetObjectMacro(Locator,vtkPointLocator);
00127
00130 void CreateDefaultLocator();
00131
00132 #ifndef VTK_REMOVE_LEGACY_CODE
00133
00134 void SetLocator(vtkPointLocator& locator)
00135 {VTK_LEGACY_METHOD(SetLocator,"3.2"); this->SetLocator(&locator);}
00136 #endif
00137
00138 protected:
00139 vtkMarchingCubes();
00140 ~vtkMarchingCubes();
00141 vtkMarchingCubes(const vtkMarchingCubes&) {};
00142 void operator=(const vtkMarchingCubes&) {};
00143
00144 void Execute();
00145
00146 vtkContourValues *ContourValues;
00147 int ComputeNormals;
00148 int ComputeGradients;
00149 int ComputeScalars;
00150 vtkPointLocator *Locator;
00151 };
00152
00155 inline void vtkMarchingCubes::SetValue(int i, float value)
00156 {this->ContourValues->SetValue(i,value);}
00157
00159 inline float vtkMarchingCubes::GetValue(int i)
00160 {return this->ContourValues->GetValue(i);}
00161
00164 inline float *vtkMarchingCubes::GetValues()
00165 {return this->ContourValues->GetValues();}
00166
00170 inline void vtkMarchingCubes::GetValues(float *contourValues)
00171 {this->ContourValues->GetValues(contourValues);}
00172
00176 inline void vtkMarchingCubes::SetNumberOfContours(int number)
00177 {this->ContourValues->SetNumberOfContours(number);}
00178
00180 inline int vtkMarchingCubes::GetNumberOfContours()
00181 {return this->ContourValues->GetNumberOfContours();}
00182
00185 inline void vtkMarchingCubes::GenerateValues(int numContours, float range[2])
00186 {this->ContourValues->GenerateValues(numContours, range);}
00187
00190 inline void vtkMarchingCubes::GenerateValues(int numContours, float
00191 rangeStart, float rangeEnd)
00192 {this->ContourValues->GenerateValues(numContours, rangeStart, rangeEnd);}
00193
00194 #endif
00195
00196