UNIVERS  15.3
UNIVERS base processing software API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
fkflt.hpp
1 /* $Id: fkflt.hpp 21344 2011-12-15 14:03:25Z leha $ Kolosov 20_03_2010*/
2 #ifndef __fkflt_hpp
3 #define __fkflt_hpp
4 
5 #ifdef GE_BUILD
6 #include <wave_field.hpp>
7 #include <interpol.h>
8 #else
9 #include <s2proc/wave_field.hpp>
10 #include <mth/interpol.h>
11 #endif
12 
13 class FKFlt
14 {
15 public:
16 
17 
18  struct Params
19  {
20  // set default parameters
21  Params()
22  {
23  suppression = 0.05;
24  vel1 = -1.0;
25  vel2 = 1.0;
26  taper = 0;
27  curvature = 0;
28  time_step = 0.0;
29  rgFiltKind = 0;
30  };
31 
32  int rgFiltKind;
33  float suppression;
34  float vel1;
35  float vel2;
36  int taper;
37  int curvature;
38  float time_step;
39  std::vector< float > hcab;
40  };
41 
42  FKFlt();
43 
44  FKFlt(const Params &params);
45 
46  virtual ~FKFlt();
47 
48  void setParams(const Params &params);
49 
50  Params getParams();
51 
52  bool calc_filter(WaveField &filter);
53 
54  bool calc(WaveField &wf);
55 
56  bool operator()(WaveField &wf) {return calc(wf);}
57 
58  protected:
59 
61 
62  bool calcMain(WaveField &filter, bool filtergo );
63 
64  int CheckParam();
65 
66  void calcVelParam( float vel1, float vel2, bool &upv1, bool &upv2, bool &invertv1, bool &invertv2);
67 
68  bool rangeCos( float vel, float cur_k, float cur_w, float delta, bool upv);
69 
70  double calcFiltrCos( float cur_k, float cur_w, float delta, float vel, bool upv);
71 
72  void saveKoef( WaveField &filter, size_t st_k, size_t st_w, bool invertv, double stkoef, bool filtergo, bool upv);
73 
74 private:
75 
76  Params my_filter;
77 
78 };
79 
80 
81 #endif /* __fkflt_hpp */
Definition: wave_field.hpp:13
Definition: fkflt.hpp:18
Definition: fkflt.hpp:13