OpendTect-6_4  6.4
raytrace1d.h
Go to the documentation of this file.
1 #ifndef raytrace1d_h
2 #define raytrace1d_h
3 /*
4 ________________________________________________________________________
5 
6  (C) dGB Beheer B.V.; (LICENSE) http://opendtect.org/OpendTect_license.txt
7  Author: K. Tingdahl
8  Date: Jan 2011
9  RCS: $Id$
10 ________________________________________________________________________
11 
12 */
13 
14 #include "algomod.h"
15 #include "ailayer.h"
16 #include "factory.h"
17 #include "odcomplex.h"
18 #include "reflectivitymodel.h"
19 #include "survinfo.h"
20 #include "paralleltask.h"
21 #include "velocitycalc.h"
22 
23 template <class T> class Array2DImpl;
24 template <class T> class Array1D;
25 class TimeDepthModel;
26 
27 
34 public:
36 
37  static RayTracer1D* createInstance(const IOPar&,uiString&);
38 
39  ~RayTracer1D();
40 
42  {
43  public:
45  : pdown_( true )
46  , pup_( true )
47  , doreflectivity_(true) {}
48  virtual ~Setup() {}
49 
50  mDefSetupMemb(bool,pdown);
51  mDefSetupMemb(bool,pup);
52  mDefSetupMemb(bool,doreflectivity);
53 
54  virtual void fillPar(IOPar&) const;
55  virtual bool usePar(const IOPar&);
56  };
57 
58  virtual RayTracer1D::Setup& setup() = 0;
59  virtual const RayTracer1D::Setup& setup() const = 0;
60  virtual bool hasSameParams(const RayTracer1D&) const;
61 
62  bool setModel(const ElasticModel&);
63  const ElasticModel& getModel() const { return model_; }
64  // model top depth must be TWT = 0ms
69  void setOffsets(const TypeSet<float>& offsets);
70  void getOffsets(TypeSet<float>& offsets) const;
71  bool isPSWithoutZeroOffset() const;
72  // If PreStack & Offset Range do not have zero offset
73 
74  uiString errMsg() const { return errmsg_; }
75 
76  //Available after execution
77  float getSinAngle(int layeridx,int offsetidx) const;
78  bool getReflectivity(int offset,ReflectivityModel&) const;
79  bool getTDModel(int offset,TimeDepthModel&) const;
80  bool getZeroOffsTDModel(TimeDepthModel&) const;
81 
82  virtual void fillPar(IOPar&) const;
83  virtual bool usePar(const IOPar&);
84 
85  static const char* sKeyPWave() { return "Wavetypes"; }
86  static const char* sKeyOffset() { return "Offset Range"; }
87  static const char* sKeyReflectivity() { return "Compute reflectivity"; }
88  static const char* sKeyBlock() { return "Block model"; }
89  static const char* sKeyBlockRatio() { return "Blocking ratio threshold";}
90  static float cDefaultBlockRatio();
91 
92  static void setIOParsToZeroOffset(IOPar& iop);
93 
94 protected:
95  RayTracer1D();
96 
97  od_int64 nrIterations() const;
98  virtual bool doPrepare(int);
99  virtual bool compute(int,int,float);
100  bool getTDM(const Array1D<float>&,TimeDepthModel&) const;
101  void setZeroOffsetTWT();
102 
103  //Setup variables
104  ElasticModel model_; // model top depth must be TWT = 0ms
107 
108  //Runtime variables
112 
113  //Results
118 
119 public:
120 
121  float getDepth(int layer) const;
122  float getTime(int layer,int offset) const;
123 };
124 
125 
132 public:
133 
135  "VrmsRayTracer",
136  tr("Simple RayTracer") );
137 
138  RayTracer1D::Setup& setup() { return setup_; }
139  const RayTracer1D::Setup& setup() const { return setup_; }
140 
141 protected:
142  bool doWork(od_int64,od_int64,int);
143 
144  bool compute(int,int,float);
145 
147 };
148 
149 
150 #endif
Array1D ( Subclass of ArrayND ) is a one dimensional array.
Definition: arraynd.h:101
Array2DImpl< float_complex > * reflectivity_
Definition: raytrace1d.h:117
#define mExpClass(module)
Definition: commondefs.h:160
TypeSet< int > offsetpermutation_
Definition: raytrace1d.h:109
static const char * sKeyReflectivity()
Definition: raytrace1d.h:87
A table of elastic prop layers with processing utilities.
Definition: ailayer.h:100
uiString errMsg() const
Definition: raytrace1d.h:74
#define mODTextTranslationClass(clss)
Definition: uistring.h:38
void usePar(const IOPar &iop, ODPolygon< T > &poly, const char *inpkey)
Definition: polygon.h:188
#define od_int64
Definition: plftypes.h:36
float getTime(float depth) const
Implementation of Array2D.
Definition: arrayndimpl.h:102
bool setModel(const float *dpths, const float *times, int sz)
const RayTracer1D::Setup & setup() const
Definition: raytrace1d.h:139
#define mDefaultFactoryInstantiation(baseclss, clss, keywrd, usernm)
Definition: factory.h:289
Array2DImpl< float > * twt_
Definition: raytrace1d.h:115
Definition: uistring.h:89
RayTracer1D::Setup setup_
Definition: raytrace1d.h:146
Definition: raytrace1d.h:41
Ray tracer in 1D based on Vrms.
Definition: raytrace1d.h:130
Generalization of a task that can be run in parallel.
Definition: paralleltask.h:66
static const char * sKeyBlock()
Definition: raytrace1d.h:88
static const char * sKeyBlockRatio()
Definition: raytrace1d.h:89
Generalized set of parameters of the keyword-value type.
Definition: iopar.h:47
const ElasticModel & getModel() const
Definition: raytrace1d.h:63
TypeSet< float > velmax_
Definition: raytrace1d.h:110
ElasticModel model_
Definition: raytrace1d.h:104
Array1D< float > * zerooffstwt_
Definition: raytrace1d.h:116
Setup()
Definition: raytrace1d.h:44
#define mDefSetupMemb(typ, memb)
Definition: commondefs.h:137
Array2DImpl< float > * sini_
Definition: raytrace1d.h:114
static const char * sKeyOffset()
Definition: raytrace1d.h:86
#define mDefineFactoryInClass(T, funcname)
Definition: factory.h:426
Ray tracer in 1D.
Definition: raytrace1d.h:32
void fillPar(IOPar &iop, const ODPolygon< T > &poly, const char *inpkey)
Definition: polygon.h:175
TypeSet< float > depths_
Definition: raytrace1d.h:111
TypeSet< float > offsets_
Definition: raytrace1d.h:105
BufferString errmsg_
Definition: horizontracker.h:119
float getDepth(float time) const
static const char * sKeyPWave()
Definition: raytrace1d.h:85
RayTracer1D::Setup & setup()
Definition: raytrace1d.h:138
virtual ~Setup()
Definition: raytrace1d.h:48
Converts between time, depth and velocity given a model. The velocity model can be either RMO-velocit...
Definition: velocitycalc.h:31
uiString errmsg_
Definition: raytrace1d.h:106

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