OpendTect-6_4  6.4
segyresorter.h
Go to the documentation of this file.
1 #ifndef segyscanner_h
2 #define segyscanner_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 "executor.h"
17 #include "seisposkey.h"
18 #include "ranges.h"
19 #include "multiid.h"
20 #include "strmdata.h"
21 #include "bufstringset.h"
22 namespace Pos { class Filter; }
23 namespace PosInfo { class CubeData; class CubeDataPos; }
24 
25 
26 namespace SEGY
27 {
28 class DirectDef;
29 class FileDataSet;
30 class DirectReader;
31 
40 public:
41 
43  {
44  public:
45 
46  Setup(Seis::GeomType gt,const MultiID&,
47  const char* outputfnm);
48 
50  mDefSetupMemb(MultiID,inpkey)
52  mDefSetupMemb(int,newfileeach)
53  mDefSetupMemb(bool,inlnames)
54 
55  Interval<int> getInlRg(int,const PosInfo::CubeData&) const;
56  BufferString getFileName(const Interval<int>&) const;
57 
58  mutable int curfnr_;
59 
60  };
61 
62  ReSorter(const Setup&,const char* linename=0);
63  ~ReSorter();
64 
65  void setFilter(const Pos::Filter&);
66 
67  uiString uiMessage() const { return msg_; }
68  uiString uiNrDoneText() const { return tr("Traces handled"); }
69  od_int64 nrDone() const { return nrdone_; }
70  od_int64 totalNr() const { return totnr_; }
71  int nextStep();
72 
73  const DirectDef& dDef() const;
74  const FileDataSet& fds() const;
75 
76 protected:
77 
78  const Setup setup_;
79 
87 
91 
92  unsigned char hdrbuf_[3600];
93  unsigned char* trcbuf_;
95 
99 
100  int fillBinIDs();
101  int wrapUp();
102  bool getCurPos(BinID&);
103  bool toNext();
104  bool getNext(const BinID&,int&,int&) const;
105  bool createOutput(const BinID&);
106  bool openOutputFile();
107  int ensureFileOpen(int);
108  bool readData(int,int);
109  bool writeData();
110 
111 };
112 
113 } // namespace
114 
115 #endif
#define mExpClass(module)
Definition: commondefs.h:160
Summary for a Seismic object.
Definition: segydirectdef.h:23
FixedString Setup()
Definition: keystrs.h:116
FixedString Filter()
Definition: keystrs.h:67
od_int64 totnr_
Definition: segyresorter.h:83
#define mODTextTranslationClass(clss)
Definition: uistring.h:38
Definition: segydirectdef.h:35
od_int64 totalNr() const
Definition: segyresorter.h:70
#define od_int64
Definition: plftypes.h:36
uiString uiNrDoneText() const
will be nrDoneText() in 7.x
Definition: segyresorter.h:68
unsigned char * trcbuf_
Definition: segyresorter.h:93
TypeSet< BinID > binids_
Definition: segyresorter.h:96
Definition: uistring.h:89
StreamData sdout_
Definition: segyresorter.h:84
SEGY::DirectReader * drdr_
Definition: segyresorter.h:80
Set of BufferString objects.
Definition: bufstringset.h:28
Definition: segyfiledata.h:39
Interval of values.
Definition: commontypes.h:31
ObjectSet< StreamData > inpsds_
Definition: segyresorter.h:88
Decides whether a given position should be included.
Definition: posfilter.h:45
TypeSet< int > fidxs_
Definition: segyresorter.h:89
GeomType
Definition: seistype.h:33
Definition: segyresorter.h:42
Re-sorts SEG-Y files, input must be &#39;scanned&#39;.
Definition: segyresorter.h:38
const Setup setup_
Definition: segyresorter.h:78
bool needwritefilehdrs_
Definition: segyresorter.h:86
Position in a CubeData.
Definition: posinfo.h:73
Holds data to use and close an iostream.
Definition: strmdata.h:28
Position.
Definition: commontypes.h:42
uiString msg_
Definition: segyresorter.h:81
#define mDefSetupMemb(typ, memb)
Definition: commondefs.h:137
Position info, often segmented.
Definition: posinfo.h:40
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
od_int64 nrdone_
Definition: segyresorter.h:82
BufferStringSet inpfnms_
Definition: segyresorter.h:90
Definition: segydirecttr.h:36
Keys that should be used with od_process_segyio.cc.
Definition: segybatchio.h:22
PosInfo::CubeDataPos & cdp_
Definition: segyresorter.h:97
od_int64 trcbytes_
Definition: segyresorter.h:94
Pos::Filter * posfilt_
Definition: segyresorter.h:98
Interval< int > curinlrg_
Definition: segyresorter.h:85
Compound key consisting of ints.
Definition: multiid.h:25
Specification to enable chunkwise execution of a process.
Definition: executor.h:39
od_int64 nrDone() const
Definition: segyresorter.h:69

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