36 bool setWindow(
const char* nm,
float param,
37 int sz0,
int sz1,
int sz2);
38 int getWindowSize(
int dim)
const;
39 const char* getWindowName()
const;
40 float getWindowParam()
const;
46 inline bool execute();
47 inline void enableWorkControl(
bool);
51 static const char*
sKeyWinFunc() {
return "Window function"; }
65 template <
class T>
inline 67 : windowparam_(
mUdf(float) )
76 template <
class T>
inline 78 {
return window_.info().getSize( dim ); }
81 template <
class T>
inline 86 template <
class T>
inline 91 template <
class T>
inline 98 template <
class T>
inline 105 template <
class T>
inline 107 int sz0,
int sz1,
int sz2 )
116 if ( sz0<=0 || sz1<=0 || sz2<=0 )
119 window_.setSize( sz0, sz1, sz2 );
123 const int hsz0 = sz0/2;
const int hsz1 = sz1/2;
const int hsz2 = sz2/2;
126 for (
int idx0=0; idx0<sz0; idx0++ )
128 pos[0] = hsz0 ? ((double)(idx0-hsz0))/hsz0 : 0;
129 for (
int idx1=0; idx1<sz1; idx1++ )
131 pos[1] = hsz1 ? ((double)(idx1-hsz1))/hsz1 : 0;
132 for (
int idx2=0; idx2<sz2; idx2++ )
134 pos[2] = hsz2 ? ((double)(idx2-hsz2))/hsz2 : 0;
151 template <
class T>
inline 162 template <
class T>
inline 170 float var =
mUdf(
float);
173 return setWindow( wn, var, sz0, sz1, sz2 );
177 #define mImplSetFunc( func, vartype ) \ 178 template <class T> inline void Smoother3D<T>::func( vartype var ) \ 179 { convolver_.func( var ); } 185 template <
class T>
inline 195 template <
class T>
inline #define mIsUdf(val)
Use mIsUdf to check for undefinedness of simple types.
Definition: undefval.h:287
Convolver3D< T > convolver_
Definition: smoother3d.h:57
float getWindowParam() const
Definition: smoother3d.h:87
void setOutput(Array3D< T > &)
Definition: smoother3d.h:99
static const char * sKeyWinSize()
Definition: smoother3d.h:53
Convolves (or correlates) two 3D signals.
Definition: convolve3d.h:25
void fillPar(IOPar &) const
Definition: smoother3d.h:152
static const char * sKeyWinParam()
Definition: smoother3d.h:52
is an interface where processes can report their progress.
Definition: progressmeter.h:21
static const char * sKeyWinFunc()
Definition: smoother3d.h:51
void usePar(const IOPar &iop, ODPolygon< T > &poly, const char *inpkey)
Definition: polygon.h:188
Array3DImpl< T > window_
Definition: smoother3d.h:59
virtual bool hasVariable() const
Definition: windowfunction.h:31
bool setWindow(const char *nm, float param, int sz0, int sz1, int sz2)
Definition: smoother3d.h:106
bool get(const char *, int &) const
float windowparam_
Definition: smoother3d.h:61
#define mImplSetFunc(func, vartype)
Definition: smoother3d.h:177
void enableWorkControl(bool)
Must be called before execute()
Definition: smoother3d.h:182
void setProgressMeter(ProgressMeter *pm)
Must be called before execute()
Definition: smoother3d.h:181
Generalized set of parameters of the keyword-value type.
Definition: iopar.h:47
Control
Definition: task.h:55
#define mUdf(type)
Use this macro to get the undefined for simple types.
Definition: undefval.h:272
const char * find(const char *) const
returns null if not found
const char * getWindowName() const
Definition: smoother3d.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
A cartesian coordinate in 3D space.
Definition: coord.h:72
const char * buf() const
Definition: odstring.h:47
OD::String with its own variable length buffer. The buffer has a guaranteed minimum size...
Definition: bufstring.h:40
BufferString windowname_
Definition: smoother3d.h:60
Smoothes a 3d signal with an operator.
Definition: smoother3d.h:27
bool usePar(const IOPar &)
Definition: smoother3d.h:163
Implementation of Array3D.
Definition: arrayndimpl.h:151
void setInput(const Array3D< T > &)
Definition: smoother3d.h:92
void controlWork(Task::Control)
Definition: smoother3d.h:183
#define mClass(module)
Definition: commondefs.h:164
bool execute()
Definition: smoother3d.h:186
void set(const char *ky, const char *val)
Array3D ( Subclass of ArrayND ) is a three dimensional array.
Definition: arraynd.h:153
virtual RT getValue(PT) const =0
Generalization of something (e.g. a computation) that needs to be done in multiple steps...
Definition: task.h:28
int getWindowSize(int dim) const
Definition: smoother3d.h:77
Smoother3D()
Definition: smoother3d.h:66
Task::Control getState() const
Definition: smoother3d.h:196