OpendTect-6_4  6.4
posfilter.h
Go to the documentation of this file.
1 #ifndef posfilter_h
2 #define posfilter_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 "coord.h"
18 #include "factory.h"
19 #include "posinfo2dsurv.h"
20 
21 class TaskRunner;
22 
25 namespace Pos
26 {
27 class Provider;
28 
46 {
47 public:
48 
49  virtual Filter* clone() const = 0;
50  virtual ~Filter() {}
51 
52  virtual const char* type() const = 0;
53  virtual bool is2D() const = 0;
54  virtual bool isProvider() const { return false;}
55 
56  virtual bool initialize( TaskRunner* tr=0 )
57  { reset(); return true; }
58  virtual void reset() = 0;
59 
60  virtual bool includes(const Coord&,
61  float z=mUdf(float)) const = 0;
62  virtual bool hasZAdjustment() const { return false;}
63  virtual float adjustedZ(const Coord&, float z ) const { return z; }
64 
65  virtual void usePar(const IOPar&) = 0;
66  virtual void fillPar(IOPar&) const = 0;
67 
68  virtual void getSummary(BufferString&) const = 0;
69  virtual float estRatio(const Provider&) const = 0;
70 
71  static Filter* make(const IOPar&,bool is2d);
72 };
73 
74 
79 mExpClass(Algo) Filter3D : public virtual Filter
80 {
81 public:
82 
83  virtual bool is2D() const { return false; }
84 
85  virtual bool includes(const BinID&,float z=mUdf(float)) const = 0;
86  virtual bool includes(const Coord&,float z=mUdf(float)) const;
87 
89  static Filter3D* make(const IOPar&);
90 
91 };
92 
93 
98 mExpClass(Algo) Filter2D : public virtual Filter
99 {
100 public:
101  Filter2D() {}
102  ~Filter2D();
103 
104  virtual bool is2D() const { return true; }
105  virtual bool includes(int,float z=mUdf(float),int lidx=0) const = 0;
106  virtual bool includes(const Coord&,
107  float z=mUdf(float)) const = 0;
108 
109  void addGeomID(const Pos::GeomID);
110  void removeGeomID(int lidx);
111  Pos::GeomID geomID(int) const;
112  int nrLines() const;
113 
115  static Filter2D* make(const IOPar&);
116 
117 protected:
118 
120 };
121 
122 
123 } // namespace
124 
125 #endif
#define mExpClass(module)
Definition: commondefs.h:160
virtual bool initialize(TaskRunner *tr=0)
Definition: posfilter.h:56
Provides a series of positions; can also be used for subselection.
Definition: posprovider.h:33
void usePar(const IOPar &iop, ODPolygon< T > &poly, const char *inpkey)
Definition: polygon.h:188
Provides a filter related to 3D data.
Definition: posfilter.h:79
A cartesian coordinate in 2D space.
Definition: coord.h:25
virtual bool hasZAdjustment() const
Definition: posfilter.h:62
virtual ~Filter()
Definition: posfilter.h:50
virtual bool is2D() const
Definition: posfilter.h:104
Decides whether a given position should be included.
Definition: posfilter.h:45
virtual bool isProvider() const
Definition: posfilter.h:54
Generalized set of parameters of the keyword-value type.
Definition: iopar.h:47
Class that can execute a task.
Definition: task.h:169
#define mUdf(type)
Use this macro to get the undefined for simple types.
Definition: undefval.h:272
Position.
Definition: commontypes.h:42
virtual bool is2D() const
Definition: posfilter.h:83
#define mDefineFactoryInClass(T, funcname)
Definition: factory.h:426
void fillPar(IOPar &iop, const ODPolygon< T > &poly, const char *inpkey)
Definition: polygon.h:175
Index_Type GeomID
Definition: commontypes.h:52
Provides a filter related to 2D seismic data.
Definition: posfilter.h:98
OD::String with its own variable length buffer. The buffer has a guaranteed minimum size...
Definition: bufstring.h:40
Positioning in a seismic survey: inline/crossline or lineNr/trcNr.
Definition: binid.h:30
bool is2D(const PicksType &picks)
Definition: pickset.h:142
TypeSet< Pos::GeomID > geomids_
Definition: posfilter.h:119
Filter2D()
Definition: posfilter.h:101
virtual float adjustedZ(const Coord &, float z) const
Definition: posfilter.h:63

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