OpendTect-6_4  6.4
posprovider.h
Go to the documentation of this file.
1 #ifndef posprovider_h
2 #define posprovider_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 "algomod.h"
17 #include "posfilter.h"
18 #include "ranges.h"
19 class TrcKeyZSampling;
20 
21 
22 namespace Pos
23 {
24 
33 mExpClass(Algo) Provider : public virtual Filter
34 {
35 public:
36 
37  virtual bool isProvider() const;
38 
39  virtual bool toNextPos() = 0;
40  virtual bool toNextZ() = 0;
41  virtual Coord curCoord() const = 0;
42  virtual float curZ() const = 0;
43  virtual TrcKey curTrcKey() const = 0;
44  virtual Pos::SurvID survID() const = 0;
45 
46  virtual od_int64 estNrPos() const = 0;
47  virtual int estNrZPerPos() const { return 1; }
48 
49  virtual float estRatio(const Provider&) const;
50  virtual void getTrcKeyZSampling(TrcKeyZSampling&) const;
51 
52  static Provider* make(const IOPar&,bool is2d);
53 };
54 
55 
61  , public Provider
62 {
63 public:
64 
65  virtual bool is2D() const { return false; }
66 
67  virtual BinID curBinID() const = 0;
68  virtual TrcKey curTrcKey() const { return TrcKey(survID(),curBinID());}
69  virtual Coord curCoord() const;
70 
71  virtual bool includes(const BinID&,float z=mUdf(float)) const = 0;
72  virtual bool includes(const Coord&,float z=mUdf(float)) const;
73 
74  virtual void getExtent(BinID& start,BinID& stop) const = 0;
75  virtual void getZRange(Interval<float>&) const = 0;
76  virtual Pos::SurvID survID() const { return survid_; }
77  virtual void setSurvID(Pos::SurvID sid) { survid_ = sid; }
78 
80  static Provider3D* make(const IOPar&);
81 
82 protected:
83  Provider3D();
84 
85 private:
87 
88 };
89 
90 
96  , public Provider
97 {
98 public:
99 
100  virtual bool is2D() const { return true; }
101 
102  virtual int curNr() const = 0;
103  virtual bool includes(int,float z=mUdf(float), int nr=0) const= 0;
104  virtual bool includes(const Coord&,float z=mUdf(float)) const = 0;
105 
106  virtual void getExtent(Interval<int>&,int lidx) const = 0;
107  virtual void getZRange(Interval<float>&,int lidx) const = 0;
108 
109  virtual Pos::SurvID survID() const;
110 
112  static Provider2D* make(const IOPar&);
113 
114 };
115 
116 
117 } // namespace
118 
119 #endif
#define mExpClass(module)
Definition: commondefs.h:160
Provides a series of positions; can also be used for subselection.
Definition: posprovider.h:33
virtual void setSurvID(Pos::SurvID sid)
Definition: posprovider.h:77
#define od_int64
Definition: plftypes.h:36
Provides a filter related to 3D data.
Definition: posfilter.h:79
Provides a subselection for 3D surveys.
Definition: posprovider.h:60
A cartesian coordinate in 2D space.
Definition: coord.h:25
Decides whether a given position should be included.
Definition: posfilter.h:45
Generalized set of parameters of the keyword-value type.
Definition: iopar.h:47
Index_Type SurvID
Definition: commontypes.h:49
Pos::SurvID survid_
Definition: posprovider.h:86
#define mUdf(type)
Use this macro to get the undefined for simple types.
Definition: undefval.h:272
virtual int estNrZPerPos() const
Definition: posprovider.h:47
Hor+Vert sampling in 3D surveys.
Definition: trckeyzsampling.h:35
Position.
Definition: commontypes.h:42
virtual Pos::SurvID survID() const
Definition: posprovider.h:76
virtual bool is2D() const
Definition: posprovider.h:100
#define mDefineFactoryInClass(T, funcname)
Definition: factory.h:426
Provides a filter related to 2D seismic data.
Definition: posfilter.h:98
Provides a subselection for 2D surveys - requires the line name(s).
Definition: posprovider.h:95
Positioning in a seismic survey: inline/crossline or lineNr/trcNr.
Definition: binid.h:30
Represents a unique trace position in one of the surveys that OpendTect is managing.
Definition: trckey.h:28
virtual bool is2D() const
Definition: posprovider.h:65
virtual TrcKey curTrcKey() const
Definition: posprovider.h:68

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