OpendTect  6.3
prestackanglecomputer.h
Go to the documentation of this file.
1 #pragma once
2 
3 /*+
4 ________________________________________________________________________
5 
6  (C) dGB Beheer B.V.; (LICENSE) http://opendtect.org/OpendTect_license.txt
7  Author: Y. Liu
8  Date: January 2011
9 ________________________________________________________________________
10 
11 
12 -*/
13 
14 #include "ailayer.h"
15 #include "enums.h"
16 #include "flatposdata.h"
17 #include "iopar.h"
18 #include "position.h"
19 #include "prestackprocessingmod.h"
20 #include "refcount.h"
21 #include "windowfunction.h"
22 
23 template <class T> class Array2D;
24 class FFTFilter;
25 class Gather;
26 class RayTracer1D;
27 class VelocityDesc;
28 
29 namespace Vel { class FunctionSource; }
30 
31 namespace PreStack
32 {
33 
38 mExpClass(PreStackProcessing) AngleComputer : public RefCount::Referenced
39 {
40 public:
41  AngleComputer();
42 
43  enum smoothingType { None, MovingAverage, FFTFilter };
45 
46  virtual RefMan<Gather> computeAngles() = 0;
47  virtual bool isOK() const = 0;
48  void setTrcKey( const TrcKey& tk )
49  { trckey_ = tk; }
50 
51  void setOutputSampling(const FlatPosData&);
52  void setRayTracer(const IOPar& raypar);
53  void setNoSmoother();
55  void setMovingAverageSmoother(float length,
57  float param=0.95);
58  void setFFTSmoother(float freqf3,float freqf4);
59  void setSmoothingPars(const IOPar&);
60 
61  static const char* sKeySmoothType();
62  static const char* sKeyWinFunc();
63  static const char* sKeyWinParam();
64  static const char* sKeyWinLen();
65  static const char* sKeyFreqF3();
66  static const char* sKeyFreqF4();
67 
68 protected:
69  ~AngleComputer();
70 
71  bool fillandInterpArray(Array2D<float>& angledata);
72  RefMan<Gather> computeAngleData();
73  void averageSmooth(Array2D<float>& angledata);
74  void fftSmooth(Array2D<float>& angledata);
75  void fftTimeSmooth(::FFTFilter& fftfilter,
76  Array2D<float>& angledata);
77  void fftDepthSmooth(::FFTFilter& fftfilter,
78  Array2D<float>& angledata);
79 
80  virtual const ElasticModel& curElasticModel() const = 0;
81  virtual const RayTracer1D* curRayTracer() const = 0;
82 
91 };
92 
93 
94 
100 {
101 public:
104 
105  bool setDBKey(const DBKey&);
106  bool isOK() const { return velsource_; }
107 
108  RefMan<Gather> computeAngles();
109 
110 protected:
111 
112  const ElasticModel& curElasticModel() const { return elasticmodel_;}
113  const RayTracer1D* curRayTracer() const { return raytracer_; }
114 
116 };
117 
118 
119 
124 mExpClass(PreStackProcessing) ModelBasedAngleComputer : public AngleComputer
125 {
126 public:
127  class ModelTool
128  {
129  public:
131  const TrcKey& tk )
132  : rt_(0), em_(new ElasticModel(em))
133  , trckey_(tk) {}
135  const TrcKey& tk )
136  : rt_(rt), em_(0), trckey_(tk) {}
137  ~ModelTool() { delete em_; }
138 
139  const RayTracer1D* rayTracer() const { return rt_; }
140  const ElasticModel& elasticModel() const;
141  const TrcKey& trcKey() const { return trckey_; }
142  bool operator ==( const ModelTool& a ) const
143  { return a.trcKey() == trckey_; }
144  protected:
146  const RayTracer1D* rt_;
148  };
149 
151 
152  void setElasticModel(const TrcKey&,bool doblock,
153  bool pvelonly,ElasticModel&);
154  void setRayTracer(const RayTracer1D*,
155  const TrcKey&);
156 
157  bool isOK() const
158  { return curElasticModel().size(); }
159 
160  RefMan<Gather> computeAngles();
161 
162 protected:
163 
164  const ElasticModel& curElasticModel() const;
165  const RayTracer1D* curRayTracer() const;
166 
168 };
169 
170 } // namespace PreStack
bool needsraytracing_
Definition: prestackanglecomputer.h:89
float maxthickness_
Definition: prestackanglecomputer.h:88
IOPar iopar_
Definition: prestackanglecomputer.h:83
#define mExpClass(module)
Definition: commondefs.h:157
Velocity.
Definition: velocityfunction.h:30
~ModelTool()
Definition: prestackanglecomputer.h:137
const RayTracer1D * rayTracer() const
Definition: prestackanglecomputer.h:139
A table of elastic prop layers with processing utilities.
Definition: ailayer.h:98
Definition: velocityfunction.h:79
bool operator==(const ArrayNDInfo &a1, const ArrayNDInfo &a2)
Definition: arrayndinfo.h:51
ModelTool(const RayTracer1D *rt, const TrcKey &tk)
Definition: prestackanglecomputer.h:134
Positioning of flat &#39;bulk&#39; data. Only the &#39;x1&#39; axis can be irregular.
Definition: flatposdata.h:24
Definition: prestackanglecomputer.h:127
const TrcKey & trcKey() const
Definition: prestackanglecomputer.h:141
const ElasticModel & curElasticModel() const
Definition: prestackanglecomputer.h:112
Definition: veldesc.h:36
PreStack gather.
Definition: prestackgather.h:28
Definition: prestackagc.h:18
TrcKey trckey_
Definition: prestackanglecomputer.h:147
Computes angles for Gather from ElasticModel.
Definition: prestackanglecomputer.h:124
Computes angles for Gather from velocity model.
Definition: prestackanglecomputer.h:99
const RayTracer1D * rt_
Definition: prestackanglecomputer.h:146
RayTracer1D * raytracer_
Definition: prestackanglecomputer.h:85
ElasticModel elasticmodel_
Definition: prestackanglecomputer.h:86
ElasticModel * em_
Definition: prestackanglecomputer.h:145
#define mDeclareEnumUtils(enm)
Some utilities surrounding the often needed enum <-> string table.
Definition: enums.h:188
FixedString None()
Definition: keystrs.h:90
Set of pointers to objects.
Definition: commontypes.h:28
Generalized set of parameters of the keyword-value type.
Definition: iopar.h:53
Vel::FunctionSource * velsource_
Definition: prestackanglecomputer.h:115
Array2D ( Subclass of ArrayND ) is a two dimensional array.
Definition: arraynd.h:127
bool isOK() const
Definition: prestackanglecomputer.h:157
ModelTool(const ElasticModel &em, const TrcKey &tk)
Definition: prestackanglecomputer.h:130
Ray tracer in 1D.
Definition: raytrace1d.h:30
smoothingType
Definition: prestackanglecomputer.h:43
static const char * sName()
Definition: windowfunction.h:64
bool isOK() const
Definition: prestackanglecomputer.h:106
void setTrcKey(const TrcKey &tk)
Definition: prestackanglecomputer.h:48
OD::String with its own variable length buffer. The buffer has a guaranteed minimum size...
Definition: bufstring.h:38
float thresholdparam_
Definition: prestackanglecomputer.h:87
Classical FFT filter, use set to set up data step, min and max frequency and type of the filter (minf...
Definition: fftfilter.h:30
FlatPosData outputsampling_
Definition: prestackanglecomputer.h:84
TrcKey trckey_
Definition: prestackanglecomputer.h:90
Full key to any object in the OpendTect data store.
Definition: dbkey.h:36
const RayTracer1D * curRayTracer() const
Definition: prestackanglecomputer.h:113
Represents a unique trace position in one of the surveys that OpendTect is managing.
Definition: trckey.h:26
ObjectSet< ModelTool > tools_
Definition: prestackanglecomputer.h:167
Computes angles for Gather.
Definition: prestackanglecomputer.h:38

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