OpendTect  6.3
welld2tmodel.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: Bert Bril
8  Date: Aug 2003
9 ________________________________________________________________________
10 
11 
12 -*/
13 
14 #include "welldahobj.h"
15 #include "uistring.h"
16 
17 class TimeDepthModel;
18 class uiString;
19 
20 namespace Well
21 {
22 
27 public:
28 
29  typedef ValueType TWTType;
30  typedef TWTType VelType;
32  typedef ValueSetType TWTSetType;
33 
34  D2TModel(const char* nm=0);
35  ~D2TModel();
38 
39  virtual void getData(ZSetType&,TWTSetType&) const;
40  mImplSimpleMonitoredGetSet(inline,desc,setDesc,BufferString,
41  desc_,cParsChange());
42  mImplSimpleMonitoredGetSet(inline,dataSource,setDataSource,BufferString,
43  datasource_,cParsChange());
44 
45  TWTType getTime(ZType,const Track&) const;
46  ZType getDepth(TWTType,const Track&) const;
47  ZType getDah(TWTType,const Track&) const;
48  double getVelocityForDah(ZType,const Track&) const;
49  double getVelocityForDepth(ZType,const Track&) const;
50  double getVelocityForTwt(TWTType,const Track&) const;
51  bool getTimeDepthModel(const Well::Data&,
52  TimeDepthModel&) const;
53 
54  inline ValueType t( PointID id ) const { return value(id); }
55 
56  static const char* sKeyTimeWell();
57  static const char* sKeyDataSrc();
58 
59  void setData(const ZSetType&,const ValueSetType&);
60  void makeFromTrack(const Track&,VelType cstvel,
61  VelType replvel);
64  bool ensureValid(const Well::Data&,uiString& errmsg,
65  TypeSet<double>* zvals=0,
66  TypeSet<double>* tvals=0);
69  bool calibrateBy(const D2TModel&);
71 
72 protected:
73 
74  TWTSetType times_;
77 
78  virtual bool doSet(IdxType,ValueType);
79  virtual PointID doInsAtDah( ZType dh, ValueType val )
80  { return doIns( dh, val, times_, true ); }
81  virtual ValueType gtVal( IdxType idx ) const { return times_[idx]; }
82  virtual void removeAux( int idx ) { times_.removeSingle(idx);}
83  virtual void eraseAux() { times_.erase(); }
84 
85  ZType gtDepth(float,const Track&) const;
86  double gtVelocityForTwt(float,const Track&) const;
87  bool gtVelocityBoundsForDah(ZType d_ah,const Track&,
88  Interval<double>& depths,
89  Interval<float>& times) const;
90  bool gtVelocityBoundsForTwt(float twt,const Track&,
91  Interval<double>& depths,
92  Interval<float>& times) const;
94  int gtVelocityIdx(ZType pos,const Track&,
95  bool posisdah=true) const;
96 
97 protected:
98 
99  inline ZType getDepth( float time ) const { return mUdf(ZType); }
101  bool getOldVelocityBoundsForDah(ZType d_ah,const Track&,
102  Interval<double>& depths,
103  Interval<float>& times) const;
105  bool getOldVelocityBoundsForTwt(float twt,const Track&,
106  Interval<double>& depths,
107  Interval<float>& times) const;
109  static bool getTVDD2TModel(Well::D2TModel&,const Well::Data&,
110  TypeSet<double>& zvals, TypeSet<double>& tvals,
111  uiString& errmsg, uiString& warnmsg);
112  static void convertDepthsToMD(const Well::Track&,
113  const TypeSet<double>& zvals,ZSetType&);
114  static void shiftTimesIfNecessary(TypeSet<double>& tvals, double wllheadz,
115  double vrepl, double origintwtinfile,
116  uiString& msg);
117  static void checkReplacementVelocity(Well::Info&,double vreplinfile,
118  uiString& msg);
119 
120  friend class D2TModelIter;
121 };
122 
123 
127 {
128 public:
129 
131 
132  D2TModelIter(const D2TModel&,bool start_at_end=false);
133  D2TModelIter(const D2TModelIter&);
134 
135  const D2TModel& model() const;
136  TWTType t() const;
137 
138 };
139 
140 
141 } // namespace Well
#define mExpClass(module)
Definition: commondefs.h:157
TWTType VelType
Definition: welld2tmodel.h:30
Depth to time model.
Definition: welld2tmodel.h:25
BufferString desc_
Definition: welld2tmodel.h:75
#define mODTextTranslationClass(clss)
Definition: uistring.h:37
Information about a certain well.
Definition: wellinfo.h:26
ValueSetType TWTSetType
Definition: welld2tmodel.h:32
Definition: welldahobj.h:134
ValueType t(PointID id) const
Definition: welld2tmodel.h:54
Definition: uistring.h:88
float ValueType
Definition: welldahobj.h:46
single integer ID with comparison but no automatic conversion. Note that you will want to make a subc...
Definition: integerid.h:47
virtual void removeAux(int idx)
Definition: welld2tmodel.h:82
#define mDeclMonitorableAssignment(clss)
like mDeclAbstractMonitorableAssignment but for non-abstract subclasses. Implements the clone() metho...
Definition: monitor.h:111
#define mDeclInstanceCreatedNotifierAccess(clss)
Definition: notify.h:235
Well D2T Model iterator.
Definition: welld2tmodel.h:126
size_type IdxType
Definition: welldahobj.h:44
#define mImplSimpleMonitoredGetSet(pfx, fnnmget, fnnmset, typ, memb, chgtyp)
Defines simple MT-safe copyable member access.
Definition: monitor.h:39
ValueType TWTType
Definition: welld2tmodel.h:29
#define mUdf(type)
Use this macro to get the undefined for simple types.
Definition: undefval.h:270
Definition: wellcommon.h:16
Well track.
Definition: welltrack.h:22
object with a geometry defined by depth along hole.
Definition: welldahobj.h:36
virtual ValueType gtVal(IdxType idx) const
Definition: welld2tmodel.h:81
BufferString datasource_
Definition: welld2tmodel.h:76
ZType getDepth(float time) const
Legacy, misleading name. Use getDah().
Definition: welld2tmodel.h:99
ValueIntvType TWTIntvType
Definition: welld2tmodel.h:31
OD::String with its own variable length buffer. The buffer has a guaranteed minimum size...
Definition: bufstring.h:38
float ZType
Definition: welldahobj.h:40
virtual void eraseAux()
Definition: welld2tmodel.h:83
TWTSetType times_
Definition: welld2tmodel.h:74
virtual PointID doInsAtDah(ZType dh, ValueType val)
Definition: welld2tmodel.h:79
D2TModel::TWTType TWTType
Definition: welld2tmodel.h:130
The holder of all data concerning a certain well.
Definition: welldata.h:36
Converts between time, depth and velocity given a model. The velocity model can be either RMO-velocit...
Definition: velocitycalc.h:29

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