UNIVERS  15.3
UNIVERS base processing software API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
cdft2d_fftw.hpp
1 /* cdft2d.hpp */
2 /* $Id: cdft2d_fftw.hpp 21438 2012-01-19 12:37:29Z leha $ Kolosov 07_02_2009*/
3 #ifndef __cdft2d_hpp
4 #define __cdft2d_hpp
5 
6 #ifdef GE_BUILD
7 #include <cdft2d.hpp>
8 #include <wave_field.hpp>
9 #include <fftw3.h>
10 #else
11 #include <s2proc/cdft2d.hpp>
12 #include <s2proc/wave_field.hpp>
13 #include <fftw3.h>
14 #endif
15 
16 
17 void calcAruwf(std::vector< std::vector<float> > &data,
18  std::vector< std::vector<float> > &w2DARU,
19  float step_time, float agc_gap);
20 
21 
22 void calcAruwf(std::vector< std::vector<float> > &in_data,
23  std::vector< std::vector<double> > &out_data,
24  std::vector< std::vector<float> > &w2DARU,
25  float step_time, float agc_gap);
26 
27 
28 void calcAruwf(WaveField &in_data,
29  std::vector< std::vector<float> > &out_data,
30  std::vector< std::vector<float> > &w2DARU,
31  float step_time, float agc_gap);
32 
33 
34 void calcAruLight(WaveField &in_data,
35  std::vector< std::vector<float> > &out_data,
36  std::vector< std::vector<float> > &w2DARU,
37  float agc_gap);
38 
40 class CDFT2D_FFTW : public CDFT2D
41 {
42 public:
43 
46  CDFT2D_FFTW(int direction = 1);
47 
48  virtual ~CDFT2D_FFTW();
49 
51  bool operator ()(WaveField &tReal, WaveField &tIm) const
52  {return calc(tReal, tIm);}
53 
55  virtual bool calc( WaveField &tReal, WaveField &tIm ) const;
56 
58  virtual bool calc( Trace &tReal, Trace &tIm ) const;
59 
61  void setDirection(int direction) {m_direction = direction;}
62 
64  int getDirection() const {return m_direction;}
65 
67  void setRotateFlag(bool rotate) {m_brotate = rotate;}
68 
70  bool getRotateFlag() const {return m_brotate;}
71 
72 protected:
73 
75  void rotate( WaveField &matr ) const;
76 
77  void rotate( Trace &vec ) const;
78 
79  void norm( WaveField &matr ) const;
80 
81  void norm( Trace &vector ) const;
82 
83  void set_proper_freq(Trace &tr) const;
84 
85  void set_proper_freq(WaveField &field) const;
86 
87  virtual void create_1d_plan(int N0, fftw_plan &plan, fftw_complex *in, fftw_complex *out) const;
88 
89  virtual void create_2d_plan(int N0, int N1, fftw_plan &plan, fftw_complex *in, fftw_complex *out) const;
90 
91  virtual void destroy_plan(fftw_plan &plan) const;
92 
93 private:
94 
95  bool m_brotate;
96 
97 };
98 
99 
100 
101 
102 
103 #endif /* cdft2d.hpp */
bool operator()(WaveField &tReal, WaveField &tIm) const
Definition: cdft2d_fftw.hpp:51
bool getRotateFlag() const
Definition: cdft2d_fftw.hpp:70
void setDirection(int direction)
Definition: cdft2d_fftw.hpp:61
int m_direction
Definition: cdft2d.hpp:53
Definition: wave_field.hpp:13
Definition: cdft2d_fftw.hpp:40
Definition: trace.hpp:14
int getDirection() const
Definition: cdft2d_fftw.hpp:64
void setRotateFlag(bool rotate)
Definition: cdft2d_fftw.hpp:67
void rotate(WaveField &matr) const
CDFT2D_FFTW(int direction=1)
virtual bool calc(WaveField &tReal, WaveField &tIm) const
Definition: cdft2d.hpp:15