vtkMarchingContourFilter.h
Go to the documentation of this file.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
00084 #ifndef __vtkMarchingContourFilter_h
00085 #define __vtkMarchingContourFilter_h
00086
00087 #include "vtkDataSetToPolyDataFilter.h"
00088
00089 #include "vtkContourValues.h"
00090
00091 class vtkPointLocator;
00092 class vtkScalarTree;
00093
00094 class VTK_PATENTED_EXPORT vtkMarchingContourFilter : public vtkDataSetToPolyDataFilter
00095 {
00096 public:
00097 vtkTypeRevisionMacro(vtkMarchingContourFilter,vtkDataSetToPolyDataFilter);
00098 void PrintSelf(ostream& os, vtkIndent indent);
00099
00102 static vtkMarchingContourFilter *New();
00103
00105
00106 void SetValue(int i, double value);
00107 double GetValue(int i);
00108 double *GetValues();
00109 void GetValues(double *contourValues);
00110 void SetNumberOfContours(int number);
00111 int GetNumberOfContours();
00112 void GenerateValues(int numContours, double range[2]);
00113 void GenerateValues(int numContours, double rangeStart, double rangeEnd);
00115
00117 unsigned long GetMTime();
00118
00120
00124 vtkSetMacro(ComputeNormals,int);
00125 vtkGetMacro(ComputeNormals,int);
00126 vtkBooleanMacro(ComputeNormals,int);
00128
00130
00136 vtkSetMacro(ComputeGradients,int);
00137 vtkGetMacro(ComputeGradients,int);
00138 vtkBooleanMacro(ComputeGradients,int);
00140
00142
00143 vtkSetMacro(ComputeScalars,int);
00144 vtkGetMacro(ComputeScalars,int);
00145 vtkBooleanMacro(ComputeScalars,int);
00147
00149
00150 vtkSetMacro(UseScalarTree,int);
00151 vtkGetMacro(UseScalarTree,int);
00152 vtkBooleanMacro(UseScalarTree,int);
00154
00156
00158 void SetLocator(vtkPointLocator *locator);
00159 vtkGetObjectMacro(Locator,vtkPointLocator);
00161
00164 void CreateDefaultLocator();
00165
00166 protected:
00167 vtkMarchingContourFilter();
00168 ~vtkMarchingContourFilter();
00169
00170 void Execute();
00171
00172 vtkContourValues *ContourValues;
00173 int ComputeNormals;
00174 int ComputeGradients;
00175 int ComputeScalars;
00176 vtkPointLocator *Locator;
00177 int UseScalarTree;
00178 vtkScalarTree *ScalarTree;
00179
00180
00181 void StructuredPointsContour(int dim);
00182
00183 void ImageContour(int dim);
00184
00185 void DataSetContour();
00186 private:
00187 vtkMarchingContourFilter(const vtkMarchingContourFilter&);
00188 void operator=(const vtkMarchingContourFilter&);
00189 };
00190
00193 inline void vtkMarchingContourFilter::SetValue(int i, double value)
00194 {
00195 this->ContourValues->SetValue(i,value);
00196 }
00197
00199 inline double vtkMarchingContourFilter::GetValue(int i)
00200 {
00201 return this->ContourValues->GetValue(i);
00202 }
00203
00206 inline double *vtkMarchingContourFilter::GetValues()
00207 {
00208 return this->ContourValues->GetValues();
00209 }
00210
00214 inline void vtkMarchingContourFilter::GetValues(double *contourValues)
00215 {
00216 this->ContourValues->GetValues(contourValues);
00217 }
00218
00222 inline void vtkMarchingContourFilter::SetNumberOfContours(int number)
00223 {
00224 this->ContourValues->SetNumberOfContours(number);
00225 }
00226
00228 inline int vtkMarchingContourFilter::GetNumberOfContours()
00229 {
00230 return this->ContourValues->GetNumberOfContours();
00231 }
00232
00234
00236 inline void vtkMarchingContourFilter::GenerateValues(int numContours,
00237 double range[2])
00239 {
00240 this->ContourValues->GenerateValues(numContours, range);
00241 }
00242
00244
00246 inline void vtkMarchingContourFilter::GenerateValues(int numContours,
00247 double rangeStart,
00248 double rangeEnd)
00250 {
00251 this->ContourValues->GenerateValues(numContours, rangeStart, rangeEnd);
00252 }
00253
00254 #endif