OpendTect  6.6
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  RCS: $Id$
10 ________________________________________________________________________
11 
12 -*/
13 
14 #include "seismod.h"
15 #include "seistype.h"
16 #include "ranges.h"
17 #include "binid.h"
18 #include "bufstring.h"
19 class LineKey;
20 namespace Pos { class Provider; }
21 
22 
23 namespace Seis
24 {
25 
29 {
30 public:
31 
33  : is2d_(Seis::is2D(gt))
34  , isps_(Seis::isPS(gt))
35  , onlyrange_(true)
36  , fornewentry_(false)
37  , multiline_(false)
38  , withoutz_(false)
39  , withstep_(true) {}
40  SelSetup( bool is_2d, bool is_ps=false )
41  : is2d_(is_2d)
42  , isps_(is_ps)
43  , onlyrange_(true)
44  , fornewentry_(false)
45  , multiline_(false)
46  , withoutz_(false)
47  , withstep_(true) {}
48 
51  mDefSetupClssMemb(SelSetup,bool,onlyrange)
52  mDefSetupClssMemb(SelSetup,bool,fornewentry)
53  mDefSetupClssMemb(SelSetup,bool,multiline)
54  mDefSetupClssMemb(SelSetup,bool,withoutz)
55  mDefSetupClssMemb(SelSetup,bool,withstep)
57 
58  Seis::GeomType geomType() const { return geomTypeOf(is2d_,isps_); }
59 
60 };
61 
62 
82 {
83 public:
84 
85  virtual ~SelData();
86 
87  typedef SelType Type;
88  virtual Type type() const = 0;
89  static SelData* get(Type);
90  static SelData* get(const IOPar&);
91  static SelData* get(const Pos::Provider&);
92  virtual SelData* clone() const = 0;
93  virtual void copyFrom(const SelData&) = 0;
94 
95  bool operator ==(const SelData&) const;
96  bool operator !=(const SelData&) const;
97 
98  bool isAll() const { return isall_; }
99  void setIsAll( bool yn=true ) { isall_ = yn; }
100  inline bool isOK( const BinID& b ) const { return !selRes(b); }
101  virtual int selRes(const BinID&) const = 0;
102 
103  virtual Interval<float> zRange() const;
104  virtual bool setZRange(Interval<float>) { return false; }
105  virtual Interval<int> inlRange() const;
106  virtual bool setInlRange(Interval<int>) { return false; }
107  virtual Interval<int> crlRange() const;
108  virtual bool setCrlRange(Interval<int>) { return false; }
109  virtual int expectedNrTraces(bool for2d=false,
110  const BinID* step=0) const = 0;
111 
112  virtual void fillPar(IOPar&) const = 0;
113  virtual void usePar(const IOPar&) = 0;
114  static void removeFromPar(IOPar&);
115 
116  virtual void extendZ(const Interval<float>&) = 0;
117  virtual void extendH(const BinID& stepout,
118  const BinID* stepoutstep=0);
119  virtual void include(const SelData&) = 0;
120 
121  // Interesting in some 2D situations:
122  inline Pos::GeomID geomID() const { return geomid_; }
123  inline void setGeomID(Pos::GeomID geomid) { geomid_ = geomid; }
124 
125 protected:
126 
128 
129  bool isall_;
131 
132  int tracesInSI() const;
133  virtual void doExtendH(BinID stepout,BinID stepoutstep) = 0;
134 };
135 
136 
137 inline bool isEmpty( const SelData* sd )
138 {
139  return !sd || sd->isAll();
140 }
141 
142 
143 } // namespace
144 
Seis::SelData::zRange
virtual Interval< float > zRange() const
Seis::SelData::Type
SelType Type
Definition: seisselection.h:87
Seis::SelData::expectedNrTraces
virtual int expectedNrTraces(bool for2d=false, const BinID *step=0) const =0
Seis::SelData::setCrlRange
virtual bool setCrlRange(Interval< int >)
Definition: seisselection.h:108
Seis::SelData::extendZ
virtual void extendZ(const Interval< float > &)=0
Seis::SelData::selRes
virtual int selRes(const BinID &) const =0
see class doc
Seis::isPS
bool isPS(GeomType gt)
Definition: seistype.h:37
Seis::SelSetup::mDefSetupClssMemb
mDefSetupClssMemb(SelSetup, bool, is2d) mDefSetupClssMemb(SelSetup
Pos
Position.
Definition: commontypes.h:78
Seis::SelData::tracesInSI
int tracesInSI() const
Seis::SelData::setGeomID
void setGeomID(Pos::GeomID geomid)
Definition: seisselection.h:123
Seis
Summary for a Seismic object.
Definition: segydirectdef.h:22
mExpClass
#define mExpClass(module)
Definition: commondefs.h:177
Seis::SelData::geomID
Pos::GeomID geomID() const
Definition: seisselection.h:122
binid.h
Seis::SelData::inlRange
virtual Interval< int > inlRange() const
Seis::SelData::get
static SelData * get(const Pos::Provider &)
filled; some defaults
Seis::SelType
SelType
Definition: seistype.h:25
Seis::SelSetup::SelSetup
SelSetup(Seis::GeomType gt)
Definition: seisselection.h:32
operator==
bool operator==(const ArrayNDInfo &a1, const ArrayNDInfo &a2)
Definition: arrayndinfo.h:81
bufstring.h
Seis::SelData::setZRange
virtual bool setZRange(Interval< float >)
Definition: seisselection.h:104
Seis::SelData::extendH
virtual void extendH(const BinID &stepout, const BinID *stepoutstep=0)
Seis::SelData::doExtendH
virtual void doExtendH(BinID stepout, BinID stepoutstep)=0
Seis::SelData::get
static SelData * get(const IOPar &)
fully filled
Seis::SelData::~SelData
virtual ~SelData()
Seis::SelData::type
virtual Type type() const =0
BinID
Positioning in a seismic survey: inline/crossline or lineNr/trcNr.
Definition: binid.h:31
Seis::SelSetup::SelSetup
SelSetup(bool is_2d, bool is_ps=false)
Definition: seisselection.h:40
Seis::SelData::fillPar
virtual void fillPar(IOPar &) const =0
Seis::SelData
contains input (sub-)selection data from a cube or lineset
Definition: seisselection.h:82
Seis::SelData::crlRange
virtual Interval< int > crlRange() const
operator!=
bool operator!=(const ArrayNDInfo &a1, const ArrayNDInfo &a2)
Definition: arrayndinfo.h:90
Seis::geomTypeOf
GeomType geomTypeOf(const char *)
Seis::SelSetup
setup for subselection of seismic data
Definition: seisselection.h:29
Seis::SelData::usePar
virtual void usePar(const IOPar &)=0
LineKey
Key for a line in a line set.
Definition: linekey.h:22
BufferString
OD::String with its own variable length buffer. The buffer has a guaranteed minimum size.
Definition: bufstring.h:40
Seis::SelData::geomid_
Pos::GeomID geomid_
Definition: seisselection.h:130
Seis::SelData::include
virtual void include(const SelData &)=0
Seis::isEmpty
bool isEmpty(const SelData *sd)
Definition: seisselection.h:137
Seis::SelData::SelData
SelData()
Seis::SelData::clone
virtual SelData * clone() const =0
Seis::SelData::isOK
bool isOK(const BinID &b) const
Definition: seisselection.h:100
seistype.h
Seis::SelData::get
static SelData * get(Type)
empty
Seis::SelData::removeFromPar
static void removeFromPar(IOPar &)
Seis::SelData::isAll
bool isAll() const
Definition: seisselection.h:98
mDefSetupClssMemb
#define mDefSetupClssMemb(clss, typ, memb)
Definition: commondefs.h:150
Seis::SelData::isall_
bool isall_
Definition: seisselection.h:129
ranges.h
Seis::GeomType
GeomType
Definition: seistype.h:32
Interval< float >
Pos::Provider
Provides a series of positions; can also be used for subselection.
Definition: posprovider.h:33
Seis::SelData::copyFrom
virtual void copyFrom(const SelData &)=0
IOPar
Generalized set of parameters of the keyword-value type.
Definition: iopar.h:55
Seis::is2D
bool is2D(GeomType gt)
Definition: seistype.h:33
Seis::SelData::setIsAll
void setIsAll(bool yn=true)
Definition: seisselection.h:99
Seis::SelData::setInlRange
virtual bool setInlRange(Interval< int >)
Definition: seisselection.h:106
Pos::GeomID
Index_Type GeomID
Definition: commontypes.h:87

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