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
00097 #ifndef __vtkMarchingContourFilter_h
00098 #define __vtkMarchingContourFilter_h
00099
00100 #include "vtkDataSetToPolyDataFilter.h"
00101 #include "vtkContourValues.h"
00102
00103 class vtkScalarTree;
00104
00105 class VTK_EXPORT vtkMarchingContourFilter : public vtkDataSetToPolyDataFilter
00106 {
00107 public:
00108 vtkTypeMacro(vtkMarchingContourFilter,vtkDataSetToPolyDataFilter);
00109 void PrintSelf(ostream& os, vtkIndent indent);
00110
00113 static vtkMarchingContourFilter *New();
00114
00116 void SetValue(int i, float value);
00117 float GetValue(int i);
00118 float *GetValues();
00119 void GetValues(float *contourValues);
00120 void SetNumberOfContours(int number);
00121 int GetNumberOfContours();
00122 void GenerateValues(int numContours, float range[2]);
00123 void GenerateValues(int numContours, float rangeStart, float rangeEnd);
00124
00126 unsigned long GetMTime();
00127
00132 vtkSetMacro(ComputeNormals,int);
00133 vtkGetMacro(ComputeNormals,int);
00134 vtkBooleanMacro(ComputeNormals,int);
00135
00142 vtkSetMacro(ComputeGradients,int);
00143 vtkGetMacro(ComputeGradients,int);
00144 vtkBooleanMacro(ComputeGradients,int);
00145
00147 vtkSetMacro(ComputeScalars,int);
00148 vtkGetMacro(ComputeScalars,int);
00149 vtkBooleanMacro(ComputeScalars,int);
00150
00152 vtkSetMacro(UseScalarTree,int);
00153 vtkGetMacro(UseScalarTree,int);
00154 vtkBooleanMacro(UseScalarTree,int);
00155
00158 void SetLocator(vtkPointLocator *locator);
00159 vtkGetObjectMacro(Locator,vtkPointLocator);
00160
00163 void CreateDefaultLocator();
00164
00165 #ifndef VTK_REMOVE_LEGACY_CODE
00166
00167 void SetLocator(vtkPointLocator& locator)
00168 {VTK_LEGACY_METHOD(SetLocator,"3.2"); this->SetLocator(&locator);}
00169 #endif
00170
00171 protected:
00172 vtkMarchingContourFilter();
00173 ~vtkMarchingContourFilter();
00174 vtkMarchingContourFilter(const vtkMarchingContourFilter&) {};
00175 void operator=(const vtkMarchingContourFilter&) {};
00176
00177 void Execute();
00178
00179 vtkContourValues *ContourValues;
00180 int ComputeNormals;
00181 int ComputeGradients;
00182 int ComputeScalars;
00183 vtkPointLocator *Locator;
00184 int UseScalarTree;
00185 vtkScalarTree *ScalarTree;
00186
00187
00188 void StructuredPointsContour(int dim);
00189
00190 void ImageContour(int dim);
00191
00192 void DataSetContour();
00193 };
00194
00197 inline void vtkMarchingContourFilter::SetValue(int i, float value)
00198 {this->ContourValues->SetValue(i,value);}
00199
00201 inline float vtkMarchingContourFilter::GetValue(int i)
00202 {return this->ContourValues->GetValue(i);}
00203
00206 inline float *vtkMarchingContourFilter::GetValues()
00207 {return this->ContourValues->GetValues();}
00208
00212 inline void vtkMarchingContourFilter::GetValues(float *contourValues)
00213 {this->ContourValues->GetValues(contourValues);}
00214
00218 inline void vtkMarchingContourFilter::SetNumberOfContours(int number)
00219 {this->ContourValues->SetNumberOfContours(number);}
00220
00222 inline int vtkMarchingContourFilter::GetNumberOfContours()
00223 {return this->ContourValues->GetNumberOfContours();}
00224
00227 inline void vtkMarchingContourFilter::GenerateValues(int numContours, float range[2])
00228 {this->ContourValues->GenerateValues(numContours, range);}
00229
00232 inline void vtkMarchingContourFilter::GenerateValues(int numContours, float
00233 rangeStart, float rangeEnd)
00234 {this->ContourValues->GenerateValues(numContours, rangeStart, rangeEnd);}
00235
00236
00237 #endif
00238
00239