00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00035 #ifndef __vtkMarchingCubes_h
00036 #define __vtkMarchingCubes_h
00037
00038 #include "vtkPolyDataAlgorithm.h"
00039
00040 #include "vtkContourValues.h"
00041
00042 class vtkPointLocator;
00043
00044 class VTK_GRAPHICS_EXPORT vtkMarchingCubes : public vtkPolyDataAlgorithm
00045 {
00046 public:
00047 static vtkMarchingCubes *New();
00048 vtkTypeRevisionMacro(vtkMarchingCubes,vtkPolyDataAlgorithm);
00049 void PrintSelf(ostream& os, vtkIndent indent);
00050
00051
00052 void SetValue(int i, double value);
00053 double GetValue(int i);
00054 double *GetValues();
00055 void GetValues(double *contourValues);
00056 void SetNumberOfContours(int number);
00057 int GetNumberOfContours();
00058 void GenerateValues(int numContours, double range[2]);
00059 void GenerateValues(int numContours, double rangeStart, double rangeEnd);
00060
00061
00062 unsigned long int GetMTime();
00063
00065
00069 vtkSetMacro(ComputeNormals,int);
00070 vtkGetMacro(ComputeNormals,int);
00071 vtkBooleanMacro(ComputeNormals,int);
00073
00075
00081 vtkSetMacro(ComputeGradients,int);
00082 vtkGetMacro(ComputeGradients,int);
00083 vtkBooleanMacro(ComputeGradients,int);
00085
00087
00088 vtkSetMacro(ComputeScalars,int);
00089 vtkGetMacro(ComputeScalars,int);
00090 vtkBooleanMacro(ComputeScalars,int);
00092
00094
00096 void SetLocator(vtkPointLocator *locator);
00097 vtkGetObjectMacro(Locator,vtkPointLocator);
00099
00102 void CreateDefaultLocator();
00103
00104 protected:
00105 vtkMarchingCubes();
00106 ~vtkMarchingCubes();
00107
00108 virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *);
00109 virtual int FillInputPortInformation(int port, vtkInformation *info);
00110
00111 vtkContourValues *ContourValues;
00112 int ComputeNormals;
00113 int ComputeGradients;
00114 int ComputeScalars;
00115 vtkPointLocator *Locator;
00116 private:
00117 vtkMarchingCubes(const vtkMarchingCubes&);
00118 void operator=(const vtkMarchingCubes&);
00119 };
00120
00123 inline void vtkMarchingCubes::SetValue(int i, double value)
00124 {this->ContourValues->SetValue(i,value);}
00125
00127
00128 inline double vtkMarchingCubes::GetValue(int i)
00129 {return this->ContourValues->GetValue(i);}
00131
00133
00135 inline double *vtkMarchingCubes::GetValues()
00136 {return this->ContourValues->GetValues();}
00138
00142 inline void vtkMarchingCubes::GetValues(double *contourValues)
00143 {this->ContourValues->GetValues(contourValues);}
00144
00148 inline void vtkMarchingCubes::SetNumberOfContours(int number)
00149 {this->ContourValues->SetNumberOfContours(number);}
00150
00152
00153 inline int vtkMarchingCubes::GetNumberOfContours()
00154 {return this->ContourValues->GetNumberOfContours();}
00156
00158
00160 inline void vtkMarchingCubes::GenerateValues(int numContours, double range[2])
00161 {this->ContourValues->GenerateValues(numContours, range);}
00163
00165
00167 inline void vtkMarchingCubes::GenerateValues(int numContours, double
00168 rangeStart, double rangeEnd)
00169 {this->ContourValues->GenerateValues(numContours, rangeStart, rangeEnd);}
00171
00172 #endif