OpendTect-6_4  6.4
seis2dto3d.h
Go to the documentation of this file.
1 #ifndef seis2dto3d_h
2 #define seis2dto3d_h
3 
4 
5 /*+
6 ________________________________________________________________________
7 
8  (C) dGB Beheer B.V.; (LICENSE) http://opendtect.org/OpendTect_license.txt
9  Author: Bruno
10  Date: Feb 2011
11  RCS: $Id$
12 ________________________________________________________________________
13 
14 -*/
15 
16 
17 #include "seismod.h"
18 #include "executor.h"
19 #include "trckeyzsampling.h"
20 #include "arrayndimpl.h"
21 #include "fourier.h"
22 #include "binid.h"
23 #include "seisbuf.h"
24 #include "uistring.h"
25 
26 class IOObj;
27 class Seis2DDataSet;
28 class SeisScaler;
29 class SeisTrc;
30 class SeisTrcWriter;
31 class SeisTrcBuf;
32 
33 
36 public:
37 
38  SeisInterpol();
39  ~SeisInterpol();
40 
41  void setInput(const ObjectSet<const SeisTrc>&);
42  void setParams(const TrcKeySampling&,float maxvel);
43 
44  void getOutTrcs(ObjectSet<SeisTrc>&,
45  const TrcKeySampling&) const;
47  { return errmsg_.isEmpty() ? tr( "interpolating" )
48  : errmsg_; }
49  od_int64 nrDone() const { return nrdone_; }
51  {
52  return tr("Number of iterations");
53  }
54  od_int64 totalNr() const { return nriter_; }
55  int nextStep();
56 
57 protected:
58 
60  int nriter_;
61  float maxvel_;
63 
64  int nrdone_;
65  mutable int totnr_;
66 
68  int szx_;
69  int szy_;
70  int szz_;
71  float max_;
72 
73  mStruct(Seis) TrcPosTrl
74  {
75  TrcPosTrl(int x,int y, int trc)
76  : idx_(x)
77  , idy_(y)
78  , trcpos_(trc)
79  {}
80  int idx_;
81  int idy_;
82  int trcpos_;
83 
84  bool operator == ( const TrcPosTrl& tr ) const
85  { return tr.trcpos_ == trcpos_; }
86  };
88 
91 
92  void clear();
93  void doWork(bool,int);
94  void doPrepare();
95  void setUpData();
96  void setFinalTrcs();
97 
98  const BinID convertToBID(int,int) const;
99  void convertToPos(const BinID&,int&,int&) const;
100  int getTrcInSet(const BinID&) const;
101 };
102 
103 
104 
107 public:
108 
109  Seis2DTo3D();
110  ~Seis2DTo3D();
111 
112 
114  { return errmsg_.isEmpty() ? tr("interpolating")
115  : errmsg_; }
116  od_int64 nrDone() const { return nrdone_; }
117  uiString uiNrDoneText() const { return tr("Done"); }
118  od_int64 totalNr() const;
119  int nextStep();
120 
121  bool init(const IOPar&);
122  bool useNearestOnly() const { return nearesttrace_; }
123 
124  bool finishWrite() { return writeTmpTrcs(); }
125 
126  static const char* sKeyInput();
127  static const char* sKeyIsNearest();
128  static const char* sKeyStepout();
129  static const char* sKeyReUse();
130  static const char* sKeyMaxVel();
131  static const char* sKeyCreaterType();
132  static BufferString getCreatorFormat() { return "Normal"; }
133 
134 protected:
135  bool usePar(const IOPar&);
136  bool setIO(const IOPar&);
137  bool checkParameters();
138  void doWorkNearest();
139  bool doWorkFFT();
140 
141 
145 
148  int nriter_;
149 
150  float maxvel_;
152  int inlstep_;
153  int crlstep_;
154 
156 
158 
161 
164 
167 
168  bool read_;
169  int nrdone_;
170  mutable int totnr_;
172 
173  bool writeTmpTrcs();
174  bool read();
175 };
176 
177 
179 { mODTextTranslationClass(SeisScaler);
180 public:
181  SeisScaler(const SeisTrcBuf&);
182 
183  void scaleTrace(SeisTrc&);
184 
185 protected:
186 
187  float avgmaxval_;
188  float avgminval_;
189 };
190 
191 #endif
#define mExpClass(module)
Definition: commondefs.h:160
Does Fourier Transforms of any size.
Definition: fourier.h:30
int szz_
Definition: seis2dto3d.h:70
Summary for a Seismic object.
Definition: segydirectdef.h:23
Definition: seis2dto3d.h:105
SeisScaler * sc_
Definition: seis2dto3d.h:157
int nrdone_
Definition: seis2dto3d.h:64
bool nearesttrace_
Definition: seis2dto3d.h:171
float maxvel_
Definition: seis2dto3d.h:61
Definition: ioobj.h:58
uiString errmsg_
Definition: seis2dto3d.h:155
Definition: seis2dto3d.h:178
od_int64 nrDone() const
Definition: seis2dto3d.h:116
bool operator==(const ArrayNDInfo &a1, const ArrayNDInfo &a2)
Definition: arrayndinfo.h:53
TypeSet< TrcPosTrl > posidxs_
Definition: seis2dto3d.h:86
uiString uiMessage() const
will be message() again in 7.x
Definition: seis2dto3d.h:113
Fourier::CC * fft_
Definition: seis2dto3d.h:67
#define mStruct(module)
Definition: commondefs.h:165
#define mODTextTranslationClass(clss)
Definition: uistring.h:38
int nrdone_
Definition: seis2dto3d.h:169
bool finishWrite()
Definition: seis2dto3d.h:124
TrcKeySamplingIterator hsit_
Definition: seis2dto3d.h:166
SeisTrcBuf tmpseisbuf_
Definition: seis2dto3d.h:163
void usePar(const IOPar &iop, ODPolygon< T > &poly, const char *inpkey)
Definition: polygon.h:188
#define od_int64
Definition: plftypes.h:36
bool init()
void clear(std::ios &)
SeisTrcBuf & seisbuf_
Definition: seis2dto3d.h:159
Definition: seiswrite.h:41
Array3DImpl< float_complex > * trcarr_
Definition: seis2dto3d.h:89
Finds next BinID in TrcKeySampling; initializes to first position.
Definition: trckeysampling.h:189
static BufferString getCreatorFormat()
Definition: seis2dto3d.h:132
int totnr_
Definition: seis2dto3d.h:65
Definition: uistring.h:89
int inlstep_
Definition: seis2dto3d.h:152
int szx_
Definition: seis2dto3d.h:68
uiString uiNrDoneText() const
will be nrDoneText() in 7.x
Definition: seis2dto3d.h:117
SeisInterpol interpol_
Definition: seis2dto3d.h:165
od_int64 totalNr() const
Definition: seis2dto3d.h:54
bool useNearestOnly() const
Definition: seis2dto3d.h:122
float avgmaxval_
Definition: seis2dto3d.h:187
bool reusetrcs_
Definition: seis2dto3d.h:151
Generalized set of parameters of the keyword-value type.
Definition: iopar.h:47
TrcKeyZSampling tkzs_
Definition: seis2dto3d.h:144
float avgminval_
Definition: seis2dto3d.h:188
Horizontal sampling (inline and crossline range and steps).
Definition: trckeysampling.h:27
float max_
Definition: seis2dto3d.h:71
Hor+Vert sampling in 3D surveys.
Definition: trckeyzsampling.h:35
bool read_
Definition: seis2dto3d.h:168
od_int64 nrDone() const
Definition: seis2dto3d.h:49
uiString uiNrDoneText() const
will be nrDoneText() in 7.x
Definition: seis2dto3d.h:50
int nriter_
Definition: seis2dto3d.h:148
IOObj * outioobj_
Definition: seis2dto3d.h:143
OD::String with its own variable length buffer. The buffer has a guaranteed minimum size...
Definition: bufstring.h:40
uiString uiMessage() const
will be message() again in 7.x
Definition: seis2dto3d.h:46
bool isEmpty() const
Definition: odstring.h:51
Positioning in a seismic survey: inline/crossline or lineNr/trcNr.
Definition: binid.h:30
Seismic trace.
Definition: seistrc.h:34
BufferString errmsg_
Definition: horizontracker.h:119
IOObj * inioobj_
Definition: seis2dto3d.h:142
int totnr_
Definition: seis2dto3d.h:170
set of seismic traces.
Definition: seisbuf.h:31
BinID prevbid_
Definition: seis2dto3d.h:147
int nriter_
Definition: seis2dto3d.h:60
float maxvel_
Definition: seis2dto3d.h:150
TrcKeySampling hs_
Definition: seis2dto3d.h:90
Definition: seis2dto3d.h:34
const ObjectSet< const SeisTrc > * inptrcs_
Definition: seis2dto3d.h:59
TrcKeySampling seisbuftks_
Definition: seis2dto3d.h:160
SeisTrcWriter * wrr_
Definition: seis2dto3d.h:162
uiString errmsg_
Definition: seis2dto3d.h:62
Set of 2D lines comparable with 3D seismic cube.
Definition: seis2ddata.h:37
int crlstep_
Definition: seis2dto3d.h:153
Specification to enable chunkwise execution of a process.
Definition: executor.h:39
BinID curbid_
Definition: seis2dto3d.h:146
int szy_
Definition: seis2dto3d.h:69

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