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

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