OpendTect-6_4  6.4
emsurfacegeometry.h
Go to the documentation of this file.
1 #ifndef emsurfacegeometry_h
2 #define emsurfacegeometry_h
3 
4 /*+
5 ________________________________________________________________________
6 
7  (C) dGB Beheer B.V.; (LICENSE) http://opendtect.org/OpendTect_license.txt
8  Author: Kristofer Tingdahl
9  Date: 4-11-2002
10  RCS: $Id$
11 ________________________________________________________________________
12 
13 
14 -*/
15 
16 #include "earthmodelmod.h"
17 #include "bufstringset.h"
18 #include "emposid.h"
19 #include "emobject.h"
20 #include "mathfunc.h"
21 #include "rowcolsurface.h"
22 
23 template <class T, class AT> class TopList;
24 
25 
26 class RowCol;
27 
28 
29 namespace Geometry { class RowColSurface; }
30 
31 
32 namespace EM
33 {
34 class Surface;
35 class SurfaceIODataSelection;
36 
41 mExpClass(EarthModel) SurfaceGeometry : public CallBacker
43 public:
45  virtual ~SurfaceGeometry();
46  virtual void removeAll();
47 
48  virtual bool enableChecks(bool yn);
49  virtual bool isChecksEnabled() const;
50  virtual bool isNodeOK(const PosID&) const;
51 
52  int nrSections() const;
53  SectionID sectionID(int idx) const;
54  SectionID sectionID(const char*) const;
55  bool hasSection(const SectionID&) const;
56  int sectionIndex(const SectionID&) const;
57  const char* sectionName(const SectionID&) const;
58  bool setSectionName( const SectionID&, const char*,
59  bool addtohistory );
60  SectionID addSection(const char* nm,bool addtohistory);
61  SectionID addSection(const char* nm,const SectionID&,
62  bool addtohistory);
64  virtual bool removeSection(const SectionID&,bool addtohistory);
65  virtual SectionID cloneSection(const SectionID&);
66 
67  virtual const Geometry::Element* sectionGeometry(const SectionID&) const;
68  virtual Geometry::Element* sectionGeometry(const SectionID&);
69  virtual int getConnectedPos(const PosID& posid,
70  TypeSet<PosID>* res) const;
72  virtual void getLinkedPos(const PosID& posid,TypeSet<PosID>&) const;
73  virtual bool isAtEdge(const PosID&) const;
74 
75  bool isChanged(int) const { return changed_; }
76  void resetChangedFlag() { changed_=false; }
77 
78  virtual bool isLoaded() const;
79  virtual bool isFullResolution() const;
80  virtual Executor* loader(const SurfaceIODataSelection* s=0);
81  virtual Executor* saver(const SurfaceIODataSelection* s=0,
82  const MultiID* key=0);
83 
84  virtual int findPos(const SectionID&,const Interval<float>& x,
85  const Interval<float>& y,
86  const Interval<float>& z,
87  TypeSet<PosID>* res) const;
88  virtual int findPos(const Interval<float>& x,
89  const Interval<float>& y,
90  const Interval<float>& z,TypeSet<PosID>*) const;
91  virtual int findPos(const TrcKeyZSampling&,TypeSet<PosID>*) const;
92 
93  virtual EMObjectIterator* createIterator(const EM::SectionID&,
94  const TrcKeyZSampling* =0) const;
95 
96 
97  virtual bool usePar(const IOPar&);
98  virtual void fillPar(IOPar&) const;
99 
100 protected:
101 
102  SectionID addSectionInternal(Geometry::Element*,
103  const char* nm,const SectionID&,
104  bool addtohistory);
105 
106 
107  virtual Geometry::Element* createSectionGeometry() const = 0;
108  void geomChangeCB(CallBacker*);
109 
114 
115  bool changed_;
116 
117 };
118 
119 
126 public:
128  virtual ~RowColSurfaceGeometry();
129 
130 
131  const Geometry::RowColSurface* sectionGeometry(const SectionID&) const;
132  Geometry::RowColSurface* sectionGeometry(const SectionID&);
133 
134  StepInterval<int> rowRange(const SectionID&) const;
135  StepInterval<int> rowRange() const;
136  StepInterval<int> colRange(const SectionID&,int row) const;
137  StepInterval<int> colRange() const;
138  StepInterval<int> colRange(int row) const;
139 
140  virtual EMObjectIterator* createIterator(const EM::SectionID&,
141  const TrcKeyZSampling* =0) const;
142 
143 };
144 
145 } // namespace EM
146 
147 #endif
ObjectSet< Geometry::Element > sections_
Definition: emsurfacegeometry.h:111
od_int16 SectionID
Definition: emposid.h:25
#define mExpClass(module)
Definition: commondefs.h:160
To be able to send and/or receive CallBacks, inherit from this class.
Definition: callback.h:272
TypeSet< SectionID > sids_
Definition: emsurfacegeometry.h:112
#define mODTextTranslationClass(clss)
Definition: uistring.h:38
Is an identifier for each position in the earthmodel.
Definition: emposid.h:37
void usePar(const IOPar &iop, ODPolygon< T > &poly, const char *inpkey)
Definition: polygon.h:188
bool changed_
Definition: emsurfacegeometry.h:115
Is a class that holds a "top N" list with the N highest (or lowest) values that is added...
Definition: houghtransform.h:23
Set of BufferString objects.
Definition: bufstringset.h:28
Surface & surface_
Definition: emsurfacegeometry.h:110
Iterator that iterates a number of positions (normally all) on an EMObject. The object is created by ...
Definition: emobject.h:122
void removeAll()
Set of (small) copyable elements.
Definition: commontypes.h:30
BufferStringSet sectionnames_
Definition: emsurfacegeometry.h:113
Generalized set of parameters of the keyword-value type.
Definition: iopar.h:47
Definition: rowcolsurface.h:26
Hor+Vert sampling in 3D surveys.
Definition: trckeyzsampling.h:35
Surface geometry.
Definition: emsurfacegeometry.h:41
bool isChanged(int) const
Definition: emsurfacegeometry.h:75
void fillPar(IOPar &iop, const ODPolygon< T > &poly, const char *inpkey)
Definition: polygon.h:175
Definition: geomelement.h:37
IdxPair used for its row() and col().
Definition: rowcol.h:25
RowCol SurfaceGeometry.
Definition: emsurfacegeometry.h:124
FixedString Surface()
Definition: keystrs.h:126
Base class for surfaces like horizons and faults. A surface is made up of one or more segments or pat...
Definition: emsurface.h:33
Earth Model objects like horizons, faults, fault-sticks and bodies.
Definition: embody.h:25
void resetChangedFlag()
Definition: emsurfacegeometry.h:76
Surface I/O data selection.
Definition: emsurfaceiodata.h:62
Definition: arraytesselator.h:21
Compound key consisting of ints.
Definition: multiid.h:25
bool findPos(const T1 &posarr, T3 sz, T2 pos, T3 beforefirst, T3 &idx)
Definition: idxable.h:75
Specification to enable chunkwise execution of a process.
Definition: executor.h:39

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