OpendTect  6.3
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 ________________________________________________________________________
10 
11 -*/
12 
13 #include "seismod.h"
14 #include "arrayndimpl.h"
15 #include "datapackbase.h"
16 #include "dbkey.h"
17 #include "offsetazimuth.h"
18 #include "position.h"
19 #include "samplingdata.h"
20 
21 class IOObj;
22 class SeisPSReader;
23 class SeisTrc;
24 class SeisTrcBuf;
25 
30 public:
31  Gather();
32  Gather(const FlatPosData&);
34 
35  bool is3D() const { return !trckey_.is2D(); }
36 
37  bool readFrom(const DBKey&,const TrcKey&,
38  int component=0,
39  uiString* errmsg=0);
40  bool readFrom(const IOObj&,const TrcKey&,
41  int component=0,
42  uiString* errmsg=0);
43  bool readFrom(const IOObj&,SeisPSReader& rdr,
44  const TrcKey&,int component=0,
45  uiString* errmsg=0);
46 
47  const Coord& getCoord() const { return coord_; }
48  virtual Coord3 getCoord(int,int) const
49  { return Coord3(coord_.x_,coord_.y_,0); }
50 
51  void detectOuterMutes(int* depths,
52  int taperlen=0) const;
55  void detectInnerMutes(int* depths,
56  int taperlen=0) const;
57  /*<!For each trace, try to detect the first
58  inner-mute affected value. */
59 
60  const TrcKey& getTrcKey() const { return trckey_; }
61  void setTrcKey(const TrcKey& tk )
62  { trckey_ = tk; }
63 
64  const DBKey& getStoredID() const { return storageid_; }
65  const StepInterval<float>& zRange() const { return zrg_; }
66  void setZRange( const StepInterval<float>& zrg )
67  { zrg_ = zrg; }
68 
69  bool isLoaded() const { return arr2d_; }
70  int nrOffsets() const
71  { return data().info().getSize( 0 ); }
72 
73  const char* dimName(bool dim0) const;
74  void getAuxInfo(int,int,IOPar&) const;
75 
76  static int offsetDim() { return 0; }
77  static int zDim() { return 1; }
78 
79  float getOffset(int) const;
80  float getAzimuth(int) const;
81  OffsetAzimuth getOffsetAzimuth(int) const;
82 
83  bool isOffsetAngle() const {return offsetisangle_;}
84  bool isCorrected() const { return iscorr_; }
85  void setCorrected(bool yn) { iscorr_ = yn; }
86  bool zIsTime() const { return zit_; }
87 
88 
89  const DBKey& getVelocityID() const { return velocityid_; }
90  const DBKey& getStorageID() const { return storageid_; }
91  const DBKey& getStaticsID() const { return staticsid_; }
92 
93  static bool getVelocityID(const DBKey& stor,DBKey& vid);
94 
95  static const char* sDataPackCategory();
96  static const char* sKeyIsAngleGather();
97  static const char* sKeyIsCorr();
98  static const char* sKeyZisTime();
99 
100  static const char* sKeyPostStackDataID();
101  static const char* sKeyStaticsID();
102 
103  void getAzimuths( TypeSet<float>& azimuths ) const
104  { azimuths = azimuths_; }
105  void setAzimuths( const TypeSet<float>& azimuths )
106  { azimuths_ = azimuths; }
107 
108  // Will be removed after this version.
109  mDeprecated bool readFrom(const DBKey&,const BinID&,
110  int component=0,
111  uiString* errmsg=0);
112  mDeprecated bool readFrom(const IOObj&,const BinID&,
113  int component=0,
114  uiString* errmsg=0);
115  mDeprecated bool readFrom(const IOObj&,SeisPSReader& rdr,
116  const BinID&,int component=0,
117  uiString* errmsg=0);
118  mDeprecated bool readFrom(const DBKey&, const int tracenr,
119  const char* linename,int comp,
120  uiString* errmsg=0);
121  mDeprecated bool readFrom(const IOObj&, const int tracenr,
122  const char* linename,int comp,
123  uiString* errmsg=0);
124  const BinID& getBinID() const
125  { return trckey_.position(); }
126  void setBinID( const BinID& bid )
127  { trckey_.setPosition( bid ); }
128 
129 protected:
130 
131  ~Gather();
132 
137  bool iscorr_;
138 
139  bool zit_;
144 
145 public:
146 
147  bool setFromTrcBuf(SeisTrcBuf&,int comp,
148  bool snapzrangetosi=false);
149 };
150 
151 
155 {
156 public:
157  GatherSetDataPack(const char* ctgery,
158  const ObjectSet<Gather>&);
159  GatherSetDataPack( const char* cat )
160  : DataPack(cat) {}
162 
163  void fill(Array2D<float>&,int offsetidx) const;
164  void fill(SeisTrcBuf&,int offsetidx) const;
165  void fill(SeisTrcBuf&,Interval<float> stackrg) const;
166  void fillGatherBuf(SeisTrcBuf&,const BinID&);
167  SeisTrc* getTrace(int gatheridx,int offsetidx);
168  const SeisTrc* getTrace(int gatheridx,int offsetidx) const;
169  const SeisTrc* getTrace(const BinID&,int offsetidx) const;
170 
171  const Gather* getGather(const BinID&) const;
172  const ObjectSet<Gather>& getGathers() const { return gathers_; }
173  ObjectSet<Gather>& getGathers() { return gathers_; }
174  void addGather(Gather*);
176  { gathers_ = gathers;}
177 
178 protected:
179 
181 
182  SeisTrc* gtTrace(int gatheridx,int offsetidx) const;
183 
185 
186  virtual float gtNrKBytes() const;
187 
188 };
DBKey storageid_
Definition: prestackgather.h:134
#define mExpClass(module)
Definition: commondefs.h:157
Seismics.
Definition: segydirectdef.h:20
TrcKey trckey_
Definition: prestackgather.h:140
Definition: ioobj.h:57
static int offsetDim()
Definition: prestackgather.h:76
DBKey velocityid_
Definition: prestackgather.h:133
Positioning of flat &#39;bulk&#39; data. Only the &#39;x1&#39; axis can be irregular.
Definition: flatposdata.h:24
bool zIsTime() const
Definition: prestackgather.h:86
#define mODTextTranslationClass(clss)
Definition: uistring.h:37
PreStack gather.
Definition: prestackgather.h:28
const DBKey & getStorageID() const
Definition: prestackgather.h:90
bool isCorrected() const
Definition: prestackgather.h:84
bool zit_
Definition: prestackgather.h:139
static int zDim()
Definition: prestackgather.h:77
Definition: uistring.h:88
void setBinID(const BinID &bid)
Definition: prestackgather.h:126
void setZRange(const StepInterval< float > &zrg)
Definition: prestackgather.h:66
#define mDeclMonitorableAssignment(clss)
like mDeclAbstractMonitorableAssignment but for non-abstract subclasses. Implements the clone() metho...
Definition: monitor.h:111
const TrcKey & getTrcKey() const
Definition: prestackgather.h:60
DBKey staticsid_
Definition: prestackgather.h:135
A data packet: data+positioning and more that needs to be shared.
Definition: datapack.h:39
void fill(SeisPacketInfo &) const
3D point or vector
Definition: commontypes.h:57
bool offsetisangle_
Definition: prestackgather.h:136
const DBKey & getStaticsID() const
Definition: prestackgather.h:91
Generalized set of parameters of the keyword-value type.
Definition: iopar.h:53
int nrOffsets() const
Definition: prestackgather.h:70
StepInterval< float > zrg_
Definition: prestackgather.h:143
bool isOffsetAngle() const
Definition: prestackgather.h:83
void setGathers(RefObjectSet< Gather > &gathers)
Definition: prestackgather.h:175
bool is3D() const
Definition: prestackgather.h:35
virtual Coord3 getCoord(int, int) const
Definition: prestackgather.h:48
const DBKey & getVelocityID() const
Definition: prestackgather.h:89
void getAzimuths(TypeSet< float > &azimuths) const
Definition: prestackgather.h:103
const BinID & getBinID() const
Definition: prestackgather.h:124
const DBKey & getStoredID() const
Definition: prestackgather.h:64
bool isLoaded() const
Definition: prestackgather.h:69
Coord3d Coord3
Definition: commontypes.h:84
RefObjectSet< Gather > gathers_
Definition: prestackgather.h:184
bool iscorr_
Definition: prestackgather.h:137
#define mDeprecated
Definition: plfdefs.h:213
Positioning in a seismic survey: inline/crossline or lineNr/trcNr.
Definition: binid.h:28
Seismic trace.
Definition: seistrc.h:31
const ObjectSet< Gather > & getGathers() const
Definition: prestackgather.h:172
set of seismic traces.
Definition: seisbuf.h:28
Coord coord_
Definition: prestackgather.h:141
const Coord & getCoord() const
Definition: prestackgather.h:47
ObjectSet< Gather > & getGathers()
Definition: prestackgather.h:173
DataPack for flat data.
Definition: datapackbase.h:61
GatherSetDataPack(const char *cat)
Definition: prestackgather.h:159
Full key to any object in the OpendTect data store.
Definition: dbkey.h:36
Represents a unique trace position in one of the surveys that OpendTect is managing.
Definition: trckey.h:26
Definition: offsetazimuth.h:24
void setTrcKey(const TrcKey &tk)
Definition: prestackgather.h:61
2D point or vector class.
Definition: commontypes.h:58
A DataPack containing an objectset of gathers.
Definition: prestackgather.h:154
reads from a prestack seismic data store.
Definition: seispsread.h:33
void setAzimuths(const TypeSet< float > &azimuths)
Definition: prestackgather.h:105
TypeSet< float > azimuths_
Definition: prestackgather.h:142
const SeisTrc * getTrace(EM::SubID) const
const StepInterval< float > & zRange() const
Definition: prestackgather.h:65
void setCorrected(bool yn)
Definition: prestackgather.h:85

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