OpendTect-6_4  6.4
seisselection.h
Go to the documentation of this file.
1 #ifndef seisselection_h
2 #define seisselection_h
3 
4 /*+
5 ________________________________________________________________________
6 
7  (C) dGB Beheer B.V.; (LICENSE) http://opendtect.org/OpendTect_license.txt
8  Author: Bert
9  Date: Nov 2007
10  RCS: $Id$
11 ________________________________________________________________________
12 
13 -*/
14 
15 #include "seismod.h"
16 #include "seistype.h"
17 #include "ranges.h"
18 #include "binid.h"
19 #include "bufstring.h"
20 class LineKey;
21 namespace Pos { class Provider; }
22 
23 
24 namespace Seis
25 {
26 
30 {
31 public:
32 
34  : is2d_(Seis::is2D(gt))
35  , isps_(Seis::isPS(gt))
36  , onlyrange_(true)
37  , fornewentry_(false)
38  , multiline_(false)
39  , withoutz_(false)
40  , withstep_(true) {}
41  SelSetup( bool is_2d, bool is_ps=false )
42  : is2d_(is_2d)
43  , isps_(is_ps)
44  , onlyrange_(true)
45  , fornewentry_(false)
46  , multiline_(false)
47  , withoutz_(false)
48  , withstep_(true) {}
49 
50  mDefSetupClssMemb(SelSetup,bool,is2d)
51  mDefSetupClssMemb(SelSetup,bool,isps)
52  mDefSetupClssMemb(SelSetup,bool,onlyrange)
53  mDefSetupClssMemb(SelSetup,bool,fornewentry)
54  mDefSetupClssMemb(SelSetup,bool,multiline)
55  mDefSetupClssMemb(SelSetup,bool,withoutz)
56  mDefSetupClssMemb(SelSetup,bool,withstep)
57  mDefSetupClssMemb(SelSetup,BufferString,zdomkey)
58 
59  Seis::GeomType geomType() const { return geomTypeOf(is2d_,isps_); }
60 
61 };
62 
63 
83 {
84 public:
85 
86  virtual ~SelData();
87 
88  typedef SelType Type;
89  virtual Type type() const = 0;
90  static SelData* get(Type);
91  static SelData* get(const IOPar&);
92  static SelData* get(const Pos::Provider&);
93  virtual SelData* clone() const = 0;
94  virtual void copyFrom(const SelData&) = 0;
95 
96  bool isAll() const { return isall_; }
97  void setIsAll( bool yn=true ) { isall_ = yn; }
98  inline bool isOK( const BinID& b ) const { return !selRes(b); }
99  virtual int selRes(const BinID&) const = 0;
100 
101  virtual Interval<float> zRange() const;
102  virtual bool setZRange(Interval<float>) { return false; }
103  virtual Interval<int> inlRange() const;
104  virtual bool setInlRange(Interval<int>) { return false; }
105  virtual Interval<int> crlRange() const;
106  virtual bool setCrlRange(Interval<int>) { return false; }
107  virtual int expectedNrTraces(bool for2d=false,
108  const BinID* step=0) const = 0;
109 
110  virtual void fillPar(IOPar&) const = 0;
111  virtual void usePar(const IOPar&) = 0;
112  static void removeFromPar(IOPar&);
113 
114  virtual void extendZ(const Interval<float>&) = 0;
115  virtual void extendH(const BinID& stepout,
116  const BinID* stepoutstep=0);
117  virtual void include(const SelData&) = 0;
118 
119  // Interesting in some 2D situations:
120  inline Pos::GeomID geomID() const { return geomid_; }
121  inline void setGeomID(Pos::GeomID geomid) { geomid_ = geomid; }
122 
123 protected:
124 
125  SelData();
126 
127  bool isall_;
129 
130  int tracesInSI() const;
131  virtual void doExtendH(BinID stepout,BinID stepoutstep) = 0;
132 };
133 
134 
135 inline bool isEmpty( const SelData* sd )
136 {
137  return !sd || sd->isAll();
138 }
139 
140 
141 } // namespace
142 
143 #endif
#define mExpClass(module)
Definition: commondefs.h:160
Summary for a Seismic object.
Definition: segydirectdef.h:23
bool isAll() const
Definition: seisselection.h:96
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
#define mDefSetupClssMemb(clss, typ, memb)
Definition: commondefs.h:133
setup for subselection of seismic data
Definition: seisselection.h:29
void setIsAll(bool yn=true)
Definition: seisselection.h:97
virtual bool setZRange(Interval< float >)
Definition: seisselection.h:102
SelType Type
Definition: seisselection.h:88
SelType
Definition: seistype.h:26
Pos::GeomID geomID() const
Definition: seisselection.h:120
bool isOK(const BinID &b) const
Definition: seisselection.h:98
bool isall_
Definition: seisselection.h:127
Key for a line in a line set.
Definition: linekey.h:22
GeomType
Definition: seistype.h:33
bool isPS(GeomType gt)
Definition: seistype.h:38
void setGeomID(Pos::GeomID geomid)
Definition: seisselection.h:121
Generalized set of parameters of the keyword-value type.
Definition: iopar.h:47
SelSetup(Seis::GeomType gt)
Definition: seisselection.h:33
Position.
Definition: commontypes.h:42
virtual bool setCrlRange(Interval< int >)
Definition: seisselection.h:106
void fillPar(IOPar &iop, const ODPolygon< T > &poly, const char *inpkey)
Definition: polygon.h:175
contains input (sub-)selection data from a cube or lineset
Definition: seisselection.h:82
Index_Type GeomID
Definition: commontypes.h:52
Type
Definition: angles.h:27
virtual bool setInlRange(Interval< int >)
Definition: seisselection.h:104
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
Pos::GeomID geomid_
Definition: seisselection.h:128
GeomType geomTypeOf(const char *)
bool isEmpty(const NLAModel *mdl)
SelSetup(bool is_2d, bool is_ps=false)
Definition: seisselection.h:41

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