OpendTect-6_4  6.4
emsurfaceposprov.h
Go to the documentation of this file.
1 #ifndef emsurfaceposprov_h
2 #define emsurfaceposprov_h
3 
4 /*+
5 ________________________________________________________________________
6 
7  (C) dGB Beheer B.V.; (LICENSE) http://opendtect.org/OpendTect_license.txt
8  Author: Bert
9  Date: Feb 2008
10  RCS: $Id$
11 ________________________________________________________________________
12 
13 
14 -*/
15 
16 #include "earthmodelmod.h"
17 #include "posprovider.h"
18 
19 #include "emposid.h"
20 #include "trckeysampling.h"
21 #include "multiid.h"
22 #include "embody.h"
23 #include "keystrs.h"
24 
25 class DataPointSet;
26 
27 namespace EM { class RowColIterator; class Region3D; class Surface; }
28 
29 namespace Pos
30 {
31 
39 mExpClass(EarthModel) EMSurfaceProvider : public virtual Filter
41 public:
44  const char* type() const;
45 
46  virtual bool initialize(TaskRunner* tr=0);
47  virtual void reset();
48 
49  virtual bool toNextPos();
50  virtual bool toNextZ();
51 
52  virtual float curZ() const;
53  virtual bool hasZAdjustment() const;
54  virtual float adjustedZ(const Coord&,float) const;
55 
56  virtual void usePar(const IOPar&);
57  virtual void fillPar(IOPar&) const;
58  virtual void getSummary(BufferString&) const;
59 
60  bool getZRange(const TrcKey&,Interval<float>&) const;
61  virtual void getZRange(Interval<float>&) const;
62  virtual od_int64 estNrPos() const { return estnrpos_; }
63  virtual int estNrZPerPos() const;
64 
65  int nrSurfaces() const;
66  MultiID surfaceID( int idx ) const
67  { return idx ? id2_ : id1_; }
68  EM::Surface* surface( int idx )
69  { return idx ? surf2_ : surf1_; }
70  const EM::Surface* surface( int idx ) const
71  { return idx ? surf2_ : surf1_; }
72  float zStep() const { return zstep_; }
73  void setZStep( float s ) { zstep_ = s; }
74  Interval<float> extraZ() const { return extraz_; }
75  void setExtraZ( Interval<float> i ) { extraz_ = i; }
76 
77  static const char* id1Key();
78  static const char* id2Key();
79  static const char* zstepKey();
80  static const char* extraZKey();
81 
82 protected:
83 
85  void copyFrom(const Pos::EMSurfaceProvider&);
86 
91  float zstep_;
97 
101  float curz_;
102 
103 };
104 
105 
106 #define mEMSurfaceProviderDefFnsBase \
107  virtual bool isProvider() const { return true; } \
108  virtual float estRatio( const Provider& p ) const \
109  { return Provider::estRatio(p); } \
110  virtual bool toNextPos() \
111  { return EMSurfaceProvider::toNextPos(); } \
112  virtual bool toNextZ() \
113  { return EMSurfaceProvider::toNextZ(); } \
114  virtual float curZ() const \
115  { return EMSurfaceProvider::curZ(); } \
116  virtual int estNrZPerPos() const \
117  { return EMSurfaceProvider::estNrZPerPos(); } \
118  virtual od_int64 estNrPos() const { return estnrpos_; } \
119 
120 
125  , public EMSurfaceProvider
127 public:
128 
131  : EMSurfaceProvider() { *this = p; }
132  const char* factoryKeyword() const { return type(); }
133  EMSurfaceProvider3D& operator =( const EMSurfaceProvider3D& p )
134  { copyFrom(p); return *this; }
135  Provider* clone() const
136  { return new EMSurfaceProvider3D(*this); }
137 
138  virtual BinID curBinID() const;
139  virtual bool includes(const BinID&,float) const;
140  virtual bool includes( const Coord& c, float z ) const
141  { return Provider3D::includes(c,z); }
142  virtual void getExtent(BinID&,BinID&) const;
143  virtual Coord curCoord() const { return Provider3D::curCoord(); }
144  virtual void getTrcKeyZSampling( TrcKeyZSampling& cs ) const
145  { return Provider3D::getTrcKeyZSampling(cs); }
146  virtual void getZRange(Interval<float>& rg ) const
147  { return EMSurfaceProvider::getZRange(rg); }
148 
149  static void initClass();
150  static Provider3D* create() { return new EMSurfaceProvider3D; }
151 
153 
154 };
155 
156 
162  , public EMSurfaceProvider
164 public:
165 
168  : EMSurfaceProvider() { *this = p; }
169  EMSurfaceProvider2D& operator =( const EMSurfaceProvider2D& p )
170  { copyFrom(p); return *this; }
171  const char* factoryKeyword() const { return type(); }
172  Provider* clone() const
173  { return new EMSurfaceProvider2D(*this); }
174 
175  virtual const char* curLine() const;
176  virtual int curNr() const;
177  virtual TrcKey curTrcKey() const;
178  virtual Coord curCoord() const;
179  virtual bool includes(const Coord&,float) const;
180  virtual bool includes(int,float,int) const;
181  virtual void getExtent(Interval<int>&,int nr = -1) const;
182  virtual void getZRange(Interval<float>& rg, int lidx ) const
183  { return EMSurfaceProvider::getZRange(rg); }
184  virtual void getZRange(Interval<float>& rg ) const
185  { return EMSurfaceProvider::getZRange(rg); }
186  int nrLines() const { return 1; }
187 
188  static void initClass();
189  static Provider2D* create() { return new EMSurfaceProvider2D; }
190 
192 
193 };
194 
195 
201  , public EMSurfaceProvider
203 public:
206  const EMSurface2DProvider3D&);
208  const char* factoryKeyword() const { return type(); }
209  EMSurface2DProvider3D& operator =( const EMSurface2DProvider3D& p );
210  //{ copyFrom(p); return *this; }
211  virtual bool initialize(TaskRunner* tr=0);
212  Provider* clone() const
213  { return new EMSurface2DProvider3D(*this); }
214 
215  virtual BinID curBinID() const;
216  virtual bool includes(const BinID&,float) const;
217  virtual bool includes( const Coord& c, float z ) const
218  { return Provider3D::includes(c,z); }
219  virtual void getExtent(BinID&,BinID&) const;
220  virtual void getZRange(Interval<float>& rg ) const
221  { return EMSurfaceProvider::getZRange(rg); }
222  virtual Coord curCoord() const
223  { return Provider3D::curCoord(); }
224 
225  const DataPointSet& dataPointSet( bool nr1 ) const
226  { return nr1 ? dpssurf1_ : dpssurf2_; }
227 
229 
230 protected:
231 
234 
235  void mkDPS(const EM::Surface&,DataPointSet&);
236 
237 };
238 
239 
246 public:
247 
250  const EMImplicitBodyProvider&);
252 
253  static void initClass();
254  static Provider3D* create() { return new EMImplicitBodyProvider; }
256  { return new EMImplicitBodyProvider(*this); }
257 
259  const char* type() const { return sKey::Body(); }
260  const char* factoryKeyword() const { return type(); }
261 
262  virtual bool initialize(TaskRunner* tr=0);
263  virtual void reset() { initialize(); }
264 
265  virtual BinID curBinID() const { return curbid_; }
266  virtual float curZ() const { return curz_; }
267 
268  virtual bool toNextPos();
269  virtual bool toNextZ();
270  virtual int estNrZPerPos() const;
271  virtual od_int64 estNrPos() const;
272  virtual void getExtent(BinID&,BinID&) const;
273  virtual void getZRange(Interval<float>&) const;
274  virtual bool includes(const Coord& c,float z) const;
275  virtual bool includes(const BinID&,float) const;
276 
277  virtual void usePar(const IOPar&);
278  virtual void fillPar(IOPar&) const;
279  virtual void getSummary(BufferString&) const;
280 
281  virtual void getTrcKeyZSampling(TrcKeyZSampling& cs) const;
282  const TrcKeyZSampling& getImpBodyRange() const { return tkzs_; }
283  Array3D<float>* getImpBodyData() const { return imparr_; }
284  float getThreshold() const { return threshold_; }
285 
286  static const char* sKeyUseInside() { return "Use InsideBody"; }
287  static const char* sKeyBBInlrg() { return "BB-Inl range"; }
288  static const char* sKeyBBCrlrg() { return "BB-Crl range"; }
289  static const char* sKeyBBZrg() { return "BB-Z range"; }
290 
291 protected:
292 
293  bool isOK() const;
294 
297  float threshold_;
300 
303  float curz_;
305 };
306 
307 
314 public:
315 
319 
320  static void initClass();
321  static Provider3D* create() { return new EMRegion3DProvider; }
323  { return new EMRegion3DProvider(*this); }
324 
325  EMRegion3DProvider& operator =(const EMRegion3DProvider&);
326  const char* type() const { return "Region3D"; }
327  const char* factoryKeyword() const { return type(); }
328 
329  virtual bool initialize(TaskRunner* tr=0);
330  virtual void reset() { initialize(); }
331 
332  virtual BinID curBinID() const { return curbid_; }
333  virtual float curZ() const { return curz_; }
334 
335  virtual bool toNextPos();
336  virtual bool toNextZ();
337  virtual int estNrZPerPos() const;
338  virtual od_int64 estNrPos() const;
339  virtual void getExtent(BinID&,BinID&) const;
340  virtual void getZRange(Interval<float>&) const;
341  virtual bool includes(const Coord& c,float z) const;
342  virtual bool includes(const BinID&,float) const;
343 
344  virtual void usePar(const IOPar&);
345  virtual void fillPar(IOPar&) const;
346  virtual void getSummary(BufferString&) const;
347 
348  virtual void getTrcKeyZSampling(TrcKeyZSampling& cs) const;
349 
350  EM::Region3D& region() { return region_; }
351  const EM::Region3D& region() const { return region_; }
352 
353 protected:
354 
355 
357 
360  float curz_;
362 };
363 
364 } // namespace Pos
365 
366 #endif
#define mExpClass(module)
Definition: commondefs.h:160
RowCol iterator.
Definition: emrowcoliterator.h:29
int nrLines() const
Definition: emsurfaceposprov.h:186
const char * type() const
Definition: emsurfaceposprov.h:326
static Provider3D * create()
Definition: emsurfaceposprov.h:254
EM implicit body provider for 3D positioning.
Definition: emsurfaceposprov.h:244
static Provider2D * create()
Definition: emsurfaceposprov.h:189
BinID curbid_
Definition: emsurfaceposprov.h:359
void setExtraZ(Interval< float > i)
Definition: emsurfaceposprov.h:75
void setZStep(float s)
Definition: emsurfaceposprov.h:73
Provides a series of positions; can also be used for subselection.
Definition: posprovider.h:33
virtual BinID curBinID() const
Definition: emsurfaceposprov.h:265
float zstep_
Definition: emsurfaceposprov.h:91
Set of data points with group selection.
Definition: datapointset.h:48
#define mODTextTranslationClass(clss)
Definition: uistring.h:38
virtual void getZRange(Interval< float > &rg) const
Definition: emsurfaceposprov.h:184
Is an identifier for each position in the earthmodel.
Definition: emposid.h:37
virtual void reset()
Definition: emsurfaceposprov.h:263
virtual BinID curBinID() const
Definition: emsurfaceposprov.h:332
const char * factoryKeyword() const
Definition: emsurfaceposprov.h:132
Interval< float > extraZ() const
Definition: emsurfaceposprov.h:74
BinID curbid_
Definition: emsurfaceposprov.h:302
MultiID id2_
Definition: emsurfaceposprov.h:88
void usePar(const IOPar &iop, ODPolygon< T > &poly, const char *inpkey)
Definition: polygon.h:188
#define od_int64
Definition: plftypes.h:36
EMSurfaceProvider2D()
Definition: emsurfaceposprov.h:166
DataPointSet & dpssurf1_
Definition: emsurfaceposprov.h:232
EM::Region3D & region_
Definition: emsurfaceposprov.h:358
virtual void getZRange(Interval< float > &rg, int lidx) const
Definition: emsurfaceposprov.h:182
virtual float curZ() const
Definition: emsurfaceposprov.h:266
Interval< float > curzrg_
Definition: emsurfaceposprov.h:100
bool useinside_
Definition: emsurfaceposprov.h:298
Provides a subselection for 3D surveys.
Definition: posprovider.h:60
static const char * sKeyUseInside()
Definition: emsurfaceposprov.h:286
Array3D< float > * imparr_
Definition: emsurfaceposprov.h:296
Interval< float > zrg2_
Definition: emsurfaceposprov.h:95
const EM::Surface * surface(int idx) const
Definition: emsurfaceposprov.h:70
Provider * clone() const
Definition: emsurfaceposprov.h:172
A cartesian coordinate in 2D space.
Definition: coord.h:25
TrcKeySampling hs_
Definition: emsurfaceposprov.h:93
EM Region provider for 3D positioning.
Definition: emsurfaceposprov.h:312
Interval< float > extraz_
Definition: emsurfaceposprov.h:92
float curz_
Definition: emsurfaceposprov.h:101
MultiID surfaceID(int idx) const
Definition: emsurfaceposprov.h:66
Decides whether a given position should be included.
Definition: posfilter.h:45
virtual Coord curCoord() const
Definition: emsurfaceposprov.h:143
const TrcKeyZSampling & getImpBodyRange() const
Definition: emsurfaceposprov.h:282
static Provider3D * create()
Definition: emsurfaceposprov.h:150
virtual bool includes(const Coord &c, float z) const
Definition: emsurfaceposprov.h:140
static const char * sKeyBBZrg()
Definition: emsurfaceposprov.h:289
virtual void getZRange(Interval< float > &rg) const
Definition: emsurfaceposprov.h:146
Generalized set of parameters of the keyword-value type.
Definition: iopar.h:47
Interval< float > zrg1_
Definition: emsurfaceposprov.h:94
Class that can execute a task.
Definition: task.h:169
TrcKeyZSampling bbox_
Definition: emsurfaceposprov.h:299
Array3D< float > * getImpBodyData() const
Definition: emsurfaceposprov.h:283
Horizontal sampling (inline and crossline range and steps).
Definition: trckeysampling.h:27
Provider * clone() const
Definition: emsurfaceposprov.h:212
EM::Surface * surf1_
Definition: emsurfaceposprov.h:89
EM::Body * embody_
Definition: emsurfaceposprov.h:301
Hor+Vert sampling in 3D surveys.
Definition: trckeyzsampling.h:35
virtual Coord curCoord() const
Definition: emsurfaceposprov.h:222
TrcKeyZSampling tkzs_
Definition: emsurfaceposprov.h:295
float curz_
Definition: emsurfaceposprov.h:303
const DataPointSet & dataPointSet(bool nr1) const
Definition: emsurfaceposprov.h:225
EMSurfaceProvider for 3D positioning.
Definition: emsurfaceposprov.h:124
float curz_
Definition: emsurfaceposprov.h:360
Position.
Definition: commontypes.h:42
EM::Surface * surf2_
Definition: emsurfaceposprov.h:90
EM::RowColIterator * iterator_
Definition: emsurfaceposprov.h:98
virtual float curZ() const
Definition: emsurfaceposprov.h:333
virtual void getZRange(Interval< float > &rg) const
Definition: emsurfaceposprov.h:220
void fillPar(IOPar &iop, const ODPolygon< T > &poly, const char *inpkey)
Definition: polygon.h:175
static Provider3D * create()
Definition: emsurfaceposprov.h:321
const EM::Region3D & region() const
Definition: emsurfaceposprov.h:351
EMSurfaceProvider for 3D positions with 2D Horizon.
Definition: emsurfaceposprov.h:200
EMImplicitBodyProvider * clone() const
Definition: emsurfaceposprov.h:255
EM::PosID curpos_
Definition: emsurfaceposprov.h:99
A body that can deliver an implicit body.
Definition: embody.h:50
FixedString Body()
Definition: keystrs.h:43
Provider based on surface(s)
Definition: emsurfaceposprov.h:39
OD::String with its own variable length buffer. The buffer has a guaranteed minimum size...
Definition: bufstring.h:40
virtual od_int64 estNrPos() const
Definition: emsurfaceposprov.h:62
const char * type() const
Definition: emsurfaceposprov.h:259
Provides a subselection for 2D surveys - requires the line name(s).
Definition: posprovider.h:95
FixedString Surface()
Definition: keystrs.h:126
Positioning in a seismic survey: inline/crossline or lineNr/trcNr.
Definition: binid.h:30
virtual void reset()
Definition: emsurfaceposprov.h:330
bool initializedbody_
Definition: emsurfaceposprov.h:304
const char * factoryKeyword() const
Definition: emsurfaceposprov.h:260
bool useinside_
Definition: emsurfaceposprov.h:361
Base class for surfaces like horizons and faults. A surface is made up of one or more segments or pat...
Definition: emsurface.h:33
MultiID id1_
Definition: emsurfaceposprov.h:87
Earth Model objects like horizons, faults, fault-sticks and bodies.
Definition: embody.h:25
virtual void getTrcKeyZSampling(TrcKeyZSampling &cs) const
Definition: emsurfaceposprov.h:144
float getThreshold() const
Definition: emsurfaceposprov.h:284
EM::Region3D & region()
Definition: emsurfaceposprov.h:350
EMSurfaceProvider3D()
Definition: emsurfaceposprov.h:129
#define mEMSurfaceProviderDefFnsBase
Definition: emsurfaceposprov.h:106
od_int64 estnrpos_
Definition: emsurfaceposprov.h:96
Represents a unique trace position in one of the surveys that OpendTect is managing.
Definition: trckey.h:28
DataPointSet & dpssurf2_
Definition: emsurfaceposprov.h:233
EMRegion3DProvider * clone() const
Definition: emsurfaceposprov.h:322
float zStep() const
Definition: emsurfaceposprov.h:72
static const char * sKeyBBCrlrg()
Definition: emsurfaceposprov.h:288
Definition: emregion.h:202
EM::Surface * surface(int idx)
Definition: emsurfaceposprov.h:68
EMSurfaceProvider3D(const EMSurfaceProvider3D &p)
Definition: emsurfaceposprov.h:130
const char * factoryKeyword() const
Definition: emsurfaceposprov.h:327
const char * factoryKeyword() const
Definition: emsurfaceposprov.h:208
EMSurfaceProvider2D(const EMSurfaceProvider2D &p)
Definition: emsurfaceposprov.h:167
const char * factoryKeyword() const
Definition: emsurfaceposprov.h:171
float threshold_
Definition: emsurfaceposprov.h:297
TrcKeyZSampling bbox_
Definition: emsurfaceposprov.h:356
Compound key consisting of ints.
Definition: multiid.h:25
static void initClass()
static const char * sKeyBBInlrg()
Definition: emsurfaceposprov.h:287
EMSurfaceProvider for 2D positioning.
Definition: emsurfaceposprov.h:161
virtual bool includes(const Coord &c, float z) const
Definition: emsurfaceposprov.h:217
Provider * clone() const
Definition: emsurfaceposprov.h:135

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