OpendTect  6.3
timedepthconv.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: K. Tingdahl
8  Date: September 2007
9 ________________________________________________________________________
10 
11 */
12 
13 
14 #include "seiscommon.h"
15 #include "zaxistransform.h"
16 #include "uistring.h"
17 #include "trckeyzsampling.h"
18 #include "datapack.h"
19 #include "multidimstorage.h"
20 #include "veldesc.h"
21 
22 
23 class IOObj;
24 class SeisTrc;
25 template <class T> class Array3D;
26 template <class T> class ValueSeries;
27 namespace Seis { class Provider; }
28 
29 
32 public:
33  virtual bool setVelData(const DBKey&) = 0;
34 
35  bool canTransformSurv(Pos::SurvID sid) const
36  { return sid!=TrcKey::std2DSurvID(); }
37 
38  static const char* sKeyTopVavg() { return "Top Vavg"; }
39  static const char* sKeyBotVavg() { return "Bottom Vavg"; }
40 
41 protected:
42  VelocityStretcher(const ZDomain::Def& from,
43  const ZDomain::Def& to);
44 };
45 
46 
52 public:
54  "VelocityT2D",
55  toUiString(sFactoryKeyword()));
56 
58  bool setVelData(const DBKey&);
59  bool isOK() const;
60 
61  bool needsVolumeOfInterest() const { return true; }
62  int addVolumeOfInterest(const TrcKeyZSampling&,bool);
63  void setVolumeOfInterest(int,const TrcKeyZSampling&,bool);
64  void removeVolumeOfInterest(int);
65  bool loadDataIfMissing(int,TaskRunner* =0);
66  void transformTrc(const TrcKey&,const SamplingData<float>&,
67  int,float*) const;
68  void transformTrcBack(const TrcKey&,
69  const SamplingData<float>&,int,float*) const;
70  Interval<float> getZInterval(bool from) const;
71  float getGoodZStep() const;
72  const char* getToZDomainString() const;
73  const char* getFromZDomainString() const;
74  const char* getZDomainID() const;
75 
76  const Interval<float>& getVavgRg(bool start) const;
77  static Interval<float> getDefaultVAvg();
78 
79  void fillPar(IOPar&) const;
80  bool usePar(const IOPar&);
81 
82 protected:
83  friend class TimeDepthDataLoader;
85  void releaseData();
86  Interval<float> getTimeInterval(const BinID&,int voiidx) const;
87  Interval<float> getDepthInterval(const BinID&,int voiidx) const;
88 
89  static void udfFill(ValueSeries<float>&,int);
90 
95 
98  bool velintime_;
99 
100  Interval<float> topvavg_; //Used to compute ranges
101  Interval<float> botvavg_; //Used to compute ranges
102 };
103 
104 
111 public:
113  "VelocityD2T",
114  toUiString(sFactoryKeyword()));
115 
117  bool setVelData(const DBKey&);
118  bool isOK() const;
119 
120  bool needsVolumeOfInterest() const;
121  int addVolumeOfInterest(const TrcKeyZSampling&,bool);
122  void setVolumeOfInterest(int,const TrcKeyZSampling&,bool);
123  void removeVolumeOfInterest(int);
124  bool loadDataIfMissing(int,TaskRunner* =0);
125  void transformTrc(const TrcKey&,const SamplingData<float>&,
126  int,float*) const;
127  void transformTrcBack(const TrcKey&,
128  const SamplingData<float>&,int,float*) const;
129  Interval<float> getZInterval(bool from) const;
130  float getGoodZStep() const;
131  const char* getToZDomainString() const;
132  const char* getFromZDomainString() const;
133  const char* getZDomainID() const;
134 
135  void fillPar(IOPar&) const;
136  bool usePar(const IOPar&);
137 
138 protected:
140 
142 };
143 
148 public:
150  const VelocityDesc&);
152 
153  uiString message() const { return msg_; }
154  od_int64 totalNr() const { return subsel_.totalNr(); }
155  od_int64 nrDone() const { return nrdone_; }
157  {
158  return tr("Position scanned");
159  }
160 
161  const Interval<float>& getTopVAvg() const { return startavgvel_; }
162  const Interval<float>& getBotVAvg() const { return stopavgvel_; }
163 
164  int nextStep();
165 
166 protected:
167 
173  bool zistime_;
175  int nrdone_;
176 
177  const IOObj& obj_;
179 
181 
184 };
185 
186 
189 public:
190  bool usePar(const IOPar&);
191  void fillPar(IOPar&) const;
192 
194  { return true; }
195 
196 protected:
197  LinearVelTransform(const ZDomain::Def& from,
198  const ZDomain::Def& to,
199  float v0, float dv);
200  void transformT2D(const SamplingData<float>&,
201  int sz,float* res) const;
202  void transformD2T(const SamplingData<float>&,
203  int sz,float* res) const;
204 
205  float startvel_;
206  float dv_;
207 
208 };
209 
210 
213 public:
215  "LinearT2D", tr("Linear velocity") );
216 
217  LinearT2DTransform(float v0=0, float dv=0);
218 
219  void transformTrc(const TrcKey&,
220  const SamplingData<float>&,
221  int sz,float* res) const;
222  void transformTrcBack(const TrcKey&,
223  const SamplingData<float>&,
224  int sz,float* res) const;
225 
226  Interval<float> getZInterval(bool time) const;
227  float getGoodZStep() const;
228 
230  { return false; }
231 };
232 
233 
236 public:
238  "LinearD2T", tr("Linear velocity") );
239 
240  LinearD2TTransform(float v0=0, float dv=0);
241 
242  void transformTrc(const TrcKey&,
243  const SamplingData<float>&,
244  int sz,float* res) const;
245  void transformTrcBack(const TrcKey&,
246  const SamplingData<float>&,
247  int sz,float* res) const;
248  Interval<float> getZInterval(bool depth) const;
249  float getGoodZStep() const;
250 
252  { return false; }
253 };
Seis::Provider * velprovider_
Definition: timedepthconv.h:96
#define mExpClass(module)
Definition: commondefs.h:157
float seisrefdatum_
Definition: timedepthconv.h:174
int nrdone_
Definition: timedepthconv.h:175
static SurvID std2DSurvID()
Seismics.
Definition: segydirectdef.h:20
bool canTransformSurv(Pos::SurvID) const
Definition: timedepthconv.h:193
RefMan< Time2DepthStretcher > stretcher_
Definition: timedepthconv.h:141
~Depth2TimeStretcher()
Definition: timedepthconv.h:139
static const char * sKeyTopVavg()
Definition: timedepthconv.h:38
Definition: ioobj.h:57
T to(const F &fr)
Definition: convert.h:31
is the access point for seismic traces. Instantiate a subclass and ask for what you need...
Definition: seisprovider.h:54
#define mODTextTranslationClass(clss)
Definition: uistring.h:37
static const char * sKeyBotVavg()
Definition: timedepthconv.h:39
Definition: veldesc.h:36
void usePar(const IOPar &iop, ODPolygon< T > &poly, const char *inpkey)
Definition: polygon.h:200
#define od_int64
Definition: plftypes.h:34
TrcKeySamplingIterator hsiter_
Definition: timedepthconv.h:170
TypeSet< int > voiids_
Definition: timedepthconv.h:94
TrcKeySampling subsel_
Definition: timedepthconv.h:169
bool needsVolumeOfInterest() const
Definition: timedepthconv.h:61
#define mDefaultFactoryInstantiation(baseclss, clss, keywrd, usernm)
Definition: factory.h:287
const Interval< float > & getTopVAvg() const
Definition: timedepthconv.h:161
Finds next BinID in TrcKeySampling; initializes to first position.
Definition: trckeysampling.h:181
Definition: uistring.h:88
od_int64 nrDone() const
Definition: timedepthconv.h:155
Interval< float > botvavg_
Definition: timedepthconv.h:101
VelocityDesc veldesc_
Definition: timedepthconv.h:97
TypeSet< TrcKeyZSampling > voivols_
Definition: timedepthconv.h:92
Set of pointers to objects.
Definition: commontypes.h:28
bool zistime_
Definition: timedepthconv.h:173
The generalization of something (e.g. a computation) where the steps must be done in sequence...
Definition: task.h:147
bool needsVolumeOfInterest() const
Definition: timedepthconv.h:229
ObjectSet< Array3D< float > > voidata_
Definition: timedepthconv.h:91
FixedString Provider()
Definition: keystrs.h:103
Generalized set of parameters of the keyword-value type.
Definition: iopar.h:53
Index_Type SurvID
Definition: commontypes.h:45
Class that can execute a task.
Definition: task.h:193
Horizontal sampling (inline and crossline range and steps).
Definition: trckeysampling.h:25
float startvel_
Definition: timedepthconv.h:205
Definition: timedepthconv.h:30
Hor+Vert sampling in 3D surveys.
Definition: trckeyzsampling.h:32
Interface to a series of values.
Definition: odmemory.h:15
float dv_
Definition: timedepthconv.h:206
Definition: timedepthconv.h:211
bool definedv1_
Definition: timedepthconv.h:172
const IOObj & obj_
Definition: timedepthconv.h:177
Interval< float > stopavgvel_
Definition: timedepthconv.h:183
uiString toUiString(const DBKey &ky)
Definition: dbkey.h:117
void fillPar(IOPar &iop, const ODPolygon< T > &poly, const char *inpkey)
Definition: polygon.h:187
Interval< float > startavgvel_
Definition: timedepthconv.h:182
Definition: timedepthconv.h:234
Interval< float > topvavg_
Definition: timedepthconv.h:100
uiString message() const
Definition: timedepthconv.h:153
bool needsVolumeOfInterest() const
Definition: timedepthconv.h:251
od_int64 totalNr() const
Definition: timedepthconv.h:154
bool canTransformSurv(Pos::SurvID sid) const
Definition: timedepthconv.h:35
Positioning in a seismic survey: inline/crossline or lineNr/trcNr.
Definition: binid.h:28
Seismic trace.
Definition: seistrc.h:31
uiString nrDoneText() const
Definition: timedepthconv.h:156
const Interval< float > & getBotVAvg() const
Definition: timedepthconv.h:162
bool velintime_
Definition: timedepthconv.h:98
BoolTypeSet voiintime_
Definition: timedepthconv.h:93
bool definedv0_
Definition: timedepthconv.h:171
Definition: timedepthconv.h:50
Full key to any object in the OpendTect data store.
Definition: dbkey.h:36
const VelocityDesc & vd_
Definition: timedepthconv.h:178
Represents a unique trace position in one of the surveys that OpendTect is managing.
Definition: trckey.h:26
Definition: timedepthconv.h:146
Definition: timedepthconv.h:109
Base class for z-axis transforms.
Definition: zaxistransform.h:35
Seis::Provider * provider_
Definition: timedepthconv.h:180
Array3D ( Subclass of ArrayND ) is a three dimensional array.
Definition: arraynd.h:149
Definition of z-domain.
Definition: zdomain.h:39
Definition: timedepthconv.h:187
uiString msg_
Definition: timedepthconv.h:168

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