00001 #ifndef __TSOPT__SEGY__OPS__
00002 #define __TSOPT__SEGY__OPS__
00003
00004 #include "taperpars.hh"
00005 #include "segypp.hh"
00006 #include "local.hh"
00007
00008
00009
00010 namespace TSOpt {
00011
00012 using RVL::BinaryLocalFunctionObject;
00013 using RVL::TernaryLocalFunctionObject;
00014 using RVL::LocalDataContainer;
00015
00016
00017 void conv(int shift, int nout, int nin, int nker,
00018 float * restrict out,
00019 const float * restrict in,
00020 const float * restrict ker,
00021 float scal=1.0);
00022
00023 void corr(int shift, int nout, int nin, int nker,
00024 float * restrict out,
00025 const float * restrict in,
00026 const float * restrict ker,
00027 float scal=1.0);
00028
00029
00030
00031
00032
00033
00034
00035 class SEGYConvolve: public TernaryLocalFunctionObject<float> {
00036 private:
00037 mutable int adj;
00038 public:
00039 SEGYConvolve() { setadj(0); }
00040 void setadj(int newadj) { adj=newadj; }
00041 using RVL::LocalEvaluation<float>::operator();
00042 void operator()(LocalDataContainer<float> &,
00043 LocalDataContainer<float> const &,
00044 LocalDataContainer<float> const &);
00045 string getName() const { string tmp = "SEGYTaper"; return tmp; }
00046 };
00047
00048 class SEGYTaper: public BinaryLocalFunctionObject<float> {
00049 private:
00050 TaperPars tap;
00051 public:
00052 SEGYTaper(std::string td): tap(td) {
00053
00054 }
00055 SEGYTaper(SEGYTaper const & x): tap(x.tap) {}
00056 using RVL::LocalEvaluation<float>::operator();
00057 void operator()(LocalDataContainer<float> &,
00058 LocalDataContainer<float> const &);
00059 string getName() const { string tmp = "SEGYTaper"; return tmp; }
00060 };
00061
00062 class SEGYLinMute: public BinaryLocalFunctionObject<float> {
00063
00064 private:
00065 float s;
00066
00067
00068 float tm;
00069
00070
00071 float w;
00072
00073 int mute_type;
00074
00075 float gxbeg;
00076 float gxend;
00077 public:
00078
00079 SEGYLinMute(float _s=0.0f, float _tm=0.0f, float _w=0.0f, int _type = 0)
00080 : s(_s),tm(_tm),w(_w),mute_type(_type) {}
00081
00082 SEGYLinMute(SEGYLinMute const & m)
00083 : s(m.s),tm(m.tm),w(m.w),mute_type(m.mute_type),gxbeg(m.gxbeg),gxend(m.gxend) {}
00084 void set(float _s, float _tm, float _w, int _type = 0){
00085 mute_type = _type;
00086 if (!mute_type) {
00087 s = _s;
00088 tm = _tm;
00089 w = _w;
00090 }
00091 else {
00092 s = _s;
00093 tm = _tm;
00094 w = _w;
00095 }
00096 }
00097
00098 ~SEGYLinMute() {}
00099
00100 using RVL::LocalEvaluation<float>::operator();
00101 void operator()(LocalDataContainer<float> &,
00102 LocalDataContainer<float> const &);
00103
00104 string getName() const { string tmp = "SEGYLinMute"; return tmp; }
00105
00106 };
00107
00108 class SEGYFwdInt: public BinaryLocalFunctionObject<float> {
00109
00110 private:
00111
00112 int nint;
00113
00114 public:
00115
00116 SEGYFwdInt(int _nint): nint(_nint) {}
00117
00118 SEGYFwdInt(SEGYFwdInt const & m): nint(m.nint) {}
00119
00120 ~SEGYFwdInt() {}
00121
00122 using RVL::LocalEvaluation<float>::operator();
00123 void operator()(LocalDataContainer<float> &,
00124 LocalDataContainer<float> const &);
00125
00126 string getName() const { string tmp = "SEGYFwdInt"; return tmp; }
00127
00128 };
00129
00130 class SEGYAdjInt: public BinaryLocalFunctionObject<float> {
00131
00132 private:
00133
00134 int nint;
00135
00136 public:
00137
00138 SEGYAdjInt(int _nint): nint(_nint) {}
00139
00140 SEGYAdjInt(SEGYAdjInt const & m): nint(m.nint) {}
00141
00142 ~SEGYAdjInt() {}
00143
00144 using RVL::LocalEvaluation<float>::operator();
00145 void operator()(LocalDataContainer<float> &,
00146 LocalDataContainer<float> const &);
00147
00148 string getName() const { string tmp = "SEGYAdjInt"; return tmp; }
00149
00150 };
00151
00152 class SEGYTaperMute: public BinaryLocalFunctionObject<float> {
00153
00154 private:
00155 float s;
00156
00157
00158 float tm;
00159
00160
00161 float w;
00162
00163 int mute_type;
00164
00165 float taper_min;
00166 float taper_max;
00167 float width;
00168 float tw;
00169 int taper_type;
00170
00171
00172 float sx_min;
00173 float sx_max;
00174 float sx_width;
00175
00176 public:
00177
00178 SEGYTaperMute(float _s=0.0f, float _tm=0.0f, float _w=0.0f, int _type = 0,
00179 float _taper_min=0.0f, float _taper_max=0.0f, float _width=0.0f,
00180 int _tapertype=0, float _tw=0.0f,
00181 float _sxmin=0.0f, float _sxmax=numeric_limits<float>::max(),
00182 float _sxw=0.0f)
00183 : s(_s),tm(_tm),w(_w),mute_type(_type),
00184 taper_min(_taper_min), taper_max(_taper_max),
00185 width(_width), tw(_tw), taper_type(_tapertype),
00186 sx_min(_sxmin), sx_max(_sxmax), sx_width(_sxw) {}
00187
00188 SEGYTaperMute(SEGYTaperMute const & m)
00189 : s(m.s),tm(m.tm),w(m.w),mute_type(m.mute_type),
00190 taper_min(m.taper_min),taper_max(m.taper_max),
00191 width(m.width), tw(m.tw), taper_type(m.taper_type),
00192 sx_min(m.sx_min), sx_max(m.sx_max), sx_width(m.sx_width) {}
00193
00194 void set(float _s, float _tm, float _w, int _type = 0,
00195 float _taper_min =0.0f , float _taper_max = numeric_limits<float>::max(),
00196 float _width=0.0f, int _tapertype=0, float _tw=0.0f,
00197 float _sxmin=0.0f, float _sxmax=numeric_limits<float>::max(),
00198 float _sxw=0.0f)
00199 {
00200 mute_type = _type;
00201 s = _s;
00202 tm = _tm;
00203 w = _w;
00204
00205 taper_min = _taper_min;
00206 taper_max = _taper_max;
00207 width = _width;
00208 taper_type = _tapertype;
00209
00210 tw = _tw;
00211
00212 sx_min = _sxmin;
00213 sx_max = _sxmax;
00214 sx_width = _sxw;
00215 }
00216
00217 ~SEGYTaperMute() {}
00218
00219 using RVL::LocalEvaluation<float>::operator();
00220 void operator()(LocalDataContainer<float> &,
00221 LocalDataContainer<float> const &);
00222
00223 string getName() const { string tmp = "SEGYTaperMute"; return tmp; }
00224
00225 };
00226 }
00227
00228 #endif