34 bool setWindow(
const char* nm,
float param,
35 int sz0,
int sz1,
int sz2);
36 int getWindowSize(
int dim)
const;
37 const char* getWindowName()
const;
38 float getWindowParam()
const;
44 inline bool execute();
45 inline void enableWorkControl(
bool);
49 static const char*
sKeyWinFunc() {
return "Window function"; }
63 template <
class T>
inline 65 : windowparam_(
mUdf(float) )
74 template <
class T>
inline 76 {
return window_.info().getSize( dim ); }
79 template <
class T>
inline 84 template <
class T>
inline 89 template <
class T>
inline 96 template <
class T>
inline 103 template <
class T>
inline 105 int sz0,
int sz1,
int sz2 )
114 if ( sz0<=0 || sz1<=0 || sz2<=0 )
117 window_.setSize( sz0, sz1, sz2 );
121 const int hsz0 = sz0/2;
const int hsz1 = sz1/2;
const int hsz2 = sz2/2;
124 for (
int idx0=0; idx0<sz0; idx0++ )
126 pos[0] = hsz0 ? ((double)(idx0-hsz0))/hsz0 : 0;
127 for (
int idx1=0; idx1<sz1; idx1++ )
129 pos[1] = hsz1 ? ((double)(idx1-hsz1))/hsz1 : 0;
130 for (
int idx2=0; idx2<sz2; idx2++ )
132 pos[2] = hsz2 ? ((double)(idx2-hsz2))/hsz2 : 0;
149 template <
class T>
inline 160 template <
class T>
inline 168 float var =
mUdf(
float);
171 return setWindow( wn, var, sz0, sz1, sz2 );
175 #define mImplSetFunc( func, vartype ) \ 176 template <class T> inline void Smoother3D<T>::func( vartype var ) \ 177 { convolver_.func( var ); } 183 template <
class T>
inline 193 template <
class T>
inline #define mIsUdf(val)
Use mIsUdf to check for undefinedness of simple types.
Definition: undefval.h:285
Convolver3D< T > convolver_
Definition: smoother3d.h:55
float getWindowParam() const
Definition: smoother3d.h:85
void setOutput(Array3D< T > &)
Definition: smoother3d.h:97
static const char * sKeyWinSize()
Definition: smoother3d.h:51
Convolves (or correlates) two 3D signals.
Definition: convolve3d.h:23
void fillPar(IOPar &) const
Definition: smoother3d.h:150
static const char * sKeyWinParam()
Definition: smoother3d.h:50
is an interface where processes can report their progress.
Definition: progressmeter.h:19
static const char * sKeyWinFunc()
Definition: smoother3d.h:49
void usePar(const IOPar &iop, ODPolygon< T > &poly, const char *inpkey)
Definition: polygon.h:200
Array3DImpl< T > window_
Definition: smoother3d.h:57
virtual bool hasVariable() const
Definition: windowfunction.h:29
FT abs() const
Definition: geometry.h:874
bool setWindow(const char *nm, float param, int sz0, int sz1, int sz2)
Definition: smoother3d.h:104
bool get(const char *, int &) const
float windowparam_
Definition: smoother3d.h:59
#define mImplSetFunc(func, vartype)
Definition: smoother3d.h:175
3D point or vector
Definition: commontypes.h:57
void enableWorkControl(bool)
Must be called before execute()
Definition: smoother3d.h:180
void setProgressMeter(ProgressMeter *pm)
Must be called before execute()
Definition: smoother3d.h:179
Generalized set of parameters of the keyword-value type.
Definition: iopar.h:53
Control
Definition: task.h:45
#define mUdf(type)
Use this macro to get the undefined for simple types.
Definition: undefval.h:270
const char * find(const char *) const
returns null if not found
const char * getWindowName() const
Definition: smoother3d.h:80
virtual bool setVariable(float)
Definition: windowfunction.h:31
void fillPar(IOPar &iop, const ODPolygon< T > &poly, const char *inpkey)
Definition: polygon.h:187
const char * buf() const
Definition: odstring.h:45
OD::String with its own variable length buffer. The buffer has a guaranteed minimum size...
Definition: bufstring.h:38
BufferString windowname_
Definition: smoother3d.h:58
Smoothes a 3d signal with an operator.
Definition: smoother3d.h:25
bool usePar(const IOPar &)
Definition: smoother3d.h:161
Implementation of Array3D.
Definition: arrayndimpl.h:150
void setInput(const Array3D< T > &)
Definition: smoother3d.h:90
void controlWork(Task::Control)
Definition: smoother3d.h:181
#define mClass(module)
Definition: commondefs.h:161
bool execute()
Definition: smoother3d.h:184
void set(const char *ky, const char *val)
Array3D ( Subclass of ArrayND ) is a three dimensional array.
Definition: arraynd.h:149
virtual RT getValue(PT) const =0
Generalization of something (e.g. a computation) that needs to be done in multiple steps...
Definition: task.h:26
int getWindowSize(int dim) const
Definition: smoother3d.h:75
Smoother3D()
Definition: smoother3d.h:64
Task::Control getState() const
Definition: smoother3d.h:194