1 #ifndef windowfunction_h 2 #define windowfunction_h 30 virtual const char* name()
const = 0;
44 #define mDeclWFStdFns(nm) \ 45 static void initClass(); \ 46 static const char* sName() { return #nm; }\ 47 static WindowFunction* create() { return new nm##Window; } \ 48 const char* name() const { return #nm; } \ 49 float getValue(float) const; \ 50 float getValue( const float* x ) const { return getValue(*x); } 52 static void addAllStdClasses();
57 #define mDeclWFSimpleClass(nm) \ 58 mExpClass(Algo) nm##Window : public WindowFunction \ 72 #define mDeclWFClassWithVariable(clss) \ 74 bool hasVariable() const { return true; } \ 75 bool setVariable(float); \ 76 bool isAcceptableVariable(float) const; \ 89 float getVariable()
const {
return threshold_; }
91 {
return "Taper length";}
94 static float getLegacyTaperVariable(
const BufferString&);
115 bool set(
double width,
int nrsamples);
118 float getVariable()
const {
return (
float)alpha_;}
123 double getError()
const;
125 double getWidth(
int nrsamples)
const;
126 double getError(
int nrsamples)
const;
#define mExpClass(module)
Definition: commondefs.h:160
Kaiser Window Function.
Definition: windowfunction.h:107
virtual bool isAcceptableVariable(float) const
Definition: windowfunction.h:35
int getLength() const
Definition: windowfunction.h:124
float factor_
Definition: windowfunction.h:99
void usePar(const IOPar &iop, ODPolygon< T > &poly, const char *inpkey)
Definition: polygon.h:188
double denom_
Definition: windowfunction.h:131
double alpha_
Definition: windowfunction.h:130
Mathematical function.
Definition: mathfunc.h:61
virtual bool hasVariable() const
Definition: windowfunction.h:31
int ns_
Definition: windowfunction.h:133
double getWidth() const
Definition: windowfunction.h:122
void set(T &_to, const F &fr)
template based type conversion
Definition: convert.h:29
mDefineFactory(Algo, WindowFunction, WINFUNCS)
Generalized set of parameters of the keyword-value type.
Definition: iopar.h:47
static const char * sKeyTaperVal()
Definition: windowfunction.h:38
double width_
Definition: windowfunction.h:132
#define mUdf(type)
Use this macro to get the undefined for simple types.
Definition: undefval.h:272
#define mDeclWFStdFns(nm)
Definition: windowfunction.h:44
Tapered Cosine Window Function.
Definition: windowfunction.h:82
virtual bool setVariable(float)
Definition: windowfunction.h:33
void fillPar(IOPar &iop, const ODPolygon< T > &poly, const char *inpkey)
Definition: polygon.h:175
virtual const char * variableName() const
Definition: windowfunction.h:34
OD::String with its own variable length buffer. The buffer has a guaranteed minimum size...
Definition: bufstring.h:40
#define mDeclWFSimpleClass(nm)
Definition: windowfunction.h:57
float threshold_
Definition: windowfunction.h:98
const char * variableName() const
Definition: windowfunction.h:90
Base class for window functions. The inheriting classes will give a value between 0 and 1 in the inte...
Definition: windowfunction.h:27
#define mDeclWFClassWithVariable(clss)
Definition: windowfunction.h:72
virtual float getVariable() const
Definition: windowfunction.h:32
static const char * sKeyVariable()
Definition: windowfunction.h:37
const char * variableName() const
Definition: windowfunction.h:119