Imaging/vtkSampleFunction.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00035 #ifndef __vtkSampleFunction_h
00036 #define __vtkSampleFunction_h
00037
00038 #include "vtkImageSource.h"
00039
00040 class vtkImplicitFunction;
00041 class vtkDataArray;
00042
00043 class VTK_IMAGING_EXPORT vtkSampleFunction : public vtkImageSource
00044 {
00045 public:
00046 vtkTypeRevisionMacro(vtkSampleFunction,vtkImageSource);
00047 void PrintSelf(ostream& os, vtkIndent indent);
00048
00052 static vtkSampleFunction *New();
00053
00055
00056 virtual void SetImplicitFunction(vtkImplicitFunction*);
00057 vtkGetObjectMacro(ImplicitFunction,vtkImplicitFunction);
00059
00061
00062 vtkSetMacro(OutputScalarType,int);
00063 vtkGetMacro(OutputScalarType,int);
00064 void SetOutputScalarTypeToDouble()
00065 {this->SetOutputScalarType(VTK_DOUBLE);}
00066 void SetOutputScalarTypeToFloat()
00067 {this->SetOutputScalarType(VTK_FLOAT);}
00068 void SetOutputScalarTypeToLong()
00069 {this->SetOutputScalarType(VTK_LONG);}
00070 void SetOutputScalarTypeToUnsignedLong()
00071 {this->SetOutputScalarType(VTK_UNSIGNED_LONG);};
00072 void SetOutputScalarTypeToInt()
00073 {this->SetOutputScalarType(VTK_INT);}
00074 void SetOutputScalarTypeToUnsignedInt()
00075 {this->SetOutputScalarType(VTK_UNSIGNED_INT);}
00076 void SetOutputScalarTypeToShort()
00077 {this->SetOutputScalarType(VTK_SHORT);}
00078 void SetOutputScalarTypeToUnsignedShort()
00079 {this->SetOutputScalarType(VTK_UNSIGNED_SHORT);}
00080 void SetOutputScalarTypeToChar()
00081 {this->SetOutputScalarType(VTK_CHAR);}
00082 void SetOutputScalarTypeToUnsignedChar()
00083 {this->SetOutputScalarType(VTK_UNSIGNED_CHAR);}
00085
00089 virtual void SetScalars(vtkDataArray *da);
00090
00092 void SetSampleDimensions(int i, int j, int k);
00093
00095
00096 void SetSampleDimensions(int dim[3]);
00097 vtkGetVectorMacro(SampleDimensions,int,3);
00099
00101
00103 vtkSetVector6Macro(ModelBounds,double);
00104 vtkGetVectorMacro(ModelBounds,double,6);
00106
00108
00111 vtkSetMacro(Capping,int);
00112 vtkGetMacro(Capping,int);
00113 vtkBooleanMacro(Capping,int);
00115
00117
00118 vtkSetMacro(CapValue,double);
00119 vtkGetMacro(CapValue,double);
00121
00123
00124 vtkSetMacro(ComputeNormals,int);
00125 vtkGetMacro(ComputeNormals,int);
00126 vtkBooleanMacro(ComputeNormals,int);
00128
00130 unsigned long GetMTime();
00131
00132 protected:
00133 vtkSampleFunction();
00134 ~vtkSampleFunction();
00135
00136 void ExecuteData(vtkDataObject *);
00137 void ExecuteInformation();
00138 void Cap(vtkDataArray *s);
00139
00140 int OutputScalarType;
00141 int SampleDimensions[3];
00142 double ModelBounds[6];
00143 int Capping;
00144 double CapValue;
00145 vtkImplicitFunction *ImplicitFunction;
00146 int ComputeNormals;
00147 private:
00148 vtkSampleFunction(const vtkSampleFunction&);
00149 void operator=(const vtkSampleFunction&);
00150 };
00151
00152 #endif
00153
00154