Patented/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
00072 #ifndef __vtkMarchingContourFilter_h
00073 #define __vtkMarchingContourFilter_h
00074
00075 #include "vtkDataSetToPolyDataFilter.h"
00076
00077 #include "vtkContourValues.h"
00078
00079 class vtkPointLocator;
00080 class vtkScalarTree;
00081
00082 class VTK_PATENTED_EXPORT vtkMarchingContourFilter : public vtkDataSetToPolyDataFilter
00083 {
00084 public:
00085 vtkTypeRevisionMacro(vtkMarchingContourFilter,vtkDataSetToPolyDataFilter);
00086 void PrintSelf(ostream& os, vtkIndent indent);
00087
00090 static vtkMarchingContourFilter *New();
00091
00093
00094 void SetValue(int i, double value);
00095 double GetValue(int i);
00096 double *GetValues();
00097 void GetValues(double *contourValues);
00098 void SetNumberOfContours(int number);
00099 int GetNumberOfContours();
00100 void GenerateValues(int numContours, double range[2]);
00101 void GenerateValues(int numContours, double rangeStart, double rangeEnd);
00103
00105 unsigned long GetMTime();
00106
00108
00112 vtkSetMacro(ComputeNormals,int);
00113 vtkGetMacro(ComputeNormals,int);
00114 vtkBooleanMacro(ComputeNormals,int);
00116
00118
00124 vtkSetMacro(ComputeGradients,int);
00125 vtkGetMacro(ComputeGradients,int);
00126 vtkBooleanMacro(ComputeGradients,int);
00128
00130
00131 vtkSetMacro(ComputeScalars,int);
00132 vtkGetMacro(ComputeScalars,int);
00133 vtkBooleanMacro(ComputeScalars,int);
00135
00137
00138 vtkSetMacro(UseScalarTree,int);
00139 vtkGetMacro(UseScalarTree,int);
00140 vtkBooleanMacro(UseScalarTree,int);
00142
00144
00146 void SetLocator(vtkPointLocator *locator);
00147 vtkGetObjectMacro(Locator,vtkPointLocator);
00149
00152 void CreateDefaultLocator();
00153
00154 protected:
00155 vtkMarchingContourFilter();
00156 ~vtkMarchingContourFilter();
00157
00158 void Execute();
00159
00160 vtkContourValues *ContourValues;
00161 int ComputeNormals;
00162 int ComputeGradients;
00163 int ComputeScalars;
00164 vtkPointLocator *Locator;
00165 int UseScalarTree;
00166 vtkScalarTree *ScalarTree;
00167
00168
00169 void StructuredPointsContour(int dim);
00170
00171 void ImageContour(int dim);
00172
00173 void DataSetContour();
00174 private:
00175 vtkMarchingContourFilter(const vtkMarchingContourFilter&);
00176 void operator=(const vtkMarchingContourFilter&);
00177 };
00178
00181 inline void vtkMarchingContourFilter::SetValue(int i, double value)
00182 {
00183 this->ContourValues->SetValue(i,value);
00184 }
00185
00187 inline double vtkMarchingContourFilter::GetValue(int i)
00188 {
00189 return this->ContourValues->GetValue(i);
00190 }
00191
00194 inline double *vtkMarchingContourFilter::GetValues()
00195 {
00196 return this->ContourValues->GetValues();
00197 }
00198
00202 inline void vtkMarchingContourFilter::GetValues(double *contourValues)
00203 {
00204 this->ContourValues->GetValues(contourValues);
00205 }
00206
00210 inline void vtkMarchingContourFilter::SetNumberOfContours(int number)
00211 {
00212 this->ContourValues->SetNumberOfContours(number);
00213 }
00214
00216 inline int vtkMarchingContourFilter::GetNumberOfContours()
00217 {
00218 return this->ContourValues->GetNumberOfContours();
00219 }
00220
00222
00224 inline void vtkMarchingContourFilter::GenerateValues(int numContours,
00225 double range[2])
00227 {
00228 this->ContourValues->GenerateValues(numContours, range);
00229 }
00230
00232
00234 inline void vtkMarchingContourFilter::GenerateValues(int numContours,
00235 double rangeStart,
00236 double rangeEnd)
00238 {
00239 this->ContourValues->GenerateValues(numContours, rangeStart, rangeEnd);
00240 }
00241
00242 #endif