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
00054
00084 #ifndef __vtkMarchingSquares_h
00085 #define __vtkMarchingSquares_h
00086
00087 #include "vtkPolyDataSource.h"
00088 #include "vtkImageData.h"
00089 #include "vtkContourValues.h"
00090
00091 class VTK_PATENTED_EXPORT vtkMarchingSquares : public vtkPolyDataSource
00092 {
00093 public:
00094 static vtkMarchingSquares *New();
00095 vtkTypeMacro(vtkMarchingSquares,vtkPolyDataSource);
00096 void PrintSelf(ostream& os, vtkIndent indent);
00097
00099
00100 void SetInput(vtkImageData *input);
00101 vtkImageData *GetInput();
00103
00105
00109 vtkSetVectorMacro(ImageRange,int,6);
00110 vtkGetVectorMacro(ImageRange,int,6);
00111 void SetImageRange(int imin, int imax, int jmin, int jmax,
00112 int kmin, int kmax);
00114
00115
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
00125
00126 unsigned long int GetMTime();
00127
00128 void SetLocator(vtkPointLocator *locator);
00129 vtkGetObjectMacro(Locator,vtkPointLocator);
00130
00133 void CreateDefaultLocator();
00134
00135 protected:
00136 vtkMarchingSquares();
00137 ~vtkMarchingSquares();
00138
00139 void Execute();
00140
00141 vtkContourValues *ContourValues;
00142 int ImageRange[6];
00143 vtkPointLocator *Locator;
00144 private:
00145 vtkMarchingSquares(const vtkMarchingSquares&);
00146 void operator=(const vtkMarchingSquares&);
00147 };
00148
00151 inline void vtkMarchingSquares::SetValue(int i, float value)
00152 {this->ContourValues->SetValue(i,value);}
00153
00155
00156 inline float vtkMarchingSquares::GetValue(int i)
00157 {return this->ContourValues->GetValue(i);}
00159
00161
00163 inline float *vtkMarchingSquares::GetValues()
00164 {return this->ContourValues->GetValues();}
00166
00170 inline void vtkMarchingSquares::GetValues(float *contourValues)
00171 {this->ContourValues->GetValues(contourValues);}
00172
00176 inline void vtkMarchingSquares::SetNumberOfContours(int number)
00177 {this->ContourValues->SetNumberOfContours(number);}
00178
00180
00181 inline int vtkMarchingSquares::GetNumberOfContours()
00182 {return this->ContourValues->GetNumberOfContours();}
00184
00186
00188 inline void vtkMarchingSquares::GenerateValues(int numContours, float range[2])
00189 {this->ContourValues->GenerateValues(numContours, range);}
00191
00193
00195 inline void vtkMarchingSquares::GenerateValues(int numContours, float
00196 rangeStart, float rangeEnd)
00197 {this->ContourValues->GenerateValues(numContours, rangeStart, rangeEnd);}
00199
00200 #endif
00201