OpendTect-6_4  6.4
posfilterset.h
Go to the documentation of this file.
1 #ifndef posfilterset_h
2 #define posfilterset_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 "posfilter.h"
18 
19 
20 
21 
22 namespace Pos
23 {
24 
29 mExpClass(Algo) FilterSet : public virtual Filter
30 {
31 public:
32 
33  virtual ~FilterSet();
34 
35  void add(Filter*);
36  void add(const IOPar&);
37 
38  static const char* typeStr();
39 
40  virtual bool initialize(TaskRunner*);
41  virtual void reset();
42  virtual bool includes(const Coord&,float) const;
43  virtual float adjustedZ(const Coord&,float) const;
44  virtual bool hasZAdjustment() const;
45  virtual void fillPar(IOPar&) const;
46  virtual void usePar(const IOPar&);
47  virtual void getSummary(BufferString&) const;
48  virtual float estRatio(const Provider&) const;
49 
50  bool isEmpty() const { return filts_.isEmpty(); }
51  int size() const { return filts_.size(); }
52 
53  ObjectSet<Filter>& filters() { return filts_; }
54  const ObjectSet<Filter>& filters() const { return filts_; }
55 
56 protected:
57 
59 
60  void copyFrom(const FilterSet&);
61 
62 };
63 
64 
65 #define mSimpPosFilterSetDefFns(dim) \
66  FilterSet##dim() {} \
67  FilterSet##dim( const FilterSet##dim& fs ) \
68  { *this = fs; } \
69  FilterSet##dim& operator =( const FilterSet##dim& fs ) \
70  { copyFrom(fs); return *this; } \
71  virtual Filter* clone() const { return new FilterSet##dim(*this); } \
72  virtual const char* type() const { return typeStr(); } \
73  virtual const char* factoryKeyword() const { return type(); } \
74  virtual bool includes( const Coord& c, float z=1e30 ) const \
75  { return FilterSet::includes(c,z); } \
76 
77 
83  , public Filter3D
84 {
85 public:
86 
87  virtual bool is2D() const { return false; }
88  virtual bool includes(const BinID&,float z=mUdf(float)) const;
89 
91 
92 };
93 
94 
100  , public Filter2D
101 {
102 public:
103 
104  virtual bool is2D() const { return true; }
105  virtual bool includes(int,float z=mUdf(float),int lidx=0) const;
106 
108 
109 };
110 
111 
112 } // namespace
113 
114 #endif
#define mExpClass(module)
Definition: commondefs.h:160
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
ObjectSet< Filter > filts_
Definition: posfilterset.h:58
#define mSimpPosFilterSetDefFns(dim)
Definition: posfilterset.h:65
virtual bool is2D() const
Definition: posfilterset.h:87
A cartesian coordinate in 2D space.
Definition: coord.h:25
Decides whether a given position should be included.
Definition: posfilter.h:45
Set of pointers to objects.
Definition: commontypes.h:32
3D FilterSet
Definition: posfilterset.h:82
Generalized set of parameters of the keyword-value type.
Definition: iopar.h:47
const ObjectSet< Filter > & filters() const
Definition: posfilterset.h:54
Class that can execute a task.
Definition: task.h:169
int size() const
Definition: posfilterset.h:51
#define mUdf(type)
Use this macro to get the undefined for simple types.
Definition: undefval.h:272
ObjectSet< Filter > & filters()
Definition: posfilterset.h:53
virtual bool is2D() const
Definition: posfilterset.h:104
Position.
Definition: commontypes.h:42
void fillPar(IOPar &iop, const ODPolygon< T > &poly, const char *inpkey)
Definition: polygon.h:175
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
Set of Filters. Owns the Filters.
Definition: posfilterset.h:29
bool isEmpty() const
Definition: posfilterset.h:50
2D FilterSet
Definition: posfilterset.h:99

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