Main Page Class Hierarchy Alphabetical List Compound List File List Compound Members File Members Related Pages
Filtering/vtkPiecewiseFunction.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00047 #ifndef __vtkPiecewiseFunction_h
00048 #define __vtkPiecewiseFunction_h
00049
00050 #include "vtkDataObject.h"
00051
00052 class VTK_FILTERING_EXPORT vtkPiecewiseFunction : public vtkDataObject
00053 {
00054 public:
00055 static vtkPiecewiseFunction *New();
00056 vtkTypeRevisionMacro(vtkPiecewiseFunction,vtkDataObject);
00057 void PrintSelf(ostream& os, vtkIndent indent);
00058
00059 void Initialize();
00060 void DeepCopy( vtkDataObject *f );
00061 void ShallowCopy( vtkDataObject *f );
00062
00064 int GetDataObjectType() {return VTK_PIECEWISE_FUNCTION;};
00065
00067 int GetSize();
00068
00070
00072 void AddPoint( float x, float val );
00073 void RemovePoint( float x );
00075
00077 void RemoveAllPoints();
00078
00081 void AddSegment( float x1, float val1, float x2, float val2 );
00082
00086 float GetValue( float x );
00087
00089
00091 float *GetDataPointer() {return this->Function;};
00092 void FillFromDataPointer(int, float*);
00094
00096 float *GetRange();
00097
00102 void GetTable( float x1, float x2, int size, float *table, int stride=1 );
00103
00105
00110 void BuildFunctionFromTable( float x1, float x2, int size,
00111 float *table, int stride=1 );
00113
00115
00121 vtkSetMacro( Clamping, int );
00122 vtkGetMacro( Clamping, int );
00123 vtkBooleanMacro( Clamping, int );
00125
00131 const char *GetType();
00132
00135 unsigned long GetMTime();
00136
00139 float GetFirstNonZeroValue();
00140
00141 protected:
00142 vtkPiecewiseFunction();
00143 ~vtkPiecewiseFunction();
00144
00145
00146 int ArraySize;
00147
00148
00149
00150
00151
00152 int Clamping;
00153
00154
00155 float *Function;
00156
00157
00158 int FunctionSize;
00159
00160
00161 float FunctionRange[2];
00162
00163
00164
00165 void IncreaseArraySize();
00166
00167
00168
00169 int InsertPoint( float x, float val );
00170
00171
00172
00173 void MovePoints( int index, int down );
00174 private:
00175 vtkPiecewiseFunction(const vtkPiecewiseFunction&);
00176 void operator=(const vtkPiecewiseFunction&);
00177 };
00178
00179 #endif
00180