OpendTect-6_4  6.4
emregion.h
Go to the documentation of this file.
1 #ifndef emregion_h
2 #define emregion_h
3 
4 /*+
5 ________________________________________________________________________
6 
7  (C) dGB Beheer B.V.; (LICENSE) http://opendtect.org/OpendTect_license.txt
8  Author: Nanne Hemstra
9  Date: October 2014
10  RCS: $Id: emregion.h 38690 2015-03-30 18:00:30Z nanne.hemstra@dgbes.com $
11 ________________________________________________________________________
12 
13 -*/
14 
15 
16 
17 #include "earthmodelmod.h"
18 #include "namedobj.h"
19 
20 #include "multiid.h"
21 #include "polygon.h"
22 #include "position.h"
23 #include "trckeyzsampling.h"
24 
26 class TaskRunner;
27 
28 namespace EM
29 {
30 
31 class Fault;
32 class Horizon3D;
33 
34 mExpClass(EarthModel) Region
35 {
36 public:
37  virtual ~Region();
38 
39  int id() const;
40  const TrcKeyZSampling& getBoundingBox() const;
41  virtual bool isInside(const TrcKey&,float z,
42  bool includeborder=true) const;
43 
44  virtual void fillPar(IOPar&) const;
45  virtual bool usePar(const IOPar&);
46 
47 protected:
48  Region(Pos::GeomID =-1);
49 
51  int id_;
53 
54 };
55 
56 
57 mExpClass(EarthModel) RegionBoundary : public NamedObject
58 {
59 public:
60  virtual const char* type() const = 0;
61  virtual bool init(TaskRunner*) { return true; }
62  virtual bool hasName() const { return false;}
63 
64  virtual bool onRightSide(const TrcKey&,float z) const = 0;
65  virtual void getSideStrs(uiStringSet&) const = 0;
66  virtual void setSide( int sd ) { side_ = sd; }
67  int getSide() const { return side_;}
68 
69  virtual void fillPar(IOPar&) const = 0;
70  virtual bool usePar(const IOPar&) = 0;
71 
72 protected:
74  : side_(-1) {}
75 
76  int side_;
77 };
78 
79 
82 public:
83  RegionInlBoundary( int inl=mUdf(int) )
84  : inl_(inl)
85  {}
86 
87  const char* type() const;
88  void getSideStrs(uiStringSet&) const;
89  bool onRightSide(const TrcKey&,float z) const;
90 
91  void fillPar(IOPar&) const;
92  bool usePar(const IOPar&);
93 
94  int inl_;
95 };
96 
97 
100 public:
101  RegionCrlBoundary( int crl=mUdf(int) )
102  : crl_(crl)
103  {}
104 
105  const char* type() const;
106  void getSideStrs(uiStringSet&) const;
107  bool onRightSide(const TrcKey&,float z) const;
108 
109  void fillPar(IOPar&) const;
110  bool usePar(const IOPar&);
111 
112  int crl_;
113 };
114 
115 
118 public:
119  RegionZBoundary( float z=mUdf(float) )
120  : z_(z) {}
121 
122  const char* type() const;
123  void getSideStrs(uiStringSet&) const;
124  bool onRightSide(const TrcKey&,float z) const;
125 
126  void fillPar(IOPar&) const;
127  bool usePar(const IOPar&);
128 
129  float z_;
130 };
131 
132 
135 public:
138 
139  const char* type() const;
140  void setKey(const MultiID&);
141  const MultiID& key() const { return key_; }
142  bool hasName() const { return true; }
143  bool init(TaskRunner*);
144  void getSideStrs(uiStringSet&) const;
145  bool onRightSide(const TrcKey&,float z) const;
146 
147  void fillPar(IOPar&) const;
148  bool usePar(const IOPar&);
149 
150 protected:
153 };
154 
155 
158 public:
161 
162  const char* type() const;
163  void setKey(const MultiID&);
164  const MultiID& key() const { return key_; }
165  bool hasName() const { return true; }
166  bool init(TaskRunner*);
167  void getSideStrs(uiStringSet&) const;
168  bool onRightSide(const TrcKey&,float z) const;
169 
170  void fillPar(IOPar&) const;
171  bool usePar(const IOPar&);
172 
173 protected:
175  const EM::Fault* flt_;
177 
178 };
179 
180 
183 public:
186 
187  const char* type() const;
188  void setKey(const MultiID&);
189  const MultiID& key() const { return key_; }
190  bool hasName() const { return true; }
191  void getSideStrs(uiStringSet&) const;
192  bool onRightSide(const TrcKey&,float z) const;
193 
194  void fillPar(IOPar&) const;
195  bool usePar(const IOPar&);
196 
199 };
200 
201 
202 mExpClass(EarthModel) Region3D : public Region
203 {
204 public:
205  Region3D();
206  ~Region3D();
207 
208  void addBoundary(RegionBoundary*); // becomes mine
209  RegionBoundary* getBoundary(int idx);
210  void removeBoundary(int idx);
211  void removeBoundary(RegionBoundary&);
212  bool hasBoundary(const MultiID&) const;
213  int size() const;
214  bool isEmpty() const;
215  void setEmpty();
216 
217  bool init(TaskRunner*);
218  bool isInside(const TrcKey&,float z,bool inclborder) const;
219 
220  void fillPar(IOPar&) const;
221  bool usePar(const IOPar&);
222 
223 protected:
225 };
226 
227 } // namespace EM
228 
229 #endif
#define mExpClass(module)
Definition: commondefs.h:160
const MultiID & key() const
Definition: emregion.h:164
Fault Surface base class.
Definition: emfault.h:84
Pos::GeomID geomid_
Definition: emregion.h:52
#define mODTextTranslationClass(clss)
Definition: uistring.h:38
void usePar(const IOPar &iop, ODPolygon< T > &poly, const char *inpkey)
Definition: polygon.h:188
bool init()
mODTextTranslationClass(RegionZBoundary) public
Definition: emregion.h:117
const ODPolygon< float > * polygon_
Definition: emregion.h:198
Definition: emregion.h:98
int getSide() const
Definition: emregion.h:67
Definition: emregion.h:34
bool hasName() const
Definition: emregion.h:142
mODTextTranslationClass(RegionInlBoundary) public
Definition: emregion.h:81
ObjectSet< RegionBoundary > boundaries_
Definition: emregion.h:224
MultiID key_
Definition: emregion.h:197
const MultiID & key() const
Definition: emregion.h:189
const EM::Fault * flt_
Definition: emregion.h:175
Set of pointers to objects.
Definition: commontypes.h:32
float z_
Definition: emregion.h:129
bool hasName() const
Definition: emregion.h:190
Generalized set of parameters of the keyword-value type.
Definition: iopar.h:47
Class that can execute a task.
Definition: task.h:169
#define mUdf(type)
Use this macro to get the undefined for simple types.
Definition: undefval.h:272
Hor+Vert sampling in 3D surveys.
Definition: trckeyzsampling.h:35
const MultiID & key() const
Definition: emregion.h:141
virtual bool hasName() const
Definition: emregion.h:62
int side_
Definition: emregion.h:76
RegionBoundary()
Definition: emregion.h:73
Definition: emregion.h:57
void fillPar(IOPar &iop, const ODPolygon< T > &poly, const char *inpkey)
Definition: polygon.h:175
Definition: emregion.h:156
Index_Type GeomID
Definition: commontypes.h:52
FixedString Fault()
Definition: keystrs.h:65
int inl_
Definition: emregion.h:94
FixedString Region()
Definition: keystrs.h:108
virtual void setSide(int sd)
Definition: emregion.h:66
int id_
Definition: emregion.h:51
Definition: emregion.h:80
Object with a name.
Definition: namedobj.h:35
TrcKeyZSampling tkzs_
Definition: emregion.h:50
EM::Horizon3D * hor_
Definition: emregion.h:152
FaultTrcDataProvider & prov_
Definition: emregion.h:176
FaultTrace data provider.
Definition: faulttrace.h:225
Earth Model objects like horizons, faults, fault-sticks and bodies.
Definition: embody.h:25
int crl_
Definition: emregion.h:112
MultiID key_
Definition: emregion.h:174
virtual bool init(TaskRunner *)
Definition: emregion.h:61
Definition: uistring.h:218
mODTextTranslationClass(RegionCrlBoundary) public
Definition: emregion.h:99
Represents a unique trace position in one of the surveys that OpendTect is managing.
Definition: trckey.h:28
3D Horizon. A Horizon is made up of one or more grids (so they can overlap at faults). The grids are defined by knot-points in a matrix and fillstyle in between the knots.
Definition: emhorizon3d.h:96
bool isEmpty(const NLAModel *mdl)
Definition: emregion.h:202
MultiID key_
Definition: emregion.h:151
Definition: emregion.h:116
Definition: emregion.h:181
Definition: emregion.h:133
Compound key consisting of ints.
Definition: multiid.h:25
bool hasName() const
Definition: emregion.h:165

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