OpendTect  6.3
posprovider.h
Go to the documentation of this file.
1 #pragma once
2 
3 /*+
4 ________________________________________________________________________
5 
6  (C) dGB Beheer B.V.; (LICENSE) http://opendtect.org/OpendTect_license.txt
7  Author: Bert
8  Date: Feb 2008
9 ________________________________________________________________________
10 
11 
12 -*/
13 
14 #include "algomod.h"
15 #include "posfilter.h"
16 #include "ranges.h"
17 class TrcKeyZSampling;
18 
19 
20 namespace Pos
21 {
22 
31 mExpClass(Algo) Provider : public virtual Filter
32 {
33 public:
34 
35  virtual bool isProvider() const;
36 
37  virtual bool toNextPos() = 0;
38  virtual bool toNextZ() = 0;
39  virtual Coord curCoord() const = 0;
40  virtual float curZ() const = 0;
41  virtual TrcKey curTrcKey() const = 0;
42  virtual Pos::SurvID survID() const = 0;
43 
44  virtual od_int64 estNrPos() const = 0;
45  virtual int estNrZPerPos() const { return 1; }
46 
47  virtual float estRatio(const Provider&) const;
48  virtual void getTrcKeyZSampling(TrcKeyZSampling&) const;
49 
50  static Provider* make(const IOPar&,bool is2d);
51 };
52 
53 
59  , public Provider
60 {
61 public:
62 
63  virtual bool is2D() const { return false; }
64 
65  virtual BinID curBinID() const = 0;
66  virtual TrcKey curTrcKey() const { return TrcKey(survID(),curBinID());}
67  virtual Coord curCoord() const;
68 
69  virtual bool includes(const BinID&,float z=mUdf(float)) const = 0;
70  virtual bool includes(const Coord&,float z=mUdf(float)) const;
71 
72  virtual void getExtent(BinID& start,BinID& stop) const = 0;
73  virtual void getZRange(Interval<float>&) const = 0;
74  virtual Pos::SurvID survID() const { return survid_; }
75  virtual void setSurvID(Pos::SurvID sid) { survid_ = sid; }
76 
78  static Provider3D* make(const IOPar&);
79 
80 protected:
81  Provider3D();
82 
83 private:
85 
86 };
87 
88 
94  , public Provider
95 {
96 public:
97 
98  virtual bool is2D() const { return true; }
99 
100  virtual int curNr() const = 0;
101  virtual bool includes(int,float z=mUdf(float), int nr=0) const= 0;
102  virtual bool includes(const Coord&,float z=mUdf(float)) const = 0;
103 
104  virtual void getExtent(Interval<int>&,int lidx) const = 0;
105  virtual void getZRange(Interval<float>&,int lidx) const = 0;
106 
107  virtual Pos::SurvID survID() const;
108 
110  static Provider2D* make(const IOPar&);
111 
112 };
113 
114 
115 } // namespace
#define mExpClass(module)
Definition: commondefs.h:157
Provides a series of positions; can also be used for subselection.
Definition: posprovider.h:31
virtual void setSurvID(Pos::SurvID sid)
Definition: posprovider.h:75
#define od_int64
Definition: plftypes.h:34
Provides a filter related to 3D data.
Definition: posfilter.h:77
Provides a subselection for 3D surveys.
Definition: posprovider.h:58
Decides whether a given position should be included.
Definition: posfilter.h:43
Generalized set of parameters of the keyword-value type.
Definition: iopar.h:53
Index_Type SurvID
Definition: commontypes.h:45
Pos::SurvID survid_
Definition: posprovider.h:84
#define mUdf(type)
Use this macro to get the undefined for simple types.
Definition: undefval.h:270
virtual int estNrZPerPos() const
Definition: posprovider.h:45
Hor+Vert sampling in 3D surveys.
Definition: trckeyzsampling.h:32
Position.
Definition: commontypes.h:38
virtual Pos::SurvID survID() const
Definition: posprovider.h:74
virtual bool is2D() const
Definition: posprovider.h:98
#define mDefineFactoryInClass(T, funcname)
Definition: factory.h:424
Provides a filter related to 2D seismic data.
Definition: posfilter.h:96
Provides a subselection for 2D surveys - requires the line name(s).
Definition: posprovider.h:93
Positioning in a seismic survey: inline/crossline or lineNr/trcNr.
Definition: binid.h:28
Represents a unique trace position in one of the surveys that OpendTect is managing.
Definition: trckey.h:26
2D point or vector class.
Definition: commontypes.h:58
virtual bool is2D() const
Definition: posprovider.h:63
virtual TrcKey curTrcKey() const
Definition: posprovider.h:66

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