OpendTect  6.6
prestackgather.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: April 2005
9  RCS: $Id$
10 ________________________________________________________________________
11 
12 
13 -*/
14 
15 #include "prestackprocessingmod.h"
16 #include "arrayndimpl.h"
17 #include "datapackbase.h"
18 #include "multiid.h"
19 #include "offsetazimuth.h"
20 #include "position.h"
21 #include "samplingdata.h"
22 
23 class IOObj;
24 class SeisPSReader;
25 class SeisTrc;
26 class SeisTrcBuf;
27 
28 namespace PreStack
29 {
30 
35 mExpClass(PreStackProcessing) Gather : public FlatDataPack
37 public:
38  Gather();
39  Gather(const Gather&);
42 
43  bool is3D() const { return linename_.isEmpty(); }
44 
45  bool readFrom(const MultiID&,const BinID&,
46  int component=0,
47  uiString* errmsg=0);
48  bool readFrom(const IOObj&,const BinID&,
49  int component=0,
50  uiString* errmsg=0);
51  bool readFrom(const IOObj&,SeisPSReader& rdr,
52  const BinID&,int component=0,
53  uiString* errmsg=0);
54 
55  const Coord& getCoord() const { return coord_; }
56  virtual Coord3 getCoord(int,int) const
57  { return Coord3(coord_.x,coord_.y,0); }
58 
59  void detectOuterMutes(int* depths,
60  int taperlen=0) const;
63  void detectInnerMutes(int* depths,
64  int taperlen=0) const;
65  /*<!For each trace, try to detect the first
66  inner-mute affected value. */
67 
68  //for 3d only
69  const BinID& getBinID() const { return binid_; }
70  void setBinID( const BinID& bid )
71  { binid_ = bid; }
72  const MultiID& getStoredID() const { return storagemid_; }
73  const StepInterval<float>& zRange() const { return zrg_; }
74  void setZRange( const StepInterval<float>& zrg )
75  { zrg_ = zrg; }
76 
77  //for 2D only.
78  bool readFrom(const MultiID&, const int tracenr,
79  const char* linename,int comp,
80  uiString* errmsg=0);
81  bool readFrom(const IOObj&, const int tracenr,
82  const char* linename,int comp,
83  uiString* errmsg=0);
84  int getSeis2DTraceNr() const { return binid_.crl();}
85  const char* getSeis2DName() const;
86 
87  bool isLoaded() const { return arr2d_; }
88 
89  const char* dimName(bool dim0) const;
90  void getAuxInfo(int,int,IOPar&) const;
91 
92  static int offsetDim() { return 0; }
93  static int zDim() { return 1; }
94 
95  float getOffset(int) const;
96  float getAzimuth(int) const;
98 
99  bool isOffsetAngle() const {return offsetisangle_;}
100  void setOffsetIsAngle(bool yn);
101  bool isCorrected() const { return iscorr_; }
102  void setCorrected(bool yn) { iscorr_ = yn; }
103  bool zIsTime() const { return zit_; }
104 
105 
106  const MultiID& getVelocityID() const { return velocitymid_; }
107  const MultiID& getStorageID() const { return storagemid_; }
108  const MultiID& getStaticsID() const { return staticsmid_; }
109 
110  static bool getVelocityID(const MultiID& stor,MultiID& vid);
111 
112  static const char* sDataPackCategory();
113  static const char* sKeyIsAngleGather();
114  static const char* sKeyIsCorr();
115  static const char* sKeyZisTime();
116 
117  static const char* sKeyPostStackDataID();
118  static const char* sKeyStaticsID();
119 
120  void getAzimuths( TypeSet<float>& azimuths ) const
121  { azimuths = azimuths_; }
122  void setAzimuths( const TypeSet<float>& azimuths )
123  { azimuths_ = azimuths; }
124 
125 protected:
126 
131  bool iscorr_;
132 
133  bool zit_;
138 
140 
141 public:
142  bool setFromTrcBuf(SeisTrcBuf&,int comp,
143  bool snapzrangetosi=false);
144 };
145 
146 
151 mExpClass(PreStackProcessing) GatherSetDataPack : public DataPack
152 {
153 public:
154  GatherSetDataPack(const char* ctgery,
155  const ObjectSet<Gather>&);
157 
158  void fill(Array2D<float>&,int offsetidx) const;
159  void fill(SeisTrcBuf&,int offsetidx) const;
160  void fill(SeisTrcBuf&,Interval<float> stackrg) const;
161  SeisTrc* getTrace(int gatheridx,int offsetidx);
162  const SeisTrc* getTrace(int gatheridx,int offsetidx) const;
163 
164  virtual float nrKBytes() const { return 0; }
165 
166  const Gather* getGather(const BinID&) const;
167  const ObjectSet<Gather>& getGathers() const { return gathers_; }
168  ObjectSet<Gather>& getGathers() { return gathers_; }
169 
171 
172  static const char* sDataPackCategory();
173 
174 protected:
175  SeisTrc* gtTrace(int gatheridx,int offsetidx) const;
176 
178 };
179 
180 } // namespace PreStack
181 
PreStack::GatherSetDataPack::nrKBytes
virtual float nrKBytes() const
Definition: prestackgather.h:164
PreStack::Gather::getCoord
const Coord & getCoord() const
Definition: prestackgather.h:55
PreStack::Gather::getStaticsID
const MultiID & getStaticsID() const
Definition: prestackgather.h:108
PreStack::Gather::zRange
const StepInterval< float > & zRange() const
Definition: prestackgather.h:73
PreStack::Gather::getStorageID
const MultiID & getStorageID() const
Definition: prestackgather.h:107
PreStack::Gather::coord_
Coord coord_
Definition: prestackgather.h:135
Coord3
A cartesian coordinate in 3D space.
Definition: coord.h:72
PreStack::GatherSetDataPack::~GatherSetDataPack
~GatherSetDataPack()
PreStack::Gather::getAuxInfo
void getAuxInfo(int, int, IOPar &) const
PreStack::GatherSetDataPack::zRange
StepInterval< float > zRange() const
PreStack::Gather::is3D
bool is3D() const
Definition: prestackgather.h:43
PreStack::Gather::setBinID
void setBinID(const BinID &bid)
Definition: prestackgather.h:70
PreStack::Gather::getCoord
virtual Coord3 getCoord(int, int) const
Definition: prestackgather.h:56
PreStack::Gather::setAzimuths
void setAzimuths(const TypeSet< float > &azimuths)
Definition: prestackgather.h:122
PreStack::Gather
PreStack gather.
Definition: prestackgather.h:36
ObjectSet
Set of pointers to objects.
Definition: commontypes.h:31
PreStack::GatherSetDataPack::fill
void fill(SeisTrcBuf &, int offsetidx) const
PreStack::Gather::isLoaded
bool isLoaded() const
Definition: prestackgather.h:87
PreStack::Gather::isCorrected
bool isCorrected() const
Definition: prestackgather.h:101
PreStack::GatherSetDataPack::getTrace
SeisTrc * getTrace(int gatheridx, int offsetidx)
PreStack::Gather::dimName
const char * dimName(bool dim0) const
PreStack::Gather::readFrom
bool readFrom(const MultiID &, const int tracenr, const char *linename, int comp, uiString *errmsg=0)
PreStack::Gather::velocitymid_
MultiID velocitymid_
Definition: prestackgather.h:127
PreStack::Gather::linename_
BufferString linename_
Definition: prestackgather.h:139
PreStack::GatherSetDataPack::gathers_
ObjectSet< Gather > gathers_
Definition: prestackgather.h:177
PreStack::Gather::azimuths_
TypeSet< float > azimuths_
Definition: prestackgather.h:136
mExpClass
#define mExpClass(module)
Definition: commondefs.h:177
SeisTrc
Seismic trace.
Definition: seistrc.h:34
samplingdata.h
PreStack::GatherSetDataPack::getGather
const Gather * getGather(const BinID &) const
PreStack::Gather::iscorr_
bool iscorr_
Definition: prestackgather.h:131
OffsetAzimuth
Definition: offsetazimuth.h:26
PreStack::Gather::getOffset
float getOffset(int) const
PreStack::Gather::setCorrected
void setCorrected(bool yn)
Definition: prestackgather.h:102
PreStack::Gather::zit_
bool zit_
Definition: prestackgather.h:133
arrayndimpl.h
mODTextTranslationClass
#define mODTextTranslationClass(clss)
Definition: uistring.h:40
SeisTrcBuf
set of seismic traces.
Definition: seisbuf.h:31
PreStack::GatherSetDataPack::gtTrace
SeisTrc * gtTrace(int gatheridx, int offsetidx) const
PreStack::Gather::sKeyIsCorr
static const char * sKeyIsCorr()
PreStack::Gather::readFrom
bool readFrom(const IOObj &, SeisPSReader &rdr, const BinID &, int component=0, uiString *errmsg=0)
PreStack::Gather::getVelocityID
const MultiID & getVelocityID() const
Definition: prestackgather.h:106
PreStack::Gather::readFrom
bool readFrom(const IOObj &, const BinID &, int component=0, uiString *errmsg=0)
PreStack::Gather::detectOuterMutes
void detectOuterMutes(int *depths, int taperlen=0) const
PreStack::Gather::Gather
mODTextTranslationClass(Gather) public Gather(const Gather &)
PreStack::Gather::~Gather
~Gather()
PreStack::GatherSetDataPack::getTrace
const SeisTrc * getTrace(int gatheridx, int offsetidx) const
FlatPosData
Positioning of flat 'bulk' data. Only the 'x1' axis can be irregular.
Definition: flatposdata.h:26
multiid.h
BinID
Positioning in a seismic survey: inline/crossline or lineNr/trcNr.
Definition: binid.h:31
PreStack::GatherSetDataPack::sDataPackCategory
static const char * sDataPackCategory()
StepInterval< float >
Coord
A cartesian coordinate in 2D space.
Definition: coord.h:25
PreStack::Gather::setZRange
void setZRange(const StepInterval< float > &zrg)
Definition: prestackgather.h:74
PreStack::Gather::binid_
BinID binid_
Definition: prestackgather.h:134
PreStack::Gather::detectInnerMutes
void detectInnerMutes(int *depths, int taperlen=0) const
PreStack::Gather::getAzimuth
float getAzimuth(int) const
PreStack::Gather::zIsTime
bool zIsTime() const
Definition: prestackgather.h:103
PreStack::Gather::readFrom
bool readFrom(const MultiID &, const BinID &, int component=0, uiString *errmsg=0)
FlatDataPack
DataPack for flat data.
Definition: datapackbase.h:65
IOObj
Definition: ioobj.h:58
PreStack::GatherSetDataPack::fill
void fill(Array2D< float > &, int offsetidx) const
PreStack::Gather::zrg_
StepInterval< float > zrg_
Definition: prestackgather.h:137
PreStack::Gather::readFrom
bool readFrom(const IOObj &, const int tracenr, const char *linename, int comp, uiString *errmsg=0)
position.h
PreStack
Definition: synthseis.h:35
PreStack::Gather::storagemid_
MultiID storagemid_
Definition: prestackgather.h:128
datapackbase.h
PreStack::Gather::sKeyZisTime
static const char * sKeyZisTime()
PreStack::Gather::getStoredID
const MultiID & getStoredID() const
Definition: prestackgather.h:72
MultiID
Compound key consisting of ints.
Definition: multiid.h:24
BufferString
OD::String with its own variable length buffer. The buffer has a guaranteed minimum size.
Definition: bufstring.h:40
PreStack::Gather::sKeyPostStackDataID
static const char * sKeyPostStackDataID()
PreStack::Gather::setFromTrcBuf
bool setFromTrcBuf(SeisTrcBuf &, int comp, bool snapzrangetosi=false)
PreStack::Gather::staticsmid_
MultiID staticsmid_
Definition: prestackgather.h:129
PreStack::Gather::getOffsetAzimuth
OffsetAzimuth getOffsetAzimuth(int) const
uiString
String that is able to hold international (UTF-8) strings for the user interface.
Definition: uistring.h:121
SeisPSReader
reads from a prestack seismic data store.
Definition: seispsread.h:34
PreStack::Gather::zDim
static int zDim()
Definition: prestackgather.h:93
PreStack::Gather::sKeyIsAngleGather
static const char * sKeyIsAngleGather()
PreStack::Gather::getBinID
const BinID & getBinID() const
Definition: prestackgather.h:69
PreStack::GatherSetDataPack::GatherSetDataPack
GatherSetDataPack(const char *ctgery, const ObjectSet< Gather > &)
PreStack::Gather::Gather
Gather(const FlatPosData &)
PreStack::GatherSetDataPack
A DataPack containing an objectset of gathers.
Definition: prestackgather.h:152
offsetazimuth.h
DataPack
A data packet: data+positioning and more that needs to be shared.
Definition: datapack.h:34
PreStack::GatherSetDataPack::fill
void fill(SeisTrcBuf &, Interval< float > stackrg) const
PreStack::Gather::setOffsetIsAngle
void setOffsetIsAngle(bool yn)
PreStack::Gather::sKeyStaticsID
static const char * sKeyStaticsID()
PreStack::GatherSetDataPack::getGathers
const ObjectSet< Gather > & getGathers() const
Definition: prestackgather.h:167
PreStack::Gather::getVelocityID
static bool getVelocityID(const MultiID &stor, MultiID &vid)
PreStack::Gather::isOffsetAngle
bool isOffsetAngle() const
Definition: prestackgather.h:99
Interval< float >
PreStack::Gather::sDataPackCategory
static const char * sDataPackCategory()
PreStack::Gather::offsetDim
static int offsetDim()
Definition: prestackgather.h:92
PreStack::Gather::getSeis2DName
const char * getSeis2DName() const
IOPar
Generalized set of parameters of the keyword-value type.
Definition: iopar.h:55
PreStack::GatherSetDataPack::getGathers
ObjectSet< Gather > & getGathers()
Definition: prestackgather.h:168
Array2D< float >
PreStack::Gather::offsetisangle_
bool offsetisangle_
Definition: prestackgather.h:130
PreStack::Gather::getAzimuths
void getAzimuths(TypeSet< float > &azimuths) const
Definition: prestackgather.h:120
PreStack::Gather::getSeis2DTraceNr
int getSeis2DTraceNr() const
Definition: prestackgather.h:84
TypeSet< float >

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