OpendTect-6_4  6.4
seiscbvs.h
Go to the documentation of this file.
1 #ifndef seiscbvs_h
2 #define seiscbvs_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: April 2001
10  RCS: $Id$
11 ________________________________________________________________________
12 
13 CBVS-based seimic translator.
14 
15 -*/
16 
17 #include "seismod.h"
18 #include "seistrctr.h"
19 #include "tracedata.h"
20 #include "cbvsinfo.h"
21 class CBVSReadMgr;
22 class CBVSWriteMgr;
23 class VBrickSpec;
24 
25 
28 public:
29 
30  CBVSSeisTrcTranslator(const char*,const char*);
31  static CBVSSeisTrcTranslator* make(const char* fnm,bool forinfoonly,
32  bool is2d, uiString* errmsg=0,
33  bool forceusecbvsinfo=false);
35 
36  bool readInfo(SeisTrcInfo&);
37  bool read(SeisTrc&);
38  bool skip(int nrtrcs=1);
39 
40  bool supportsGoTo() const { return true; }
41  bool goTo(const BinID&);
42  bool toStart();
43  virtual int bytesOverheadPerTrace() const;
44  virtual bool forRead() const;
45 
46  virtual void usePar(const IOPar&);
47 
48  const CBVSReadMgr* readMgr() const { return rdmgr_; }
49  Pos::IdxPair2Coord getTransform() const;
50 
51  virtual bool getGeometryInfo(PosInfo::CubeData&) const;
52 
53  virtual bool implRemove(const IOObj*) const;
54  virtual bool implRename(const IOObj*,const char*,
55  const CallBack* cb=0) const;
56  virtual bool implSetReadOnly(const IOObj*,bool) const;
57  const char* defExtension() const { return sKeyDefExtension(); }
58  static const char* sKeyDefExtension();
59 
60  bool is2D() const { return is2d_; }
61  void set2D(bool yn=true);
62  bool singleFile() const { return single_file_; }
63  void setSingleFile( bool yn=true ) { single_file_ = yn; }
64  void setForceUseCBVSInfo(bool yn) { forceusecbvsinfo_=yn;}
65 
66  void setCoordPol(bool dowrite,bool intrailer);
67  void setPreselDataType( int dt ) { preseldatatype_ = dt;}
68 
69  bool isUserSelectable(bool) const { return true; }
70 
71  static const char* sKeyOptDir() { return "Optimized direction";}
72 
73 protected:
74 
75  bool forread_;
76  bool headerdone_; // Will be in base class after 6.2
77  bool donext_;
78  int nrdone_;
79  int coordpol_;
80 
81  // Following variables are inited by commitSelections_
82  bool* compsel_;
83  unsigned char** blockbufs_; // Will be removed after 6.2
84  TraceDataInterpreter** storinterps_; // Will be removed after 6.2
87 
91  bool is2d_;
94 
95  virtual void cleanUp();
96  virtual bool initRead_();
97  virtual bool initWrite_(const SeisTrc&);
98  virtual bool commitSelections_();
99  virtual bool writeTrc_(const SeisTrc&);
100  virtual void blockDumped(int);
101  bool startWrite();
102  bool toNext();
103  bool getFileName(BufferString&);
104  bool inactiveSelData() const;
105  int selRes(const BinID&) const;
106 
107 private:
108 
109  static const IOPar& datatypeparspec;
110 
111  void destroyVars(int);
112  virtual bool readData(TraceData* externalbuf);
113 
114 };
115 
116 
117 #endif
#define mExpClass(module)
Definition: commondefs.h:160
Summary for a Seismic object.
Definition: segydirectdef.h:23
Definition: ioobj.h:58
const char * defExtension() const
Definition: seiscbvs.h:57
Writer for CBVS file packs.
Definition: cbvswritemgr.h:40
CBVSReadMgr * rdmgr_
Definition: seiscbvs.h:88
bool headerdone_
Definition: seiscbvs.h:76
#define mODTextTranslationClass(clss)
Definition: uistring.h:38
bool isUserSelectable(bool) const
Definition: seiscbvs.h:69
PosAuxInfo auxinf_
Definition: seiscbvs.h:90
void usePar(const IOPar &iop, ODPolygon< T > &poly, const char *inpkey)
Definition: polygon.h:188
unsigned char ** blockbufs_
Definition: seiscbvs.h:83
Definition: uistring.h:89
static const IOPar & datatypeparspec
Definition: seiscbvs.h:109
Manager for reading CBVS file-packs.
Definition: cbvsreadmgr.h:31
bool forread_
Definition: seiscbvs.h:75
Byte-level data interpreter.
Definition: cbvswriter.h:22
bool is2d_
Definition: seiscbvs.h:91
bool single_file_
Definition: seiscbvs.h:92
Generalized set of parameters of the keyword-value type.
Definition: iopar.h:47
bool supportsGoTo() const
Definition: seiscbvs.h:40
Definition: seistrctr.h:90
bool is2D() const
Definition: seiscbvs.h:60
const CBVSReadMgr * readMgr() const
Definition: seiscbvs.h:48
void setPreselDataType(int dt)
Definition: seiscbvs.h:67
Information for a seismic trace, AKA trace header info.
Definition: seisinfo.h:27
bool donext_
Definition: seiscbvs.h:77
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
Seismic trace.
Definition: seistrc.h:34
static const char * sKeyOptDir()
Definition: seiscbvs.h:71
bool * compsel_
Definition: seiscbvs.h:82
bool forceusecbvsinfo_
Definition: seiscbvs.h:93
int preseldatatype_
Definition: seiscbvs.h:85
TraceDataInterpreter ** storinterps_
Definition: seiscbvs.h:84
Vertical bricking specification.
Definition: cbvswritemgr.h:26
CBVSWriteMgr * wrmgr_
Definition: seiscbvs.h:89
A set of data buffers and their interpreters.
Definition: tracedata.h:32
void setForceUseCBVSInfo(bool yn)
Definition: seiscbvs.h:64
int coordpol_
Definition: seiscbvs.h:79
CallBacks object-oriented (object + method).
Definition: callback.h:57
Position info for an entire 3D cube. The LineData&#39;s are not sorted.
Definition: posinfo.h:95
int nrdone_
Definition: seiscbvs.h:78
VBrickSpec & brickspec_
Definition: seiscbvs.h:86
Encapsulates linear transform from (i,j) index to (x,y) coordinates.
Definition: posidxpair2coord.h:26
Definition: seiscbvs.h:26
void setSingleFile(bool yn=true)
Definition: seiscbvs.h:63
#define isTranslator(spec, clss)
Definition: transl.h:230
bool singleFile() const
Definition: seiscbvs.h:62

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