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

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