OpendTect-6_4  6.4
emhorizon2d.h
Go to the documentation of this file.
1 #ifndef emhorizon2d_h
2 #define emhorizon2d_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 "emhorizon.h"
18 #include "bufstringset.h"
19 #include "horizon2dline.h"
20 #include "posinfo2dsurv.h"
21 
22 class ZAxisTransform;
23 namespace Geometry { class Horizon2DLine; }
24 namespace Table { class FormatDesc; }
25 template <class T> class Array1D;
26 
27 namespace EM
28 {
29 class EMManager;
30 
36 {
37 public:
39  Geometry::Horizon2DLine* sectionGeometry(const SectionID&);
40  const Geometry::Horizon2DLine* sectionGeometry(const SectionID&) const;
41 
42  int nrLines() const;
43 
44  int lineIndex(Pos::GeomID geomid) const;
45 
46  int lineIndex(const char* linenm) const;
47  const char* lineName(int id) const;
48  const char* lineSet(int id) const;
49  Pos::GeomID geomID(int idx) const;
50 
51  PosID getPosID(const TrcKey&) const;
52  TrcKey getTrcKey(const PosID&) const;
53 
54  bool includeLine(Pos::GeomID geomid,int step=1);
55 
56  bool addLine(Pos::GeomID geomid,int step=1);
57 
58  bool addLine(Pos::GeomID geomid,
59  const StepInterval<int>& trcrg);
60 
61  void removeLine(Pos::GeomID geomid);
62 
63  bool isAtEdge(const PosID&) const;
64  PosID getNeighbor(const PosID&,bool nextcol,
65  bool retundef=false) const;
72  static const char* sKeyLineIDs() { return "Line IDs"; }
73  static const char* sKeyLineNames() { return "Line names"; }
74  static const char* sKeyLineSets() { return "Set ID of line "; }
75  static const char* sKeyID() { return "ID"; }
76  static const char* sKeyTraceRange()
77  { return "Trace Range of line "; }
78  static const char* sKeyTrcRg() { return "Trace range"; }
79  static const char* sKeyNrLines() { return "Nr of Lines"; }
80 
81  int getConnectedPos(const PosID& posid,
82  TypeSet<PosID>* res) const;
83  StepInterval<int> colRange(const SectionID&,
84  Pos::GeomID geomid) const;
85 
86  StepInterval<int> colRange(Pos::GeomID geomid) const;
87 
88 protected:
89  Geometry::Horizon2DLine* createSectionGeometry() const;
90 
91  bool doAddLine(Pos::GeomID geomid,
92  const StepInterval<int>& trcrg,
93  bool mergewithdouble);
94 
95  void fillPar(IOPar&) const;
96  bool usePar(const IOPar&);
97 
99 };
100 
101 
108 mExpClass(EarthModel) Horizon2D : public Horizon
110 public:
111 
112  virtual float getZ(const TrcKey&) const;
113  virtual bool setZ(const TrcKey&,float z,bool addtohist);
114  virtual bool setZAndNodeSourceType(const TrcKey&,float z,
115  bool addtohist, NodeSourceType type=Auto);
116  virtual bool hasZ(const TrcKey&) const;
117  virtual Coord3 getCoord(const TrcKey&) const;
118  virtual void setAttrib(const TrcKey&,int attr,int yn,
119  bool addtohist);
120  virtual bool isAttrib(const TrcKey&,int attr) const;
121 
122  virtual float getZValue(const Coord&,bool allow_udf=true,
123  int nr=0) const;
126 
127  bool unSetPos(const EM::PosID&,bool addtohist);
128  bool unSetPos(const EM::SectionID&,const EM::SubID&,
129  bool addtohist);
130  Coord3 getPos(const EM::PosID&) const;
131  Coord3 getPos(const EM::SectionID&,
132  const EM::SubID&) const;
133  TypeSet<Coord3> getPositions(int lineidx,int trcnr) const;
134  Coord3 getPosition(EM::SectionID,int lidx,
135  int trcnr) const;
136 
137  Coord3 getPos(EM::SectionID,Pos::GeomID,int trc) const;
138  virtual void setNodeSourceType(const TrcKey&,
140  virtual bool isNodeSourceType(const PosID&,
141  NodeSourceType)const;
142  virtual bool isNodeSourceType(const TrcKey&,
143  NodeSourceType)const;
144 
145  bool setPos(EM::SectionID,Pos::GeomID geomid,
146  int trcnr,float z,bool addtohist);
147 
148  bool setPos(const EM::PosID&,const Coord3&,
149  bool addtohist);
150  bool setPos(const EM::SectionID&,const EM::SubID&,
151  const Coord3&,bool addtohist);
152 
153  Horizon2DGeometry& geometry() { return geometry_; }
154  const Horizon2DGeometry& geometry() const { return geometry_; }
155 
156  virtual void removeAll();
157  void removeSelected(const Selector<Coord3>& selector,
158  TaskRunner* tr );
159 
160  bool setArray1D(const Array1D<float>&,
161  const StepInterval<int>& trcrg,
162  SectionID sid,Pos::GeomID geomid,
163  bool onlyfillundefs);
164  bool setArray1D(const Array1D<float>&,SectionID sid,
165  Pos::GeomID geomid,
166  bool onlyfillundefs );
167 
168  Array1D<float>* createArray1D(SectionID,
169  Pos::GeomID geomid,
170  const ZAxisTransform* =0) const;
171 
172  TrcKey::SurvID getSurveyID() const;
173  uiString getUserTypeStr() const { return userTypeStr(); }
174  static uiString userTypeStr() { return tr("2D Horizon"); }
175 
176 protected:
177 
178  const IOObjContext& getIOObjContext() const;
179  void initNodeSourceArray(const TrcKey&);
180 
188 };
189 
190 } // namespace EM
191 
192 #endif
Array1D ( Subclass of ArrayND ) is a one dimensional array.
Definition: arraynd.h:101
od_int16 SectionID
Definition: emposid.h:25
#define mExpClass(module)
Definition: commondefs.h:160
static const char * sKeyNrLines()
Definition: emhorizon2d.h:79
Horizon2DGeometry & geometry()
Definition: emhorizon2d.h:153
static const char * sKeyID()
Definition: emhorizon2d.h:75
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
Array1D< char > * nodesource_
Definition: emhorizon2d.h:182
Pos::SurvID SurvID
Definition: trckey.h:32
Definition: horizon2dline.h:30
Definition: uistring.h:89
A cartesian coordinate in 2D space.
Definition: coord.h:25
static const char * sKeyTraceRange()
Definition: emhorizon2d.h:76
static const char * sKeyLineIDs()
Definition: emhorizon2d.h:72
static const char * sKeyTrcRg()
Definition: emhorizon2d.h:78
od_int64 SubID
Definition: emposid.h:26
Horizon RowColSurfaceGeometry.
Definition: emhorizon.h:32
TypeSet< Pos::GeomID > geomids_
Definition: emhorizon2d.h:98
2D Horizon. The Horizon is only present along 2d lines, set by addLine. Each position&#39;s subid is form...
Definition: emhorizon2d.h:108
#define mDefineEMObjFuncs(clss)
Definition: emobject.h:373
static const char * sKeyLineNames()
Definition: emhorizon2d.h:73
void removeAll()
Set of (small) copyable elements.
Definition: commontypes.h:30
Generalized set of parameters of the keyword-value type.
Definition: iopar.h:47
Definition: geom2dascio.h:21
Class that can execute a task.
Definition: task.h:169
void fillPar(IOPar &iop, const ODPolygon< T > &poly, const char *inpkey)
Definition: polygon.h:175
static uiString userTypeStr()
Definition: emhorizon2d.h:174
A cartesian coordinate in 3D space.
Definition: coord.h:72
Index_Type GeomID
Definition: commontypes.h:52
Base class for surfaces like horizons and faults. A surface is made up of one or more segments or pat...
Definition: emsurface.h:33
uiString getUserTypeStr() const
Definition: emhorizon2d.h:173
Earth Model objects like horizons, faults, fault-sticks and bodies.
Definition: embody.h:25
NodeSourceType
Definition: emobject.h:163
2D HorizonGeometry
Definition: emhorizon2d.h:35
const Horizon2DGeometry & geometry() const
Definition: emhorizon2d.h:154
Represents a unique trace position in one of the surveys that OpendTect is managing.
Definition: trckey.h:28
static const char * sKeyLineSets()
Definition: emhorizon2d.h:74
Base class for z-axis transforms.
Definition: zaxistransform.h:37
Definition: arraytesselator.h:21
IOObjContext * getIOObjContext(Seis::GeomType, bool forread)
Horizon Surface.
Definition: emhorizon.h:47
Holds the context for selecting and/or creating IOObjs.
Definition: ctxtioobj.h:62
Horizon2DGeometry geometry_
Definition: emhorizon2d.h:181

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