OpendTect-6_4  6.4
rangeposprovider.h
Go to the documentation of this file.
1 #ifndef rangeposprovider_h
2 #define rangeposprovider_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 "generalmod.h"
17 #include "posprovider.h"
18 #include "transl.h"
19 
20 namespace PosInfo { class Line2DData; }
21 
22 mDeclEmptyTranslatorBundle(General,PosProviders,dgb,"subsel")
23 
24 namespace Pos
25 {
26 
30 {
31 public:
32 
35  ~RangeProvider3D();
36  RangeProvider3D& operator =(const RangeProvider3D&);
37  const char* type() const;
38  const char* factoryKeyword() const { return type(); }
39  virtual Provider* clone() const { return new RangeProvider3D(*this); }
40 
41  virtual void reset();
42 
43  virtual bool toNextPos();
44  virtual bool toNextZ();
45 
46  virtual BinID curBinID() const { return curbid_; }
47  virtual float curZ() const;
48  virtual bool includes(const BinID&,float z=mUdf(float)) const;
49  virtual void usePar(const IOPar&);
50  virtual void fillPar(IOPar&) const;
51  virtual void getSummary(BufferString&) const;
52 
53  virtual void getExtent(BinID& start,BinID& stop) const;
54  virtual void getZRange(Interval<float>&) const;
55  virtual od_int64 estNrPos() const;
56  virtual int estNrZPerPos() const;
57  void getTrcKeyZSampling(TrcKeyZSampling&) const;
58 
59  const TrcKeyZSampling& sampling() const { return tkzs_; }
60  void setSampling( const TrcKeyZSampling& tkzs );
61  void setHSampling( const TrcKeySampling& tks ) const
62  { tkzs_.hsamp_ = tks; }
63 
64  virtual bool includes( const Coord& c, float z=mUdf(float) ) const
65  { return Pos::Provider3D::includes(c,z); }
66 
67 protected:
68 
71  int curzidx_;
72  int zsampsz_;
73 
74 public:
75 
76  static void initClass();
77  static Provider3D* create() { return new RangeProvider3D; }
78 
79 };
80 
81 
89 {
90 public:
93  ~RangeProvider2D();
94  RangeProvider2D& operator =(const RangeProvider2D&);
95  const char* type() const;
96  const char* factoryKeyword() const { return type(); }
97  virtual Provider* clone() const { return new RangeProvider2D(*this); }
98 
99  virtual void reset();
100 
101  virtual bool toNextPos();
102  virtual bool toNextZ();
103 
104  virtual int curNr() const;
105  virtual float curZ() const;
106  virtual Coord curCoord() const;
107  virtual TrcKey curTrcKey() const;
108  virtual bool includes(int,float z=mUdf(float),int lidx=0) const;
109  virtual bool includes(const Coord&,float z=mUdf(float)) const;
110  virtual void usePar(const IOPar&);
111  virtual void fillPar(IOPar&) const;
112  virtual void getSummary(BufferString&) const;
113 
114  virtual void getExtent( Interval<int>& rg, int lidx=-1 ) const;
115  virtual void getZRange( Interval<float>& rg, int lidx ) const;
116  virtual od_int64 estNrPos() const;
117  virtual int estNrZPerPos() const;
118 
119  void setTrcRange(const StepInterval<int>&,int idx=0);
120  const StepInterval<int>& trcRange(int lidx) const
121  {return trcrgs_[lidx];}
122 
123  void setZRange(const StepInterval<float>&,int idx=0);
124  const StepInterval<float>& zRange(int lidx=0) const
125  {return zrgs_[lidx];}
126 
127 protected:
128 
133  int curzidx_;
134  mutable int curlinezsampsz_;
137 
139 
140  Pos::GeomID curGeomID() const;
141  const Survey::Geometry2D* curGeom() const;
142  StepInterval<float> curZRange() const;
143  StepInterval<int> curTrcRange() const;
144  void getCurRanges() const;
145 
146 public:
147 
148  static void initClass();
149  static Provider2D* create() { return new RangeProvider2D; }
150 
151 };
152 
153 } // namespace
154 
155 #endif
virtual Provider * clone() const
Definition: rangeposprovider.h:39
#define mExpClass(module)
Definition: commondefs.h:160
int curlineidx_
Definition: rangeposprovider.h:132
Provides a series of positions; can also be used for subselection.
Definition: posprovider.h:33
BinID curbid_
Definition: rangeposprovider.h:70
int curtrcidx_
Definition: rangeposprovider.h:131
static Provider2D * create()
Definition: rangeposprovider.h:149
const StepInterval< float > & zRange(int lidx=0) const
Definition: rangeposprovider.h:124
Geometry of a 2D Line.
Definition: survgeom2d.h:27
void usePar(const IOPar &iop, ODPolygon< T > &poly, const char *inpkey)
Definition: polygon.h:188
#define od_int64
Definition: plftypes.h:36
const char * factoryKeyword() const
Definition: rangeposprovider.h:38
const Survey::Geometry2D * curgeom_
Definition: rangeposprovider.h:138
TypeSet< StepInterval< int > > trcrgs_
Definition: rangeposprovider.h:129
StepInterval< float > curzrg_
Definition: rangeposprovider.h:136
Provides a subselection for 3D surveys.
Definition: posprovider.h:60
virtual bool includes(const BinID &, float z=mUdf(float)) const =0
2D provider based on StepInterval<int>.
Definition: rangeposprovider.h:88
A cartesian coordinate in 2D space.
Definition: coord.h:25
const char * factoryKeyword() const
Definition: rangeposprovider.h:96
virtual BinID curBinID() const
Definition: rangeposprovider.h:46
TrcKeyZSampling & tkzs_
Definition: rangeposprovider.h:69
Set of (small) copyable elements.
Definition: commontypes.h:30
Generalized set of parameters of the keyword-value type.
Definition: iopar.h:47
int curzidx_
Definition: rangeposprovider.h:71
int zsampsz_
Definition: rangeposprovider.h:72
Horizontal sampling (inline and crossline range and steps).
Definition: trckeysampling.h:27
#define mUdf(type)
Use this macro to get the undefined for simple types.
Definition: undefval.h:272
const TrcKeyZSampling & sampling() const
Definition: rangeposprovider.h:59
Hor+Vert sampling in 3D surveys.
Definition: trckeyzsampling.h:35
Position.
Definition: commontypes.h:42
static Provider3D * create()
Definition: rangeposprovider.h:77
void fillPar(IOPar &iop, const ODPolygon< T > &poly, const char *inpkey)
Definition: polygon.h:175
int curlinezsampsz_
Definition: rangeposprovider.h:134
TypeSet< StepInterval< float > > zrgs_
Definition: rangeposprovider.h:130
Index_Type GeomID
Definition: commontypes.h:52
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
virtual bool includes(const Coord &c, float z=mUdf(float)) const
Definition: rangeposprovider.h:64
void setHSampling(const TrcKeySampling &tks) const
Definition: rangeposprovider.h:61
Provides a subselection for 2D surveys - requires the line name(s).
Definition: posprovider.h:95
3D provider based on TrcKeyZSampling
Definition: rangeposprovider.h:29
Positioning in a seismic survey: inline/crossline or lineNr/trcNr.
Definition: binid.h:30
StepInterval< int > curtrcrg_
Definition: rangeposprovider.h:135
Represents a unique trace position in one of the surveys that OpendTect is managing.
Definition: trckey.h:28
int curzidx_
Definition: rangeposprovider.h:133
const StepInterval< int > & trcRange(int lidx) const
Definition: rangeposprovider.h:120
mDeclEmptyTranslatorBundle(Strat, StratLayerSequenceGenDesc, od,"sgd") mDeclEmptyTranslatorBundle(Strat
virtual Provider * clone() const
Definition: rangeposprovider.h:97
static void initClass()

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