OpendTect-6_4  6.4
frequencyattrib.h
Go to the documentation of this file.
1 #ifndef frequencyattrib_h
2 #define frequencyattrib_h
3 
4 /*+
5 ________________________________________________________________________
6 
7  (C) dGB Beheer B.V.; (LICENSE) http://opendtect.org/OpendTect_license.txt
8  Author: Kristofer Tingdahl
9  Date: 07-10-1999
10  RCS: $Id$
11 ________________________________________________________________________
12 
13 -*/
14 
15 #include "attributesmod.h"
16 #include "attribprovider.h"
17 #include "bufstringset.h"
18 #include "fourier.h"
19 #include "mathfunc.h"
20 #include "valseries.h"
21 #include "valseriesinterpol.h"
22 
23 #include <complex>
24 
25 
26 class ArrayNDWindow;
27 template<class T> class Array1DImpl;
28 
29 namespace Attrib
30 {
31 
32 class DataHolder;
33 
68 {
69 public:
70  static void initClass();
71  Frequency(Desc&);
72 
73  static const char* attribName() { return "Frequency"; }
74  static const char* gateStr() { return "gate"; }
75  static const char* normalizeStr() { return "normalize"; }
76  static const char* windowStr() { return "window"; }
77  static const char* paramvalStr() { return "paramval"; }
78  static const char* dumptofileStr() { return "dumptofile"; }
79  static const char* smoothspectrumStr() { return "smoothspect";}
80 
81  void prepPriorToBoundsCalc();
82 
83 protected:
84  ~Frequency();
85  static Provider* createInstance(Desc&);
86  static void updateDesc(Desc&);
87  static void updateDefaults(Desc&);
88 
89  bool checkInpAndParsAtStart();
91  { return false; }
92  bool getInputOutput(int input,
93  TypeSet<int>& res) const;
94  bool getInputData(const BinID&,int idx);
95  bool computeData(const DataHolder&,const BinID& rel,
96  int z0,int nrsamples,
97  int threadid) const;
98 
99  const Interval<float>* reqZMargin(int input,int output) const;
100 
106  float df_;
107 
109  float variable_;
110 
113  int realidx_;
114  int imagidx_;
116 
119  int fftsz_;
121 
125 
127  {
128  public:
129  FreqFunc(const ValueSeries<float>& func, int sz)
130  : func_( func )
131  , sz_(sz) {}
132 
133  virtual float getValue( float x ) const
134  {
135  ValueSeriesInterpolator<float> interp(sz_);
136  return interp.value(func_,x);
137  }
138  virtual float getValue( const float* p ) const
139  { return getValue(*p); }
140 
141  protected:
142 
144  int sz_;
145 
146  };
147 };
148 
149 }; // namespace Attrib
150 
151 #endif
#define mExpClass(module)
Definition: commondefs.h:160
Does Fourier Transforms of any size.
Definition: fourier.h:30
Interval< int > samplegate_
Definition: frequencyattrib.h:102
bool normalize_
Definition: frequencyattrib.h:108
Definition: seistype.h:54
static const char * dumptofileStr()
Definition: frequencyattrib.h:78
int fftsz_
Definition: frequencyattrib.h:119
Tapers the N-dimentional ArrayND with a windowFunction.
Definition: arrayndalgo.h:309
BufferString windowtype_
Definition: frequencyattrib.h:105
int realidx_
Definition: frequencyattrib.h:113
FixedString Attributes()
Definition: keystrs.h:40
Mathematical function.
Definition: mathfunc.h:61
static const char * smoothspectrumStr()
Definition: frequencyattrib.h:79
static const char * gateStr()
Definition: frequencyattrib.h:74
const ValueSeries< float > & func_
Definition: frequencyattrib.h:143
Fourier::CC * fft_
Definition: frequencyattrib.h:120
bool fftisinit_
Definition: frequencyattrib.h:118
Set of BufferString objects.
Definition: bufstringset.h:28
T value(const ValueSeries< T > &, T pos) const
Definition: valseriesinterpol.h:60
static const char * attribName()
Definition: frequencyattrib.h:73
const DataHolder * imdata_
Definition: frequencyattrib.h:112
Array1DImpl< float_complex > * signal_
Definition: frequencyattrib.h:122
int sz_
Definition: frequencyattrib.h:144
static const char * windowStr()
Definition: frequencyattrib.h:76
int imagidx_
Definition: frequencyattrib.h:114
Frequency Attribute.
Definition: frequencyattrib.h:67
Description of an attribute in an Attrib::DescSet. Each attribute has a name (e.g. "Similarity"), a user reference (e.g. "My similarity"), and at least one output. In addition, it may have parameters and inputs. If it has multiple outputs, only one of the outputs are selected.
Definition: attribdesc.h:89
bool allowParallelComputation() const
Definition: frequencyattrib.h:90
Array1DImpl< float_complex > * timedomain_
Definition: frequencyattrib.h:123
static const char * paramvalStr()
Definition: frequencyattrib.h:77
bool dumptofile_
Definition: frequencyattrib.h:103
virtual float getValue(const float *p) const
Definition: frequencyattrib.h:138
ArrayNDWindow * window_
Definition: frequencyattrib.h:104
static const char * normalizeStr()
Definition: frequencyattrib.h:75
Definition: frequencyattrib.h:126
float df_
Definition: frequencyattrib.h:106
Holds the attribute data.
Definition: attribdataholder.h:43
OD::String with its own variable length buffer. The buffer has a guaranteed minimum size...
Definition: bufstring.h:40
Positioning in a seismic survey: inline/crossline or lineNr/trcNr.
Definition: binid.h:30
FreqFunc(const ValueSeries< float > &func, int sz)
Definition: frequencyattrib.h:129
Provides the actual output to ...
Definition: attribprovider.h:44
bool smoothspectrum_
Definition: frequencyattrib.h:115
Implementation of Array1D.
Definition: arrayndimpl.h:52
virtual float getValue(float x) const
Definition: frequencyattrib.h:133
Interval< float > gate_
Definition: frequencyattrib.h:101
BufferStringSet dumpset_
Definition: frequencyattrib.h:117
Array1DImpl< float_complex > * freqdomain_
Definition: frequencyattrib.h:124
static void initClass()
Semblance Attribute.
Definition: attribdataholder.h:25
float variable_
Definition: frequencyattrib.h:109
const DataHolder * redata_
Definition: frequencyattrib.h:111

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