00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00031 #ifndef __vtkHyperOctreeSampleFunction_h
00032 #define __vtkHyperOctreeSampleFunction_h
00033
00034 #include "vtkHyperOctreeAlgorithm.h"
00035
00036 class vtkImplicitFunction;
00037
00038 class VTK_GRAPHICS_EXPORT vtkHyperOctreeSampleFunction : public vtkHyperOctreeAlgorithm
00039 {
00040 public:
00041 vtkTypeMacro(vtkHyperOctreeSampleFunction,vtkHyperOctreeAlgorithm);
00042 void PrintSelf(ostream& os, vtkIndent indent);
00043
00044 static vtkHyperOctreeSampleFunction *New();
00045
00048 int GetLevels();
00049
00054 void SetLevels(int levels);
00055
00058 int GetMinLevels();
00059
00063 void SetMinLevels(int minLevels);
00064
00067 double GetThreshold();
00068
00072 void SetThreshold(double threshold);
00073
00077 int GetDimension();
00078
00079
00080
00081
00082 void SetDimension(int dim);
00083
00085
00086 vtkSetVector3Macro(Size,double);
00088
00090
00091 vtkGetVector3Macro(Size,double);
00093
00095
00096 vtkSetVector3Macro(Origin,double);
00097
00098 vtkGetVector3Macro(Origin,double);
00100
00102 double GetWidth();
00103
00106 void SetWidth(double width);
00107
00110 double GetHeight();
00111
00115 void SetHeight(double height);
00116
00119 double GetDepth();
00120
00124 void SetDepth(double depth);
00125
00127
00128 virtual void SetImplicitFunction(vtkImplicitFunction*);
00129 vtkGetObjectMacro(ImplicitFunction,vtkImplicitFunction);
00131
00133
00134 vtkSetMacro(OutputScalarType,int);
00135 vtkGetMacro(OutputScalarType,int);
00136 void SetOutputScalarTypeToDouble()
00137 {this->SetOutputScalarType(VTK_DOUBLE);}
00138 void SetOutputScalarTypeToFloat()
00139 {this->SetOutputScalarType(VTK_FLOAT);}
00140 void SetOutputScalarTypeToLong()
00141 {this->SetOutputScalarType(VTK_LONG);}
00142 void SetOutputScalarTypeToUnsignedLong()
00143 {this->SetOutputScalarType(VTK_UNSIGNED_LONG);};
00144 void SetOutputScalarTypeToInt()
00145 {this->SetOutputScalarType(VTK_INT);}
00146 void SetOutputScalarTypeToUnsignedInt()
00147 {this->SetOutputScalarType(VTK_UNSIGNED_INT);}
00148 void SetOutputScalarTypeToShort()
00149 {this->SetOutputScalarType(VTK_SHORT);}
00150 void SetOutputScalarTypeToUnsignedShort()
00151 {this->SetOutputScalarType(VTK_UNSIGNED_SHORT);}
00152 void SetOutputScalarTypeToChar()
00153 {this->SetOutputScalarType(VTK_CHAR);}
00154 void SetOutputScalarTypeToUnsignedChar()
00155 {this->SetOutputScalarType(VTK_UNSIGNED_CHAR);}
00157
00159 unsigned long GetMTime();
00160
00161 protected:
00163
00166 vtkHyperOctreeSampleFunction();
00167 ~vtkHyperOctreeSampleFunction();
00169
00170
00171 int RequestInformation (vtkInformation * vtkNotUsed(request),
00172 vtkInformationVector ** vtkNotUsed( inputVector ),
00173 vtkInformationVector *outputVector);
00174
00175 virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *);
00176
00177 void Subdivide(vtkHyperOctreeCursor *cursor,
00178 int level,
00179 vtkHyperOctree *output);
00180
00181 int Dimension;
00182 double Size[3];
00183 double Origin[3];
00184 int Levels;
00185 int MinLevels;
00186
00187 int OutputScalarType;
00188 vtkImplicitFunction *ImplicitFunction;
00189 double Threshold;
00190
00191 private:
00192 vtkHyperOctreeSampleFunction(const vtkHyperOctreeSampleFunction&);
00193 void operator=(const vtkHyperOctreeSampleFunction&);
00194 };
00195
00196 #endif