OpendTect  6.3
seisselection.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: Nov 2007
9 ________________________________________________________________________
10 
11 -*/
12 
13 #include "seiscommon.h"
14 #include "ranges.h"
15 #include "binid.h"
16 #include "bufstring.h"
17 namespace Pos { class Provider; }
18 
19 
20 namespace Seis
21 {
22 
26 {
27 public:
28 
30  : is2d_(Seis::is2D(gt))
31  , isps_(Seis::isPS(gt))
32  , onlyrange_(true)
33  , fornewentry_(false)
34  , multiline_(false)
35  , withoutz_(false)
36  , withstep_(true) {}
37  SelSetup( bool is_2d, bool is_ps=false )
38  : is2d_(is_2d)
39  , isps_(is_ps)
40  , onlyrange_(true)
41  , fornewentry_(false)
42  , multiline_(false)
43  , withoutz_(false)
44  , withstep_(true) {}
45 
46  mDefSetupClssMemb(SelSetup,bool,is2d)
47  mDefSetupClssMemb(SelSetup,bool,isps)
48  mDefSetupClssMemb(SelSetup,bool,onlyrange)
49  mDefSetupClssMemb(SelSetup,bool,fornewentry)
50  mDefSetupClssMemb(SelSetup,bool,multiline)
51  mDefSetupClssMemb(SelSetup,bool,withoutz)
52  mDefSetupClssMemb(SelSetup,bool,withstep)
53  mDefSetupClssMemb(SelSetup,BufferString,zdomkey)
54 
55  Seis::GeomType geomType() const { return geomTypeOf(is2d_,isps_); }
56 
57 };
58 
59 
79 {
80 public:
81 
82  virtual ~SelData();
83 
84  typedef SelType Type;
85  virtual Type type() const = 0;
86  static SelData* get(Type);
87  static SelData* get(const IOPar&);
88  static SelData* get(const Pos::Provider&);
89  virtual SelData* clone() const = 0;
90  virtual void copyFrom(const SelData&) = 0;
91 
92  bool isAll() const { return isall_; }
93  void setIsAll( bool yn=true ) { isall_ = yn; }
94  bool isOK(const TrcKey&) const;
95  inline bool isOK( const BinID& b ) const { return !selRes(b); }
96  virtual int selRes(const BinID&) const = 0;
97 
98  virtual Interval<float> zRange() const;
99  virtual bool setZRange(Interval<float>) { return false; }
100  virtual Interval<int> inlRange() const;
101  virtual bool setInlRange(Interval<int>) { return false; }
102  virtual Interval<int> crlRange() const;
103  virtual bool setCrlRange(Interval<int>) { return false; }
104  virtual int expectedNrTraces(bool for2d=false,
105  const BinID* step=0) const = 0;
106 
107  virtual void fillPar(IOPar&) const = 0;
108  virtual void usePar(const IOPar&) = 0;
109  static void removeFromPar(IOPar&);
110 
111  virtual void extendZ(const Interval<float>&) = 0;
112  virtual void extendH(const BinID& stepout,
113  const BinID* stepoutstep=0);
114  virtual void include(const SelData&) = 0;
115 
116  // Interesting in some 2D situations:
117  inline Pos::GeomID geomID() const { return geomid_; }
118  virtual void setGeomID(Pos::GeomID geomid) { geomid_ = geomid; }
119 
120 protected:
121 
122  SelData();
123 
124  bool isall_;
126 
127  int tracesInSI() const;
128  virtual void doExtendH(BinID stepout,BinID stepoutstep) = 0;
129 };
130 
131 
132 inline bool isEmpty( const SelData* sd )
133 {
134  return !sd || sd->isAll();
135 }
136 
137 
138 } // namespace
#define mExpClass(module)
Definition: commondefs.h:157
Seismics.
Definition: segydirectdef.h:20
bool isAll() const
Definition: seisselection.h:92
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
#define mDefSetupClssMemb(clss, typ, memb)
Definition: commondefs.h:125
setup for subselection of seismic data
Definition: seisselection.h:25
void setIsAll(bool yn=true)
Definition: seisselection.h:93
virtual bool setZRange(Interval< float >)
Definition: seisselection.h:99
SelType Type
Definition: seisselection.h:84
SelType
Definition: seistype.h:25
Pos::GeomID geomID() const
Definition: seisselection.h:117
bool isOK(const BinID &b) const
Definition: seisselection.h:95
bool isall_
Definition: seisselection.h:124
GeomType
Definition: seistype.h:31
bool isPS(GeomType gt)
Definition: seistype.h:36
FixedString Provider()
Definition: keystrs.h:103
Generalized set of parameters of the keyword-value type.
Definition: iopar.h:53
SelSetup(Seis::GeomType gt)
Definition: seisselection.h:29
virtual void setGeomID(Pos::GeomID geomid)
Definition: seisselection.h:118
bool isEmpty(const SelData *sd)
Definition: seisselection.h:132
Position.
Definition: commontypes.h:38
virtual bool setCrlRange(Interval< int >)
Definition: seisselection.h:103
void fillPar(IOPar &iop, const ODPolygon< T > &poly, const char *inpkey)
Definition: polygon.h:187
contains input (sub-)selection data from a cube or lineset
Definition: seisselection.h:78
Index_Type GeomID
Definition: commontypes.h:48
Type
Definition: angles.h:25
virtual bool setInlRange(Interval< int >)
Definition: seisselection.h:101
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
Pos::GeomID geomid_
Definition: seisselection.h:125
Represents a unique trace position in one of the surveys that OpendTect is managing.
Definition: trckey.h:26
GeomType geomTypeOf(const char *)
SelSetup(bool is_2d, bool is_ps=false)
Definition: seisselection.h:37

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