OpendTect-6_4  6.4
seisioobjinfo.h
Go to the documentation of this file.
1 #ifndef seisioobjinfo_h
2 #define seisioobjinfo_h
3 
4 /*+
5 ________________________________________________________________________
6 
7  (C) dGB Beheer B.V.; (LICENSE) http://opendtect.org/OpendTect_license.txt
8  Author: A.H. Bril
9  Date: 25-10-1996
10  RCS: $Id$
11 ________________________________________________________________________
12 
13 -*/
14 
15 #include "seismod.h"
16 
17 #include "datachar.h"
18 #include "samplingdata.h"
19 #include "seistype.h"
20 #include "survgeom.h"
21 #include "bufstring.h"
22 
23 
24 class BinIDValueSet;
25 class BufferStringSet;
26 class IOObj;
27 class SeisIOObjInfo;
28 class SeisTrcTranslator;
29 class TrcKeyZSampling;
30 namespace ZDomain { class Def; }
31 
32 
35 namespace Seis {
36 
38 {
39 public:
40  ObjectSummary(const MultiID&);
41  ObjectSummary(const IOObj&);
42  ObjectSummary(const IOObj&,Pos::GeomID);
43  ObjectSummary(const ObjectSummary&);
44  ~ObjectSummary();
45 
46  ObjectSummary& operator =(const ObjectSummary&);
47 
48  inline bool isOK() const { return !bad_; }
49  inline bool is2D() const { return Seis::is2D(geomtype_); }
50  inline bool isPS() const { return Seis::isPS(geomtype_); }
51 
52  bool hasSameFormatAs(const BinDataDesc&) const;
53  inline const DataCharacteristics getDataChar() const
54  { return datachar_; }
55  inline GeomType geomType() const { return geomtype_; }
56  const StepInterval<float>& zRange() const { return zsamp_; }
57 
59  { return ioobjinfo_; }
60 
61 protected:
62 
64 
69 
70  //Cached
71  bool bad_;
72  int nrcomp_;
79 
80 private:
81 
82  void init();
83  void init2D(Pos::GeomID);
84  void refreshCache(const SeisTrcTranslator&);
85 
86  friend class RawTrcsSequence;
87 
88 };
89 
90 }; // namespace Seis
91 
95 {
96 public:
97  SeisIOObjInfo(const IOObj*);
98  SeisIOObjInfo(const IOObj&);
99  SeisIOObjInfo(const MultiID&);
100  SeisIOObjInfo(const char* ioobjnm,Seis::GeomType);
101  SeisIOObjInfo(const SeisIOObjInfo&);
102  ~SeisIOObjInfo();
103 
104  SeisIOObjInfo& operator =(const SeisIOObjInfo&);
105 
106  inline bool isOK() const { return !bad_; }
107  inline bool is2D() const { return geomtype_ > Seis::VolPS; }
108  inline bool isPS() const { return geomtype_ == Seis::VolPS
109  || geomtype_ == Seis::LinePS; }
110 
111  Seis::GeomType geomType() const { return geomtype_; }
112  const IOObj* ioObj() const { return ioobj_; }
113  bool isTime() const;
114  bool isDepth() const;
115  const ZDomain::Def& zDomainDef() const;
116 
117  mStruct(Seis) SpaceInfo
118  {
119  SpaceInfo(int ns=-1,int ntr=-1,int bps=4);
120  int expectedMBs() const;
121 
122  int expectednrsamps;
123  int expectednrtrcs;
124  int maxbytespsamp;
125  };
126 
127  bool getDefSpaceInfo(SpaceInfo&) const;
128  int expectedMBs(const SpaceInfo&) const;
129  od_int64 getFileSize() const;
130  static od_int64 getFileSize(const char* fnm,int& nrfiles);
131  bool getRanges(TrcKeyZSampling&) const;
132  bool isFullyRectAndRegular() const; // Only CBVS
133  bool getDataChar(DataCharacteristics&) const;
134  bool getBPS(int&,int icomp) const;
136 
137  int nrComponents(Pos::GeomID geomid=
138  Survey::GM().cUndefGeomID()) const;
139  void getComponentNames(BufferStringSet&,
140  Pos::GeomID geomid=
141  Survey::GM().cUndefGeomID()) const;
142  bool getDisplayPars(IOPar&) const;
143 
144  mStruct(Seis) Opts2D
145  {
146  Opts2D()
147  : bvs_(0), steerpol_(2) {}
148  const BinIDValueSet* bvs_;
149  BufferString zdomky_;
150  int steerpol_;
152  };
154 
155  // 2D only
156  void getGeomIDs(TypeSet<Pos::GeomID>&) const;
158  Opts2D o2d=Opts2D() ) const
159  { getNms(b,o2d); }
160  bool getRanges(const Pos::GeomID geomid,
161  StepInterval<int>& trcrg,
162  StepInterval<float>& zrg) const;
163 
164  static void initDefault(const char* type=0);
166  static const MultiID& getDefault(const char* type=0);
167  static void setDefault(const MultiID&,const char* type=0);
168 
169  static bool hasData(Pos::GeomID);
170  static void getDataSetNamesForLine( Pos::GeomID geomid,
171  BufferStringSet& b,
172  Opts2D o2d=Opts2D() );
173  static void getDataSetNamesForLine( const char* nm,
174  BufferStringSet& b,
175  Opts2D o2d=Opts2D() );
176  static void getCompNames(const MultiID&,BufferStringSet&);
179  static void getLinesWithData(BufferStringSet& lnms,
180  TypeSet<Pos::GeomID>& gids);
181  static bool isCompatibleType(const char* omftypestr1,
182  const char* omftypestr2);
183 
184  mDeprecated SeisIOObjInfo(const char* ioobjnm);
185 protected:
186 
188  bool bad_;
190 
191  void setType();
192 
193  void getNms(BufferStringSet&,const Opts2D&) const;
194  int getComponentInfo(Pos::GeomID,BufferStringSet*) const;
195 
196 };
197 
198 
199 #endif
#define mExpClass(module)
Definition: commondefs.h:160
Summary for a Seismic object.
Definition: segydirectdef.h:23
const GeometryManager & GM()
Definition: ioobj.h:58
int nrdatabytespertrc_
Definition: seisioobjinfo.h:76
Info on IOObj for seismics.
Definition: seisioobjinfo.h:94
#define mStruct(module)
Definition: commondefs.h:165
bool isPS() const
Definition: seisioobjinfo.h:50
IOObj * ioobj_
Definition: seisioobjinfo.h:189
bool is2D(GeomType gt)
Definition: seistype.h:34
GeomType geomtype_
Definition: seisioobjinfo.h:67
#define od_int64
Definition: plftypes.h:36
bool init()
int nrbytestrcheader_
Definition: seisioobjinfo.h:77
GeomType geomType() const
Definition: seisioobjinfo.h:55
DataCharacteristics datachar_
Definition: seisioobjinfo.h:65
Definition: seistype.h:33
Set of BufferString objects.
Definition: bufstringset.h:28
bool isOK() const
Definition: seisioobjinfo.h:106
const StepInterval< float > & zRange() const
Definition: seisioobjinfo.h:56
Definition: seistype.h:33
Seis::GeomType geomtype_
Definition: seisioobjinfo.h:187
GeomType
Definition: seistype.h:33
bool isPS(GeomType gt)
Definition: seistype.h:38
bool bad_
Definition: seisioobjinfo.h:71
Generalized set of parameters of the keyword-value type.
Definition: iopar.h:47
Definition: seistrctr.h:90
StepInterval< float > zsamp_
Definition: seisioobjinfo.h:66
int nrdatabytespespercomptrc_
Definition: seisioobjinfo.h:75
const IOObj * ioObj() const
Definition: seisioobjinfo.h:112
byte-level data characteristics of stored data.
Definition: datachar.h:37
const DataCharacteristics getDataChar() const
Definition: seisioobjinfo.h:53
bool isDepth(const IOPar &)
const SeisIOObjInfo & ioobjinfo_
Definition: seisioobjinfo.h:63
Hor+Vert sampling in 3D surveys.
Definition: trckeyzsampling.h:35
bool isPS() const
Definition: seisioobjinfo.h:108
int64_t getFileSize(const char *fnm, bool followlink=true)
bytes
const SeisIOObjInfo & getFullInformation() const
Definition: seisioobjinfo.h:58
BufferStringSet compnms_
Definition: seisioobjinfo.h:68
int nrcomp_
Definition: seisioobjinfo.h:72
Seis::GeomType geomType() const
Definition: seisioobjinfo.h:111
bool is2D() const
Definition: seisioobjinfo.h:107
bool bad_
Definition: seisioobjinfo.h:188
void getLineNames(BufferStringSet &b, Opts2D o2d=Opts2D()) const
Definition: seisioobjinfo.h:157
Index_Type GeomID
Definition: commontypes.h:52
int nrsamppertrc_
Definition: seisioobjinfo.h:73
#define mDeprecated
Definition: plfdefs.h:233
OD::String with its own variable length buffer. The buffer has a guaranteed minimum size...
Definition: bufstring.h:40
bool isOK() const
Definition: seisioobjinfo.h:48
bool isTime(const IOPar &)
A Pos::IdxPairValueSet with BinIDs.
Definition: binidvalset.h:23
int nrbytespersamp_
Definition: seisioobjinfo.h:74
Description of binary data.
Definition: bindatadesc.h:43
int nrbytespertrc_
Definition: seisioobjinfo.h:78
Definition of z-domain.
Definition: zdomain.h:41
bool is2D() const
Definition: seisioobjinfo.h:49
Compound key consisting of ints.
Definition: multiid.h:25
Definition: seisioobjinfo.h:37
Buffer to a set of entire traces ( header + component data ) Can contain traces for several positions...
Definition: seisparallelreader.h:245
Definition: zdomain.h:20

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