00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00038 #ifndef __vtkMarchingCubes_h
00039 #define __vtkMarchingCubes_h
00040
00041 #include "vtkPolyDataAlgorithm.h"
00042
00043 #include "vtkContourValues.h"
00044
00045 class vtkIncrementalPointLocator;
00046
00047 class VTK_GRAPHICS_EXPORT vtkMarchingCubes : public vtkPolyDataAlgorithm
00048 {
00049 public:
00050 static vtkMarchingCubes *New();
00051 vtkTypeMacro(vtkMarchingCubes,vtkPolyDataAlgorithm);
00052 void PrintSelf(ostream& os, vtkIndent indent);
00053
00054
00055 void SetValue(int i, double value);
00056 double GetValue(int i);
00057 double *GetValues();
00058 void GetValues(double *contourValues);
00059 void SetNumberOfContours(int number);
00060 int GetNumberOfContours();
00061 void GenerateValues(int numContours, double range[2]);
00062 void GenerateValues(int numContours, double rangeStart, double rangeEnd);
00063
00064
00065 unsigned long int GetMTime();
00066
00068
00072 vtkSetMacro(ComputeNormals,int);
00073 vtkGetMacro(ComputeNormals,int);
00074 vtkBooleanMacro(ComputeNormals,int);
00076
00078
00084 vtkSetMacro(ComputeGradients,int);
00085 vtkGetMacro(ComputeGradients,int);
00086 vtkBooleanMacro(ComputeGradients,int);
00088
00090
00091 vtkSetMacro(ComputeScalars,int);
00092 vtkGetMacro(ComputeScalars,int);
00093 vtkBooleanMacro(ComputeScalars,int);
00095
00097
00099 void SetLocator(vtkIncrementalPointLocator *locator);
00100 vtkGetObjectMacro(Locator,vtkIncrementalPointLocator);
00102
00105 void CreateDefaultLocator();
00106
00107 protected:
00108 vtkMarchingCubes();
00109 ~vtkMarchingCubes();
00110
00111 virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *);
00112 virtual int FillInputPortInformation(int port, vtkInformation *info);
00113
00114 vtkContourValues *ContourValues;
00115 int ComputeNormals;
00116 int ComputeGradients;
00117 int ComputeScalars;
00118 vtkIncrementalPointLocator *Locator;
00119 private:
00120 vtkMarchingCubes(const vtkMarchingCubes&);
00121 void operator=(const vtkMarchingCubes&);
00122 };
00123
00125
00127 inline void vtkMarchingCubes::SetValue(int i, double value)
00128 {this->ContourValues->SetValue(i,value);}
00130
00132
00133 inline double vtkMarchingCubes::GetValue(int i)
00134 {return this->ContourValues->GetValue(i);}
00136
00138
00140 inline double *vtkMarchingCubes::GetValues()
00141 {return this->ContourValues->GetValues();}
00143
00145
00148 inline void vtkMarchingCubes::GetValues(double *contourValues)
00149 {this->ContourValues->GetValues(contourValues);}
00151
00153
00156 inline void vtkMarchingCubes::SetNumberOfContours(int number)
00157 {this->ContourValues->SetNumberOfContours(number);}
00159
00161
00162 inline int vtkMarchingCubes::GetNumberOfContours()
00163 {return this->ContourValues->GetNumberOfContours();}
00165
00167
00169 inline void vtkMarchingCubes::GenerateValues(int numContours, double range[2])
00170 {this->ContourValues->GenerateValues(numContours, range);}
00172
00174
00176 inline void vtkMarchingCubes::GenerateValues(int numContours, double
00177 rangeStart, double rangeEnd)
00178 {this->ContourValues->GenerateValues(numContours, rangeStart, rangeEnd);}
00180
00181 #endif