OpendTect  6.3
posfilter.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 "coord.h"
16 #include "factory.h"
17 #include "posinfo2dsurv.h"
18 
19 class TaskRunner;
20 
23 namespace Pos
24 {
25 class Provider;
26 
44 {
45 public:
46 
47  virtual Filter* clone() const = 0;
48  virtual ~Filter() {}
49 
50  virtual const char* type() const = 0;
51  virtual bool is2D() const = 0;
52  virtual bool isProvider() const { return false;}
53 
54  virtual bool initialize( TaskRunner* tskr=0 )
55  { reset(); return true; }
56  virtual void reset() = 0;
57 
58  virtual bool includes(const Coord&,
59  float z=mUdf(float)) const = 0;
60  virtual bool hasZAdjustment() const { return false;}
61  virtual float adjustedZ(const Coord&, float z ) const { return z; }
62 
63  virtual void usePar(const IOPar&) = 0;
64  virtual void fillPar(IOPar&) const = 0;
65 
66  virtual void getSummary(BufferString&) const = 0;
67  virtual float estRatio(const Provider&) const = 0;
68 
69  static Filter* make(const IOPar&,bool is2d);
70 };
71 
72 
77 mExpClass(Algo) Filter3D : public virtual Filter
78 {
79 public:
80 
81  virtual bool is2D() const { return false; }
82 
83  virtual bool includes(const BinID&,float z=mUdf(float)) const = 0;
84  virtual bool includes(const Coord&,float z=mUdf(float)) const;
85 
87  static Filter3D* make(const IOPar&);
88 
89 };
90 
91 
96 mExpClass(Algo) Filter2D : public virtual Filter
97 {
98 public:
99  Filter2D() {}
100  ~Filter2D();
101 
102  virtual bool is2D() const { return true; }
103  virtual bool includes(int,float z=mUdf(float),int lidx=0) const = 0;
104  virtual bool includes(const Coord&,
105  float z=mUdf(float)) const = 0;
106 
107  void addGeomID(const Pos::GeomID);
108  void removeGeomID(int lidx);
109  Pos::GeomID geomID(int) const;
110  int nrLines() const;
111 
113  static Filter2D* make(const IOPar&);
114 
115 protected:
116 
118 };
119 
120 
121 } // namespace
#define mExpClass(module)
Definition: commondefs.h:157
Provides a series of positions; can also be used for subselection.
Definition: posprovider.h:31
bool is2D(GeomType gt)
Definition: seistype.h:32
void usePar(const IOPar &iop, ODPolygon< T > &poly, const char *inpkey)
Definition: polygon.h:200
Provides a filter related to 3D data.
Definition: posfilter.h:77
virtual bool hasZAdjustment() const
Definition: posfilter.h:60
virtual ~Filter()
Definition: posfilter.h:48
virtual bool is2D() const
Definition: posfilter.h:102
Decides whether a given position should be included.
Definition: posfilter.h:43
FixedString Provider()
Definition: keystrs.h:103
virtual bool isProvider() const
Definition: posfilter.h:52
Generalized set of parameters of the keyword-value type.
Definition: iopar.h:53
Class that can execute a task.
Definition: task.h:193
#define mUdf(type)
Use this macro to get the undefined for simple types.
Definition: undefval.h:270
Position.
Definition: commontypes.h:38
virtual bool is2D() const
Definition: posfilter.h:81
#define mDefineFactoryInClass(T, funcname)
Definition: factory.h:424
void fillPar(IOPar &iop, const ODPolygon< T > &poly, const char *inpkey)
Definition: polygon.h:187
Index_Type GeomID
Definition: commontypes.h:48
Provides a filter related to 2D seismic data.
Definition: posfilter.h:96
OD::String with its own variable length buffer. The buffer has a guaranteed minimum size...
Definition: bufstring.h:38
Positioning in a seismic survey: inline/crossline or lineNr/trcNr.
Definition: binid.h:28
virtual bool initialize(TaskRunner *tskr=0)
Definition: posfilter.h:54
TypeSet< Pos::GeomID > geomids_
Definition: posfilter.h:117
2D point or vector class.
Definition: commontypes.h:58
Filter2D()
Definition: posfilter.h:99
virtual float adjustedZ(const Coord &, float z) const
Definition: posfilter.h:61

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