vtkPiecewiseFunction.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00043 #ifndef __vtkPiecewiseFunction_h
00044 #define __vtkPiecewiseFunction_h
00045
00046 #include "vtkDataObject.h"
00047
00048 class VTK_FILTERING_EXPORT vtkPiecewiseFunction : public vtkDataObject
00049 {
00050 public:
00051 static vtkPiecewiseFunction *New();
00052 vtkTypeRevisionMacro(vtkPiecewiseFunction,vtkDataObject);
00053 void PrintSelf(ostream& os, vtkIndent indent);
00054
00055 void Initialize();
00056 void DeepCopy( vtkDataObject *f );
00057 void ShallowCopy( vtkDataObject *f );
00058
00060 int GetDataObjectType() {return VTK_PIECEWISE_FUNCTION;};
00061
00063 int GetSize();
00064
00066
00069 int AddPoint( double x, double val );
00070 int RemovePoint( double x );
00072
00074 void RemoveAllPoints();
00075
00078 void AddSegment( double x1, double val1, double x2, double val2 );
00079
00083 double GetValue( double x );
00084
00086
00088 double *GetDataPointer() {return this->Function;};
00089 void FillFromDataPointer(int, double*);
00091
00093 double *GetRange();
00094
00096
00100 void GetTable( double x1, double x2, int size, float *table, int stride=1 );
00101 void GetTable( double x1, double x2, int size, double *table, int stride=1 );
00103
00105
00110 void BuildFunctionFromTable( double x1, double x2, int size,
00111 double *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 double GetFirstNonZeroValue();
00140
00141 protected:
00142 vtkPiecewiseFunction();
00143 ~vtkPiecewiseFunction();
00144
00145
00146 int ArraySize;
00147
00148
00149
00150
00151
00152 int Clamping;
00153
00154
00155 double *Function;
00156
00157
00158 int FunctionSize;
00159
00160
00161 double FunctionRange[2];
00162
00163
00164
00165 void IncreaseArraySize();
00166
00167
00168
00169 int InsertPoint( double x, double 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