OpendTect-6_4  6.4
cbvsreader.h
Go to the documentation of this file.
1 #ifndef cbvsreader_h
2 #define cbvsreader_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: 12-3-2001
10  Contents: Common Binary Volume Storage format header
11  RCS: $Id$
12 ________________________________________________________________________
13 
14 -*/
15 
16 #include "generalmod.h"
17 #include "cbvsio.h"
18 #include "cbvsinfo.h"
19 #include "datainterp.h"
20 #include "trckeyzsampling.h"
21 
22 class TraceData;
23 
24 
25 
40 mExpClass(General) CBVSReader : public CBVSIO
41 {
42 public:
43 
44  CBVSReader(od_istream*,bool glob_info_only=false,
45  bool forceusecbvsinfo=false);
46  ~CBVSReader();
47 
48  const CBVSInfo& info() const { return info_; }
49  int bytesOverheadPerTrace() const;
50  void close();
51  BinID nextBinID() const;
52 
53  bool goTo(const BinID&);
54  bool toStart();
55  bool toNext();
56 
57  bool hasAuxInfo() const { return auxnrbytes_; }
58  bool getAuxInfo(PosAuxInfo&);
61  bool fetch(void** buffers,const bool* comps=0,
62  const Interval<int>* samps=0,
63  int offs=0);
64  bool fetch(TraceData& buffers,const bool* comps=0,
65  const Interval<int>* samps=0,
66  int offs=0);
72 
73  static const char* check(od_istream&);
76 
77  int trcNrAtPosition() const { return idxatpos_; }
78 
79  const TypeSet<Coord>& trailerCoords() const { return trailercoords_; }
80 
81  static int defHeaderSize() { return 52; }
82 
83 protected:
84 
87 
88  void getAuxInfoSel(const char*);
89  bool readComps();
90  bool readGeom(bool);
91  bool readTrailer();
92  void getText(int,BufferString&);
93  void toOffs(od_int64);
94  int getPosNr(const PosInfo::CubeDataPos&,bool) const;
95  Coord getTrailerCoord(const BinID&) const;
96  void mkPosNrs();
97 
98 private:
99 
111 
112  bool readInfo(bool,bool);
115 
116  friend class CBVSReadMgr;
119  CoordPol coordPol() const { return coordpol_; }
120 
121  void setCubePos(bool fromgeom) const;
122  void updCurBinID() const;
123 
124 };
125 
126 
127 #endif
#define mExpClass(module)
Definition: commondefs.h:160
DataInterpreter< int > iinterp_
Definition: cbvsreader.h:105
od_istream & strm_
Definition: cbvsreader.h:85
PosInfo::CubeDataPos curldscubepos_
Definition: cbvsreader.h:118
#define od_int64
Definition: plftypes.h:36
int bytespertrace_
Definition: cbvsreader.h:101
int idxatpos_
Definition: cbvsreader.h:103
A cartesian coordinate in 2D space.
Definition: coord.h:25
CoordPol
Definition: cbvsio.h:50
Manager for reading CBVS file-packs.
Definition: cbvsreadmgr.h:31
OD class for stream read.
Definition: od_istream.h:24
PosInfo::CubeDataPos curgeomcubepos_
Definition: cbvsreader.h:117
const CBVSInfo & info() const
Definition: cbvsreader.h:48
CBVSInfo info_
Definition: cbvsreader.h:86
Reader for CBVS format.
Definition: cbvsreader.h:40
static int defHeaderSize()
Definition: cbvsreader.h:81
Data available in CBVS format header and trailer.
Definition: cbvsinfo.h:34
const TypeSet< Coord > & trailerCoords() const
Definition: cbvsreader.h:79
BinID firstbinid_
Definition: cbvsreader.h:102
Horizontal sampling (inline and crossline range and steps).
Definition: trckeysampling.h:27
Position in a CubeData.
Definition: posinfo.h:73
bool hasAuxInfo() const
Definition: cbvsreader.h:57
TrcKeySampling hs_
Definition: cbvsreader.h:108
DataInterpreter< double > dinterp_
Definition: cbvsreader.h:107
Base class for CBVS reader and writer.
Definition: cbvsio.h:29
OD::String with its own variable length buffer. The buffer has a guaranteed minimum size...
Definition: bufstring.h:40
Positioning in a seismic survey: inline/crossline or lineNr/trcNr.
Definition: binid.h:30
Auxiliray data possibly needed at location. Mostly a seismic thing.
Definition: posauxinfo.h:22
bool hinfofetched_
Definition: cbvsreader.h:100
A set of data buffers and their interpreters.
Definition: tracedata.h:32
int auxnrbytes_
Definition: cbvsreader.h:104
DataInterpreter< float > finterp_
Definition: cbvsreader.h:106
CoordPol coordPol() const
Definition: cbvsreader.h:119
Interval< int > samprg_
Definition: cbvsreader.h:109
TypeSet< int > posnrs_
Definition: cbvsreader.h:110
od_int64 datastartfo_
Definition: cbvsreader.h:114
int trcNrAtPosition() const
Definition: cbvsreader.h:77
od_int64 lastposfo_
Definition: cbvsreader.h:113

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