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

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