OpendTect-6_4  6.4
segydirectdef.h
Go to the documentation of this file.
1 #ifndef segydirectdef_h
2 #define segydirectdef_h
3 
4 /*+
5 ________________________________________________________________________
6 
7  (C) dGB Beheer B.V.; (LICENSE) http://opendtect.org/OpendTect_license.txt
8  Author: Bert
9  Date: Jul 2008
10  RCS: $Id$
11 ________________________________________________________________________
12 
13 -*/
14 
15 #include "seismod.h"
16 #include "segyfiledata.h"
17 #include "bufstringset.h"
18 #include "executor.h"
19 #include "od_iosfwd.h"
20 #include "uistring.h"
21 
22 class IOObj;
23 namespace Seis { class PosIndexer; }
24 namespace PosInfo { class CubeData; class Line2DData; }
25 
26 
27 namespace SEGY {
28 
29 class FileSpec;
30 class Scanner;
31 class FileDataSet;
32 class PosKeyList;
33 
34 
36 { mODTextTranslationClass(DirectDef);
37 public:
38 
39  DirectDef();
40  DirectDef(const char*);
41  ~DirectDef();
42  bool isEmpty() const;
43 
44  //Functions to read/query
45  bool readFromFile(const char*);
46  const IOPar* segyPars() const;
47  FixedString fileName(int idx) const;
48  FileDataSet::TrcIdx find(const Seis::PosKey&,bool chkoffs) const;
49  FileDataSet::TrcIdx findOcc(const Seis::PosKey&,int occ) const;
51 
52  //Functions to write
53  void setData(FileDataSet&);
54  bool writeHeadersToFile(const char*);
57  od_ostream* getOutputStream() { return outstream_; }
58  bool writeFootersToFile();
62  const FileDataSet& fileDataSet() const { return *fds_; }
63  uiString errMsg() const { return errmsg_; }
64 
65  static const char* sKeyDirectDef();
66  static const char* sKeyFileType();
67  static const char* sKeyNrFiles();
68  static const char* sKeyIOCompr();
69  static const char* sKeyInt64DataChar();
70  static const char* sKeyInt32DataChar();
71  static const char* sKeyFloatDataChar();
72 
73  static const char* get2DFileName(const char*,const char*);
74  static const char* get2DFileName(const char*,Pos::GeomID);
75 
76  static bool readFooter(const char* fnm,IOPar&,od_stream_Pos&);
78  static bool updateFooter(const char*,const IOPar&,od_stream_Pos);
81  const PosInfo::CubeData& cubeData() const { return cubedata_; }
82  const PosInfo::Line2DData& lineData() const { return linedata_; }
83 
84 
85 protected:
86  void getPosData(PosInfo::CubeData&) const;
87  void getPosData(PosInfo::Line2DData&) const;
88 
91 
92  const FileDataSet* fds_;
94  SEGY::PosKeyList* keylist_;
96 
97  mutable uiString errmsg_;
98 
105 };
106 
107 
111 public:
112  FileIndexer(const MultiID& mid,bool isvol,
113  const FileSpec&,bool is2d,const IOPar&);
114  ~FileIndexer();
115 
116  int nextStep();
117 
118  uiString uiMessage() const;
119  od_int64 nrDone() const;
120  od_int64 totalNr() const;
121  uiString uiNrDoneText() const;
122 
123  const Scanner* scanner() const { return scanner_; }
124 
125 protected:
126 
129 
131  mutable uiString msg_;
133  bool is2d_;
134  bool isvol_;
135 
136 };
137 
138 
139 }; //Namespace
140 
141 #endif
#define mExpClass(module)
Definition: commondefs.h:160
Summary for a Seismic object.
Definition: segydirectdef.h:23
Definition: segyfiledata.h:43
od_stream_Pos cubedatastart_
Definition: segydirectdef.h:102
OD class for stream write common access to the user log file, or std::cout in batch progs...
Definition: od_ostream.h:26
Definition: ioobj.h:58
Definition: seisposindexer.h:29
IOObj * ioobj_
Definition: segydirectdef.h:127
#define mODTextTranslationClass(clss)
Definition: uistring.h:38
const Scanner * scanner() const
Definition: segydirectdef.h:123
Definition: segydirectdef.h:35
od_stream_Pos datastart_
Definition: segydirectdef.h:101
FileDataSet * myfds_
Definition: segydirectdef.h:93
OD::String that holds an existing text string.
Definition: fixedstring.h:29
#define od_int64
Definition: plftypes.h:36
od_int64 od_stream_Pos
Definition: od_iosfwd.h:21
Definition: segydirectdef.h:109
od_stream_Pos indexstart_
Definition: segydirectdef.h:103
builds an index of a list of positions, making it easy to find a specific position.
Definition: seisposindexer.h:48
Position info for a 2D line.
Definition: posinfo2d.h:65
Definition: uistring.h:89
const PosInfo::CubeData & cubeData() const
Definition: segydirectdef.h:81
DirectDef * directdef_
Definition: segydirectdef.h:132
Definition: segyfiledata.h:39
Definition: seisposkey.h:23
od_stream_Pos offsetstart_
Definition: segydirectdef.h:100
const FileDataSet & fileDataSet() const
Definition: segydirectdef.h:62
Generalized set of parameters of the keyword-value type.
Definition: iopar.h:47
bool is2d_
Definition: segydirectdef.h:133
od_ostream * getOutputStream()
Definition: segydirectdef.h:57
bool isEmpty(const SelData *sd)
Definition: seisselection.h:135
Scans SEG-Y file(s). For reports, you'd want to set rich info.
Definition: segyscanner.h:33
PosInfo::CubeData & cubedata_
Definition: segydirectdef.h:89
od_ostream * outstream_
Definition: segydirectdef.h:99
SEGY::PosKeyList * keylist_
Definition: segydirectdef.h:94
uiString errmsg_
Definition: segydirectdef.h:97
Seis::PosIndexer * indexer_
Definition: segydirectdef.h:95
const T * find(const ObjectSet< T > &os, const S &val)
Get const object in set.
Definition: objectset.h:183
Index_Type GeomID
Definition: commontypes.h:52
Specification for one or more files.
Definition: filespec.h:28
Position info, often segmented.
Definition: posinfo.h:40
BufferString errmsg_
Definition: horizontracker.h:119
uiString errMsg() const
Definition: segydirectdef.h:63
Keys that should be used with od_process_segyio.cc.
Definition: segybatchio.h:22
const PosInfo::Line2DData & lineData() const
Definition: segydirectdef.h:82
PosInfo::Line2DData & linedata_
Definition: segydirectdef.h:90
const FileDataSet * fds_
Definition: segydirectdef.h:92
Scanner * scanner_
Definition: segydirectdef.h:130
od_stream_Pos finalparstart_
Definition: segydirectdef.h:104
Position info for an entire 3D cube. The LineData&#39;s are not sorted.
Definition: posinfo.h:95
Definition: segyfiledef.h:37
Pos::GeomID geomid_
Definition: segydirectdef.h:128
Compound key consisting of ints.
Definition: multiid.h:25
Specification to enable chunkwise execution of a process.
Definition: executor.h:39
bool isvol_
Definition: segydirectdef.h:134
uiString msg_
Definition: segydirectdef.h:131

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