OpendTect-6_4  6.4
emsurfauxdataio.h
Go to the documentation of this file.
1 #ifndef emsurfauxdataio_h
2 #define emsurfauxdataio_h
3 
4 /*+
5 ________________________________________________________________________
6 
7  (C) dGB Beheer B.V.; (LICENSE) http://opendtect.org/OpendTect_license.txt
8  Author: Kristofer Tingdahl
9  Date: 4-11-2002
10  RCS: $Id$
11 ________________________________________________________________________
12 
13 
14 -*/
15 
16 #include "earthmodelmod.h"
17 #include "emposid.h"
18 #include "executor.h"
19 #include "od_iosfwd.h"
20 class TrcKeySampling;
21 template <class T> class DataInterpreter;
22 
23 
24 namespace EM
25 {
26 
27 class Horizon3D;
28 
33 mExpClass(EarthModel) dgbSurfDataWriter : public Executor
35 public:
36  dgbSurfDataWriter(const EM::Horizon3D& surf,
37  int dataidx,
38  const TrcKeySampling*,
39  bool binary,
40  const char* filename);
52 
53  virtual int nextStep();
54  virtual od_int64 nrDone() const;
55  virtual od_int64 totalNr() const;
56  virtual uiString uiMessage() const;
57  virtual uiString uiNrDoneText() const;
58 
59  static const char* sKeyAttrName();
60  static const char* sKeyIntDataChar();
61  static const char* sKeyInt64DataChar();
62  static const char* sKeyFloatDataChar();
63  static const char* sKeyFileType();
64  static const char* sKeyShift();
65 
66  static BufferString createHovName(const char* base,int idx);
67  static bool writeDummyHeader(const char* fnm,
68  const char* attrnm);
69 
70 protected:
71 
72  bool writeInt(int);
73  bool writeInt64(od_int64);
74  bool writeFloat(float);
75  int dataidx_;
78 
82 
84  int nrdone_;
85  int totalnr_;
87 
89  bool binary_;
91 };
92 
93 
98 mExpClass(EarthModel) dgbSurfDataReader : public Executor
100 public:
101  dgbSurfDataReader(const char* filename);
103 
104  const char* dataName() const;
105  float shift() const;
106  const char* dataInfo() const;
107 
108  void setSurface(EM::Horizon3D&);
109 
110  virtual int nextStep();
111  virtual od_int64 nrDone() const;
112  virtual od_int64 totalNr() const;
113  virtual uiString uiMessage() const;
114  virtual uiString uiNrDoneText() const;
115 
116  static uiString sHorizonData();
117 
118 protected:
119 
120  bool readInt(int&);
121  bool readInt64(od_int64&);
122  bool readFloat(float&);
125  int dataidx_;
126  float shift_;
129 
134 
136  int nrdone_;
137  int totalnr_;
139 
144  bool error_;
145 };
146 
147 };
148 
149 #endif
od_int16 SectionID
Definition: emposid.h:25
#define mExpClass(module)
Definition: commondefs.h:160
uiString dataName(GeomType, bool both_pre_post=false)
DataInterpreter< od_int64 > * int64interpreter_
Definition: emsurfauxdataio.h:142
OD class for stream write common access to the user log file, or std::cout in batch progs...
Definition: od_ostream.h:26
int valsleftonsection_
Definition: emsurfauxdataio.h:133
uiString errmsg_
Definition: emsurfauxdataio.h:86
BufferString datainfo_
Definition: emsurfauxdataio.h:124
#define mODTextTranslationClass(clss)
Definition: uistring.h:38
int nrdone_
Definition: emsurfauxdataio.h:84
bool error_
Definition: emsurfauxdataio.h:144
#define od_int64
Definition: plftypes.h:36
od_istream * stream_
Definition: emsurfauxdataio.h:140
Definition: uistring.h:89
bool binary_
Definition: emsurfauxdataio.h:89
BufferString filename_
Definition: emsurfauxdataio.h:90
OD class for stream read.
Definition: od_istream.h:24
EM::Horizon3D * surf_
Definition: emsurfauxdataio.h:127
int nrsections_
Definition: emsurfauxdataio.h:131
Byte-level data interpreter.
Definition: cbvswriter.h:22
BufferString dataname_
Definition: emsurfauxdataio.h:123
int dataidx_
Definition: emsurfauxdataio.h:75
Horizontal sampling (inline and crossline range and steps).
Definition: trckeysampling.h:27
int nrdone_
Definition: emsurfauxdataio.h:136
const TrcKeySampling * sel_
Definition: emsurfauxdataio.h:77
const TrcKeySampling * sel_
Definition: emsurfauxdataio.h:128
Writes auxdata to file.
Definition: emsurfauxdataio.h:33
Reads auxdata from file.
Definition: emsurfauxdataio.h:98
int totalnr_
Definition: emsurfauxdataio.h:137
od_ostream * stream_
Definition: emsurfauxdataio.h:88
uiString errmsg_
Definition: emsurfauxdataio.h:138
DataInterpreter< int > * intinterpreter_
Definition: emsurfauxdataio.h:141
OD::String with its own variable length buffer. The buffer has a guaranteed minimum size...
Definition: bufstring.h:40
int totalnr_
Definition: emsurfauxdataio.h:85
TypeSet< EM::SubID > subids_
Definition: emsurfauxdataio.h:79
Earth Model objects like horizons, faults, fault-sticks and bodies.
Definition: embody.h:25
int sectionindex_
Definition: emsurfauxdataio.h:130
3D Horizon. A Horizon is made up of one or more grids (so they can overlap at faults). The grids are defined by knot-points in a matrix and fillstyle in between the knots.
Definition: emhorizon3d.h:96
int dataidx_
Definition: emsurfauxdataio.h:125
int sectionindex_
Definition: emsurfauxdataio.h:81
int chunksize_
Definition: emsurfauxdataio.h:135
TypeSet< float > values_
Definition: emsurfauxdataio.h:80
DataInterpreter< float > * floatinterpreter_
Definition: emsurfauxdataio.h:143
int chunksize_
Definition: emsurfauxdataio.h:83
Specification to enable chunkwise execution of a process.
Definition: executor.h:39
float shift_
Definition: emsurfauxdataio.h:126
const EM::Horizon3D & surf_
Definition: emsurfauxdataio.h:76
EM::SectionID currentsection_
Definition: emsurfauxdataio.h:132

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