OpendTect-6_4  6.4
cbvswriter.h
Go to the documentation of this file.
1 #ifndef cbvswriter_h
2 #define cbvswriter_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 writer
11  RCS: $Id$
12 ________________________________________________________________________
13 
14 -*/
15 
16 #include "generalmod.h"
17 #include "cbvsio.h"
18 #include "cbvsinfo.h"
19 #include "posinfo.h"
20 #include "od_ostream.h"
21 
22 template <class T> class DataInterpreter;
23 class TraceData;
24 
25 
38 mExpClass(General) CBVSWriter : public CBVSIO
39 {
40 public:
41 
43  const PosAuxInfo*,CoordPol cp=InAux);
48  const CBVSInfo&);
50  ~CBVSWriter();
51 
52  unsigned long byteThreshold() const { return thrbytes_; }
54  void setByteThreshold( unsigned long n )
55  { thrbytes_ = n; }
56  void forceLineStep( const BinID& stp )
57  { forcedlinestep_ = stp; }
58  void forceNrTrcsPerPos( int nr )
59  { nrtrcsperposn_ = nr; nrtrcsperposn_status_ = 0; }
60  void forceTrailer( bool yn=true )
61  { forcetrailer_ = yn; }
62 
63  int put(void**,int offs=0);
64  int put(const TraceData&,int offs=0);
68  void close() { doClose( true ); }
69  void ciaoForNow() { doClose(false); }
72  const CBVSInfo::SurvGeom& survGeom() const { return survgeom_; }
73  const PosAuxInfoSelection& auxInfoSel() { return auxinfosel_; }
74 
75 protected:
76 
78  unsigned long thrbytes_;
84 
85  void writeHdr(const CBVSInfo&);
86  void putAuxInfoSel(unsigned char*) const;
87  void writeComps(const CBVSInfo&);
88  void writeGeom();
89  void doClose(bool);
90 
91  void getRealGeometry();
92  bool writeTrailer();
93 
94 
95 private:
96 
105  CBVSInfo::SurvGeom survgeom_;
106 
108 
109  void init(const CBVSInfo&);
110  void getBinID();
111  void newSeg(bool);
112  bool writeAuxInfo();
113 
114 };
115 
116 
117 #endif
#define mExpClass(module)
Definition: commondefs.h:160
void forceLineStep(const BinID &stp)
Definition: cbvswriter.h:56
void ciaoForNow()
Definition: cbvswriter.h:69
void forceTrailer(bool yn=true)
Definition: cbvswriter.h:60
OD class for stream write common access to the user log file, or std::cout in batch progs...
Definition: od_ostream.h:26
int * nrbytespersample_
Definition: cbvswriter.h:81
unsigned long thrbytes_
Definition: cbvswriter.h:78
bool init()
void close()
Definition: cbvswriter.h:68
od_stream::Pos geomsp_
file offset of geometry data
Definition: cbvswriter.h:97
void forceNrTrcsPerPos(int nr)
Definition: cbvswriter.h:58
const PosAuxInfoSelection & auxInfoSel()
Definition: cbvswriter.h:73
CoordPol
Definition: cbvsio.h:50
Selection of aux info at location. Note that BinID is always selected.
Definition: posauxinfo.h:49
const PosAuxInfo * auxinfo_
Definition: cbvswriter.h:107
bool file_lastinl_
Definition: cbvswriter.h:100
void setByteThreshold(unsigned long n)
Definition: cbvswriter.h:54
Byte-level data interpreter.
Definition: cbvswriter.h:22
Data available in CBVS format header and trailer.
Definition: cbvsinfo.h:34
bool forcetrailer_
Definition: cbvswriter.h:83
Writer for CBVS format.
Definition: cbvswriter.h:38
int nrtrcsperposn_status_
Definition: cbvswriter.h:102
unsigned long byteThreshold() const
The default is unlimited.
Definition: cbvswriter.h:52
CBVSInfo::SurvGeom survgeom_
Definition: cbvswriter.h:105
Base class for CBVS reader and writer.
Definition: cbvsio.h:29
od_stream_Pos Pos
Definition: od_stream.h:58
int checknrtrcsperposn_
Definition: cbvswriter.h:103
int trcswritten_
Definition: cbvswriter.h:98
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
PosAuxInfoSelection auxinfosel_
Definition: cbvswriter.h:104
int auxnrbytes_
Definition: cbvswriter.h:79
BinID forcedlinestep_
Definition: cbvswriter.h:82
int nrtrcsperposn_
Definition: cbvswriter.h:101
BinID prevbinid_
Definition: cbvswriter.h:99
A set of data buffers and their interpreters.
Definition: tracedata.h:32
bool input_rectnreg_
Definition: cbvswriter.h:80
od_ostream & strm_
Definition: cbvswriter.h:77
const CBVSInfo::SurvGeom & survGeom() const
Definition: cbvswriter.h:72

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