OpendTect  6.3
cbvswriter.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: 12-3-2001
9  Contents: Common Binary Volume Storage format writer
10 ________________________________________________________________________
11 
12 -*/
13 
14 #include "generalmod.h"
15 #include "cbvsio.h"
16 #include "cbvsinfo.h"
17 #include "posinfo.h"
18 #include "od_ostream.h"
19 
20 template <class T> class DataInterpreter;
21 
22 
35 mExpClass(General) CBVSWriter : public CBVSIO
37 public:
38 
40  const PosAuxInfo*,CoordPol cp=InAux);
45  const CBVSInfo&);
47  ~CBVSWriter();
48 
49  unsigned long byteThreshold() const { return thrbytes_; }
51  void setByteThreshold( unsigned long n )
52  { thrbytes_ = n; }
53  void forceLineStep( const BinID& stp )
54  { forcedlinestep_ = stp; }
55  void forceNrTrcsPerPos( int nr )
56  { nrtrcsperposn_ = nr; nrtrcsperposn_status_ = 0; }
57  void forceTrailer( bool yn=true )
58  { forcetrailer_ = yn; }
59 
60  int put(void**,int offs=0);
64  void close() { doClose( true ); }
65  void ciaoForNow() { doClose(false); }
68  const CBVSInfo::SurvGeom& survGeom() const { return survgeom_; }
69  const PosAuxInfoSelection& auxInfoSel() { return auxinfosel_; }
70 
71 protected:
72 
74  unsigned long thrbytes_;
80 
81  void writeHdr(const CBVSInfo&);
82  void putAuxInfoSel(unsigned char*) const;
83  void writeComps(const CBVSInfo&);
84  void writeGeom();
85  void doClose(bool);
86 
87  void getRealGeometry();
88  bool writeTrailer();
89 
90 
91 private:
92 
102 
104 
105  void init(const CBVSInfo&);
106  void getBinID();
107  void newSeg(bool);
108  bool writeAuxInfo();
109 
110 };
#define mExpClass(module)
Definition: commondefs.h:157
void forceLineStep(const BinID &stp)
Definition: cbvswriter.h:53
void ciaoForNow()
Definition: cbvswriter.h:65
void forceTrailer(bool yn=true)
Definition: cbvswriter.h:57
OD class for stream write common access to the user log file, or std::cout in batch progs...
Definition: od_ostream.h:25
Survey::Geometry3D SurvGeom
Definition: seisblocksdata.h:41
int * nrbytespersample_
Definition: cbvswriter.h:77
unsigned long thrbytes_
Definition: cbvswriter.h:74
#define mODTextTranslationClass(clss)
Definition: uistring.h:37
bool init()
void close()
Definition: cbvswriter.h:64
od_stream::Pos geomsp_
file offset of geometry data
Definition: cbvswriter.h:93
void forceNrTrcsPerPos(int nr)
Definition: cbvswriter.h:55
const PosAuxInfoSelection & auxInfoSel()
Definition: cbvswriter.h:69
CoordPol
Definition: cbvsio.h:50
Selection of aux info at location. Note that BinID is always selected.
Definition: posauxinfo.h:82
const PosAuxInfo * auxinfo_
Definition: cbvswriter.h:103
bool file_lastinl_
Definition: cbvswriter.h:96
void setByteThreshold(unsigned long n)
Definition: cbvswriter.h:51
Byte-level data interpreter.
Definition: cbvswriter.h:20
Data available in CBVS format header and trailer.
Definition: cbvsinfo.h:32
bool forcetrailer_
Definition: cbvswriter.h:79
Writer for CBVS format.
Definition: cbvswriter.h:35
int nrtrcsperposn_status_
Definition: cbvswriter.h:98
unsigned long byteThreshold() const
The default is unlimited.
Definition: cbvswriter.h:49
CBVSInfo::SurvGeom survgeom_
Definition: cbvswriter.h:101
Base class for CBVS reader and writer.
Definition: cbvsio.h:28
void put(void *buf, od_int64 nr, T t) const
Definition: datainterp.h:77
od_stream_Pos Pos
Definition: od_stream.h:57
int checknrtrcsperposn_
Definition: cbvswriter.h:99
int trcswritten_
Definition: cbvswriter.h:94
Positioning in a seismic survey: inline/crossline or lineNr/trcNr.
Definition: binid.h:28
Auxiliary data possibly needed at location. Mostly a seismic thing.
Definition: posauxinfo.h:21
PosAuxInfoSelection auxinfosel_
Definition: cbvswriter.h:100
int auxnrbytes_
Definition: cbvswriter.h:75
BinID forcedlinestep_
Definition: cbvswriter.h:78
int nrtrcsperposn_
Definition: cbvswriter.h:97
BinID prevbinid_
Definition: cbvswriter.h:95
bool input_rectnreg_
Definition: cbvswriter.h:76
od_ostream & strm_
Definition: cbvswriter.h:73
const CBVSInfo::SurvGeom & survGeom() const
Definition: cbvswriter.h:68

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