OpendTect-6_4  6.4
hilberttransform.h
Go to the documentation of this file.
1 #ifndef hilberttransform_h
2 #define hilberttransform_h
3 
4 /*+
5 ________________________________________________________________________
6 
7  (C) dGB Beheer B.V.; (LICENSE) http://opendtect.org/OpendTect_license.txt
8  Author: Nanne Hemstra
9  Date: December 2007
10  RCS: $Id$
11 ________________________________________________________________________
12 
13 -*/
14 
15 #include "algomod.h"
16 #include "transform.h"
17 #include "bufstring.h"
18 
19 class ArrayNDInfo;
20 template <class T> class ValueSeries;
21 template <class T> class ArrayND;
22 
23 
29 {
30 public:
31  HilbertTransform();
32  ~HilbertTransform();
33 
34  bool setInputInfo(const ArrayNDInfo&);
35  const ArrayNDInfo& getInputInfo() const { return *info_; }
36 
37  bool real2real() const { return true; }
38  bool real2complex() const { return false; }
39  bool complex2real() const { return false; }
40  bool complex2complex() const { return false; }
41 
42  bool biDirectional() const { return false; }
43  bool setDir(bool fw) { return fw; }
44  bool getDir() const { return forward_; }
45 
46  bool init();
47  void setHalfLen( int hl ) { halflen_ = hl; }
48  void setCalcRange(int startidx,int convstartidx);
49 
50  /*<! Will handle some undefined values
51  BUT will be very slow if there are mostly
52  undefined values.
53  Returns unchanged output if all input values are
54  undefined
55  */
56  bool transform(const float*,int szin,float*,int szout) const;
57  bool transform(const ValueSeries<float>&,int szin,
58  ValueSeries<float>&,int szout) const;
59  bool transform(const ArrayND<float>&,ArrayND<float>&) const;
60  bool transform(const ArrayND<float_complex>&,
61  ArrayND<float_complex>&) const;
62  bool transform(const ArrayND<float>&,
63  ArrayND<float_complex>&) const;
64 
65  uiString errMsg() const { return errmsg_; }
66 
67 protected:
68 
69  float* makeHilbWindow(int);
70  bool isPossible(int) const;
71  bool isFast( int ) const { return true; }
72 
73  bool transform(const float*,int szin,float*,int szout,
74  const ValueSeries<float>* in) const;
75 
76  bool forward_;
78  int halflen_;
79  float* hilbwindow_;
81  int startidx_;
83 
84  mutable uiString errmsg_;
85 };
86 
87 #endif
#define mExpClass(module)
Definition: commondefs.h:160
void setHalfLen(int hl)
Definition: hilberttransform.h:47
int convstartidx_
Definition: hilberttransform.h:82
uiString errmsg_
Definition: hilberttransform.h:84
bool complex2complex() const
Definition: hilberttransform.h:40
float * hilbwindow_
Definition: hilberttransform.h:79
const ArrayNDInfo & getInputInfo() const
Definition: hilberttransform.h:35
uiString errMsg() const
Definition: hilberttransform.h:65
bool init()
Contains the information about the size of ArrayND, and in what order the data is stored (if accessab...
Definition: arrayndinfo.h:23
int startidx_
Definition: hilberttransform.h:81
bool complex2real() const
Definition: hilberttransform.h:39
Definition: uistring.h:89
bool real2real() const
Definition: hilberttransform.h:37
bool forward_
Definition: hilberttransform.h:76
int nrsamples_
Definition: hilberttransform.h:77
bool biDirectional() const
Definition: hilberttransform.h:42
bool isFast(int) const
Definition: hilberttransform.h:71
Interface to a series of values.
Definition: odmemory.h:17
An ArrayND is an array with a given number of dimensions and a size.
Definition: arraynd.h:33
bool real2complex() const
Definition: hilberttransform.h:38
BufferString errmsg_
Definition: horizontracker.h:119
int halflen_
Definition: hilberttransform.h:78
bool setDir(bool fw)
Definition: hilberttransform.h:43
bool getDir() const
Definition: hilberttransform.h:44
Class to compute Hilbert Transform.
Definition: hilberttransform.h:28
ArrayNDInfo * info_
Definition: hilberttransform.h:80

Generated at for the OpendTect seismic interpretation project. Copyright (C): dGB Beheer B. V. 2019