OpendTect-6_4  6.4
welltiedata.h
Go to the documentation of this file.
1 #ifndef welltiedata_h
2 #define welltiedata_h
3 
4 /*+
5 ________________________________________________________________________
6 
7 (C) dGB Beheer B.V.; (LICENSE) http://opendtect.org/OpendTect_license.txt
8 Author: Bruno
9 Date: Feb 2009
10 RCS: $Id: welltiedata.h,v 1.1 2009-01-19 13:02:33 cvsbruno Exp
11 $
12 ________________________________________________________________________
13 -*/
14 
15 #include "wellattribmod.h"
16 #include "callback.h"
17 #include "color.h"
18 #include "iopar.h"
19 #include "multiid.h"
20 #include "uistring.h"
21 #include "welldisp.h"
22 #include "welltied2tmodelmanager.h"
23 #include "welltiesetup.h"
24 
25 
26 class CtxtIOObj;
27 class SeisTrc;
28 class TaskRunner;
29 class Wavelet;
30 
31 namespace Well { class Data; class Log; class LogSet; class Writer; }
32 
33 namespace WellTie
34 {
35 
36 class DataPlayer;
37 class Setup;
38 class PickSetMgr;
39 
40 
41 mExpClass(WellAttrib) DispParams
42 { mODTextTranslationClass(DispParams);
43 public:
45  : ismarkerdisp_(true)
46  , isvwrmarkerdisp_(true)
47  , isvwrhordisp_(false)
48  , iszinft_(false)
49  , iszintime_(true)
50  , dispmrkfullnames_(true)
51  , disphorfullnames_(true)
52  {}
53 
59  bool iszinft_;
60  bool iszintime_;
61  Well::DisplayProperties::Markers mrkdisp_;
63 
64  static const char* sKeyIsMarkerDisp();
65  static const char* sKeyVwrMarkerDisp();
66  static const char* sKeyVwrHorizonDisp();
67  static const char* sKeyZInFeet();
68  static const char* sKeyZInTime();
69  static const char* sKeyMarkerFullName();
70  static const char* sKeyHorizonFullName();
71 
72  void fillPar(IOPar&) const;
73  void usePar(const IOPar&);
74 };
75 
76 
77 mExpClass(WellAttrib) Marker
78 { mODTextTranslationClass(Marker);
79 public:
80  Marker(float z)
81  : zpos_(z)
82  , size_(2)
83  {}
84 
86  float zpos_;
88  int id_;
89  int size_;
90 
91  bool operator == ( const Marker& m ) const
92  { return m.zpos_ == zpos_; }
93 };
94 
95 
96 mExpClass(WellAttrib) PickData
97 { mODTextTranslationClass(PickData);
98 public:
101 };
102 
103 
104 mExpClass(WellAttrib) Data
106 public :
107  Data(const Setup&,Well::Data& wd);
108  ~Data();
109 
111 
118 
119  const StepInterval<float>& getTraceRange() const { return tracerg_; }
120  const Interval<float>& getDahRange() const { return dahrg_; }
121  const StepInterval<float>& getModelRange() const { return modelrg_; }
122  const StepInterval<float>& getReflRange() const { return reflrg_; }
124  { tracerg_ = zrg; }
125  void computeExtractionRange();
126 
127  const Setup& setup() const { return setup_; }
128  const char* sKeyDensity() const { return setup_.denlognm_; }
129  const char* sKeySonic() const { return setup_.vellognm_; }
130  bool isSonic() const { return setup_.issonic_; }
131 
132  static const char* sKeyAI() { return "AI"; }
133  static const char* sKeyReflectivity() { return "Reflectivity"; }
134  static const char* sKeySynthetic() { return "Synthetic"; }
135  static const char* sKeySeismic() { return "Seismic"; }
136  static float cDefSeisSr();
137 
142 
143  mStruct(WellAttrib) CorrelData
144  {
145  CorrelData() : lag_(200), coeff_(0) {}
146 
147  TypeSet<float> vals_;
148  int lag_;
149  double coeff_;
150  float scaler_;
151  };
152  CorrelData correl_;
153 
154 protected:
155 
160  const Setup setup_;
161 };
162 
163 
164 mExpClass(WellAttrib) WellDataMgr : public CallBacker
166 public:
167  WellDataMgr(const MultiID&);
168  ~WellDataMgr();
169 
170  Well::Data* wd() { return wellData(); }
172 
173 protected:
174 
175  Well::Data* wellData() const;
176 
179  void wellDataDelNotify(CallBacker*);
180 };
181 
182 
184 { mODTextTranslationClass(DataWriter);
185 public:
186  DataWriter(Well::Data&,const MultiID&);
187  ~DataWriter();
188 
189  bool writeD2TM() const;
190  bool writeLogs(const Well::LogSet&,
191  bool todisk) const;
192  bool removeLogs(const Well::LogSet&) const;
193 
194  void setWD(Well::Data* wd)
195  { wd_ = wd; setWellWriter(); }
196 
197 protected:
198 
201  const MultiID& wellid_;
202 
203  void setWellWriter();
204 };
205 
206 
208 { mODTextTranslationClass(HorizonMgr);
209 public:
211  : wd_(0)
212  , horizons_(hor)
213  {}
214 
215  mStruct(WellAttrib) PosCouple
216  {
217  float z1_, z2_;
218  bool operator == ( const PosCouple& pc ) const
219  { return z1_ == pc.z1_ && z2_ == pc.z2_; }
220  };
221 
222  void matchHorWithMarkers(TypeSet<PosCouple>&,
223  bool bynames) const;
224  void setUpHorizons(const TypeSet<MultiID>&,
225  uiString&,TaskRunner&);
226  void setWD( const Well::Data* wd)
227  { wd_ = wd; }
228 
229 protected:
230 
231  const Well::Data* wd_;
233 };
234 
235 
236 mExpClass(WellAttrib) Server : public CallBacker
238 public :
239  Server(const WellTie::Setup&);
240  ~Server();
241 
242  const Well::Data* wd() const { return data_->wd_; }
243  Well::Data* wd() { return data_->wd_; }
244 
245  const MultiID& wellID() const { return wellid_; }
246 
247  PickSetMgr& pickMgr() { return *pickmgr_; }
248  D2TModelMgr& d2TModelMgr() { return *d2tmgr_; }
249  HorizonMgr& horizonMgr() { return *hormgr_; }
250  DispParams& dispParams() { return data_->dispparams_; }
251  DataWriter& dataWriter() { return *datawriter_; }
252  const Data& data() const { return *data_; }
253 
254  bool isOK() const { return errmsg_.isEmpty(); }
255  const uiString& errMsg() const { return errmsg_; }
256  const uiString& warnMsg() const { return warnmsg_; }
257 
258  bool setNewWavelet(const MultiID&);
259  bool computeSynthetics(const Wavelet&);
260  bool extractSeismics();
261  bool updateSynthetics(const Wavelet&);
262  bool computeAdditionalInfo(const Interval<float>&);
263  bool computeCrossCorrelation();
264  bool computeEstimatedWavelet(int newsz);
265  void setCrossCorrZrg(const Interval<float>&);
266  bool hasSynthetic() const;
267  bool hasSeismic() const;
268  bool doSeismic() const;
269  void updateExtractionRange();
270 
271  void setTaskRunner( TaskRunner* taskrun )
272  { data_->trunner_ = taskrun; }
273 protected :
282 
285 
286  void wellDataDel( CallBacker* );
287  void handleDataPlayerWarning() const;
288 };
289 
290 } // namespace WellTie
291 
292 #endif
Manages the D2T models used during TWTS.
Definition: welltied2tmodelmanager.h:36
#define mExpClass(module)
Definition: commondefs.h:160
Well::Data * wd()
Definition: welltiedata.h:243
const MultiID & wellid_
Definition: welltiedata.h:201
To be able to send and/or receive CallBacks, inherit from this class.
Definition: callback.h:272
Wavelet & initwvlt_
Definition: welltiedata.h:115
SeisTrc & seistrc_
Definition: welltiedata.h:114
Well::Writer * wtr_
Definition: welltiedata.h:199
bool iszinft_
Definition: welltiedata.h:59
Data * data_
Definition: welltiedata.h:280
FixedString Setup()
Definition: keystrs.h:116
Well::Data * wd()
Definition: welltiedata.h:170
static const char * sKeySynthetic()
Definition: welltiedata.h:134
bool operator==(const ArrayNDInfo &a1, const ArrayNDInfo &a2)
Definition: arrayndinfo.h:53
const uiString & warnMsg() const
Definition: welltiedata.h:256
Interval< float > dahrg_
Definition: welltiedata.h:157
Definition: welltiedata.h:77
DispParams dispparams_
Definition: welltiedata.h:140
const char * sKeySonic() const
Definition: welltiedata.h:129
#define mStruct(module)
Definition: commondefs.h:165
Well::Data * wd_
Definition: welltiedata.h:200
#define mODTextTranslationClass(clss)
Definition: uistring.h:38
const MultiID & wellID() const
Definition: welltiedata.h:245
const StepInterval< float > & getModelRange() const
Definition: welltiedata.h:121
const Well::Data * wd_
Definition: welltiedata.h:231
Definition: welltiesetup.h:29
void usePar(const IOPar &iop, ODPolygon< T > &poly, const char *inpkey)
Definition: polygon.h:188
Well log.
Definition: welllog.h:44
MultiID wellid_
Definition: welltiedata.h:281
Definition: wavelet.h:25
DispParams()
Definition: welltiedata.h:44
const MultiID wellid_
Definition: welltiedata.h:178
Definition: welltiedata.h:104
Definition: file.h:99
Log set.
Definition: welllogset.h:32
static const char * sKeyReflectivity()
Definition: welltiedata.h:133
const StepInterval< float > & getReflRange() const
Definition: welltiedata.h:122
static const char * sKeyAI()
Definition: welltiedata.h:132
TypeSet< Marker > & horizons_
Definition: welltiedata.h:232
Definition: uistring.h:89
Definition: welltiecshot.h:21
static const char * sKeySeismic()
Definition: welltiedata.h:135
Set of BufferString objects.
Definition: bufstringset.h:28
BufferStringSet allmarkernms_
Definition: welltiedata.h:62
TypeSet< Marker > seispicks_
Definition: welltiedata.h:100
bool isOK() const
Definition: welltiedata.h:254
Holds an IOObjCtxt plus a pointer to an IOObj and/or an IOPar.
Definition: ctxtioobj.h:142
PickSetMgr * pickmgr_
Definition: welltiedata.h:274
Color color_
Definition: welltiedata.h:85
TypeSet< Marker > horizons_
Definition: welltiedata.h:138
bool isvwrmarkerdisp_
Definition: welltiedata.h:55
Writes Well::Data to any data storage.
Definition: wellwriter.h:32
HorizonMgr(TypeSet< Marker > &hor)
Definition: welltiedata.h:210
Definition: welltiedata.h:207
Definition: callback.h:254
Well::DisplayProperties::Markers mrkdisp_
Definition: welltiedata.h:61
WellDataMgr * wdmgr_
Definition: welltiedata.h:275
TypeSet< Marker > synthpicks_
Definition: welltiedata.h:99
HorizonMgr * hormgr_
Definition: welltiedata.h:277
Set of (small) copyable elements.
Definition: commontypes.h:30
uiString warnmsg_
Definition: welltiedata.h:284
Generalized set of parameters of the keyword-value type.
Definition: iopar.h:47
const Well::Log * cslog_
Definition: welltiedata.h:117
Class that can execute a task.
Definition: task.h:169
Notifier< WellDataMgr > datadeleted_
Definition: welltiedata.h:171
bool disphorfullnames_
Definition: welltiedata.h:58
const Data & data() const
Definition: welltiedata.h:252
bool isSonic() const
Definition: welltiedata.h:130
DataWriter & dataWriter()
Definition: welltiedata.h:251
bool isvwrhordisp_
Definition: welltiedata.h:56
Definition: directionalsurvey.h:19
const char * sKeyDensity() const
Definition: welltiedata.h:128
TaskRunner * trunner_
Definition: welltiedata.h:141
uiString errmsg_
Definition: welltiedata.h:283
HorizonMgr & horizonMgr()
Definition: welltiedata.h:249
int id_
Definition: welltiedata.h:88
void setWD(Well::Data *wd)
Definition: welltiedata.h:194
DataWriter * datawriter_
Definition: welltiedata.h:279
const Interval< float > & getDahRange() const
Definition: welltiedata.h:120
void setTraceRange(const StepInterval< float > &zrg)
Definition: welltiedata.h:123
bool ismarkerdisp_
Definition: welltiedata.h:54
bool dispmrkfullnames_
Definition: welltiedata.h:57
const Setup & setup() const
Definition: welltiedata.h:127
D2TModelMgr * d2tmgr_
Definition: welltiedata.h:278
void fillPar(IOPar &iop, const ODPolygon< T > &poly, const char *inpkey)
Definition: polygon.h:175
const Well::Data * wd() const
Definition: welltiedata.h:242
Marker(float z)
Definition: welltiedata.h:80
Definition: welltiedata.h:96
Definition: repos.h:25
BufferString name_
Definition: welltiedata.h:87
D2TModelMgr & d2TModelMgr()
Definition: welltiedata.h:248
Definition: welltiepickset.h:29
StepInterval< float > tracerg_
Definition: welltiedata.h:156
StepInterval< float > reflrg_
Definition: welltiedata.h:159
OD::String with its own variable length buffer. The buffer has a guaranteed minimum size...
Definition: bufstring.h:40
const Setup setup_
Definition: welltiedata.h:160
bool isEmpty() const
Definition: odstring.h:51
int size_
Definition: welltiedata.h:89
Seismic trace.
Definition: seistrc.h:34
BufferString errmsg_
Definition: horizontracker.h:119
const StepInterval< float > & getTraceRange() const
Definition: welltiedata.h:119
Well::LogSet & logset_
Definition: welltiedata.h:112
Definition: welltiedata.h:183
PickData pickdata_
Definition: welltiedata.h:139
PickSetMgr & pickMgr()
Definition: welltiedata.h:247
const uiString & errMsg() const
Definition: welltiedata.h:255
Color is an RGB color object, with a transparancy. The storage is in a 4-byte integer, similar to Qt.
Definition: color.h:26
Definition: welltiedata.h:164
Well::Data * wd_
Definition: welltiedata.h:177
DispParams & dispParams()
Definition: welltiedata.h:250
The holder of all data concerning a certain well.
Definition: welldata.h:113
Definition: welltietoseismic.h:32
bool iszintime_
Definition: welltiedata.h:60
CorrelData correl_
Definition: welltiedata.h:151
DataPlayer * dataplayer_
Definition: welltiedata.h:276
void setWD(const Well::Data *wd)
Definition: welltiedata.h:226
Well::Data * wd_
Definition: welltiedata.h:110
SeisTrc & synthtrc_
Definition: welltiedata.h:113
float zpos_
Definition: welltiedata.h:86
Definition: welltiedata.h:41
StepInterval< float > modelrg_
Definition: welltiedata.h:158
Wavelet & estimatedwvlt_
Definition: welltiedata.h:116
Compound key consisting of ints.
Definition: multiid.h:25
Definition: welltiedata.h:236
void setTaskRunner(TaskRunner *taskrun)
Definition: welltiedata.h:271

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