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

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