OpendTect  6.6
cbvsreadmgr.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: A.H.Bril
8  Date: 14-4-2001
9  Contents: Common Binary Volume Storage read manager
10  RCS: $Id$
11 ________________________________________________________________________
12 
13 -*/
14 
15 #include "generalmod.h"
16 #include "cbvsio.h"
17 #include "cbvsinfo.h"
18 #include "datainterp.h"
19 class CBVSInfo;
20 class CBVSReader;
21 class TraceData;
22 class TrcKeyZSampling;
23 class od_ostream;
24 
25 
30 mExpClass(General) CBVSReadMgr : public CBVSIOMgr
31 {
32 public:
33 
34  CBVSReadMgr(const char*,const TrcKeyZSampling* cs=0,
35  bool single_file=false,
36  bool glob_info_only=false,
37  bool forceusecbvsinfo=false);
41 
42  const CBVSInfo& info() const { return info_; }
43  int bytesOverheadPerTrace() const;
44  void close();
45 
46  BinID nextBinID() const;
47  bool goTo(const BinID&);
48  bool toNext();
49  bool toStart();
50 
52  bool fetch(void**,const bool* comps=0,
53  const Interval<int>* samps=0);
54  bool fetch(TraceData&,const bool* comps=0,
55  const Interval<int>* samps=0);
57 
58  static const char* check(const char*);
61 
62  int nrComponents() const;
63  const BinID& binID() const;
64  void getIsRev(bool& inl, bool& crl) const;
65 
66  const char* baseFileName() const
67  { return (const char*)basefname_; }
68 
69  int nrReaders() const
70  { return readers_.size(); }
71  const CBVSReader& reader( int idx ) const
72  { return *readers_[idx]; }
75 
76  void dumpInfo(od_ostream&,bool include_compinfo) const;
77  const TypeSet<Coord>& trailerCoords() const;
81 
82 protected:
83 
86  bool vertical_;
88 
89  bool addReader(od_istream*,const TrcKeyZSampling*,bool,bool);
90  bool addReader(const char*,const TrcKeyZSampling*,bool,bool);
91  int nextRdrNr(int) const;
92  const char* errMsg_() const;
93 
94 private:
95 
96  void createInfo();
97  bool handleInfo(CBVSReader*,int);
98 
99 };
100 
101 
CBVSReadMgr::errMsg_
const char * errMsg_() const
CBVSIOMgr
Base class for CBVS read and write manager.
Definition: cbvsio.h:72
TraceData
A set of data buffers and their interpreters.
Definition: tracedata.h:32
CBVSReadMgr::~CBVSReadMgr
~CBVSReadMgr()
CBVSReadMgr::goTo
bool goTo(const BinID &)
CBVSReadMgr::readers_
ObjectSet< CBVSReader > readers_
Definition: cbvsreadmgr.h:84
ObjectSet< CBVSReader >
CBVSReadMgr::binID
const BinID & binID() const
CBVSReadMgr::toNext
bool toNext()
CBVSReadMgr::baseFileName
const char * baseFileName() const
Definition: cbvsreadmgr.h:66
mExpClass
#define mExpClass(module)
Definition: commondefs.h:177
od_istream
OD class for stream read common access to the std::cin.
Definition: od_istream.h:24
CBVSReadMgr
Manager for reading CBVS file-packs.
Definition: cbvsreadmgr.h:31
cbvsinfo.h
CBVSReadMgr::nextRdrNr
int nextRdrNr(int) const
CBVSReadMgr::nrReaders
int nrReaders() const
Definition: cbvsreadmgr.h:69
CBVSReadMgr::fetch
bool fetch(void **, const bool *comps=0, const Interval< int > *samps=0)
CBVSReadMgr::addReader
bool addReader(od_istream *, const TrcKeyZSampling *, bool, bool)
CBVSReader
Reader for CBVS format.
Definition: cbvsreader.h:40
CBVSReadMgr::check
static const char * check(const char *)
datainterp.h
CBVSReadMgr::reader
const CBVSReader & reader(int idx) const
Definition: cbvsreadmgr.h:71
CBVSReadMgr::handleInfo
bool handleInfo(CBVSReader *, int)
CBVSReadMgr::getPositions
void getPositions(TypeSet< BinID > &) const
CBVSReadMgr::rdr1firstsampnr_
int rdr1firstsampnr_
Definition: cbvsreadmgr.h:87
TrcKeyZSampling
Hor+Vert sampling in 3D surveys.
Definition: trckeyzsampling.h:35
CBVSReadMgr::toStart
bool toStart()
CBVSReadMgr::getIsRev
void getIsRev(bool &inl, bool &crl) const
BinID
Positioning in a seismic survey: inline/crossline or lineNr/trcNr.
Definition: binid.h:31
CBVSReadMgr::pruneReaders
int pruneReaders(const TrcKeyZSampling &)
returns number of readers left.
CBVSReadMgr::getPositions
void getPositions(TypeSet< Coord > &) const
This may actually reset the position to the first.
CBVSReadMgr::dumpInfo
void dumpInfo(od_ostream &, bool include_compinfo) const
CBVSReadMgr::close
void close()
PosAuxInfo
Auxiliray data possibly needed at location. Mostly a seismic thing.
Definition: posauxinfo.h:22
CBVSReadMgr::fetch
bool fetch(TraceData &, const bool *comps=0, const Interval< int > *samps=0)
See CBVSReader::fetch comments.
CBVSReadMgr::info
const CBVSInfo & info() const
Definition: cbvsreadmgr.h:42
cbvsio.h
CBVSReadMgr::bytesOverheadPerTrace
int bytesOverheadPerTrace() const
CBVSReadMgr::createInfo
void createInfo()
CBVSReadMgr::vertical_
bool vertical_
Definition: cbvsreadmgr.h:86
CBVSReadMgr::addReader
bool addReader(const char *, const TrcKeyZSampling *, bool, bool)
CBVSReadMgr::info_
CBVSInfo & info_
Definition: cbvsreadmgr.h:85
CBVSReadMgr::nrComponents
int nrComponents() const
CBVSReadMgr::getAuxInfo
bool getAuxInfo(PosAuxInfo &)
CBVSReadMgr::nextBinID
BinID nextBinID() const
CBVSInfo
Data available in CBVS format header and trailer.
Definition: cbvsinfo.h:34
Interval< int >
CBVSReadMgr::CBVSReadMgr
CBVSReadMgr(const char *, const TrcKeyZSampling *cs=0, bool single_file=false, bool glob_info_only=false, bool forceusecbvsinfo=false)
od_ostream
OD class for stream write common access to the user log file, or std::cout in other than od_main.
Definition: od_ostream.h:26
TypeSet< Coord >
CBVSReadMgr::trailerCoords
const TypeSet< Coord > & trailerCoords() const

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