OpendTect-6_4  6.4
emhorizon3d.h
Go to the documentation of this file.
1 #ifndef emhorizon3d_h
2 #define emhorizon3d_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 "binidsurface.h"
19 #include "task.h"
20 
21 class BinIDValueSet;
22 class DataPointSet;
23 class BufferStringSet;
24 class TrcKeySampling;
25 class Scaler;
26 class ZAxisTransform;
27 namespace Pick { class Set; }
28 namespace Pos { class Provider3D; }
29 namespace Table { class FormatDesc; }
30 namespace Threads { class WorkManager; }
31 
32 namespace EM
33 {
34 class SurfaceAuxData;
35 
42 public:
44 
45  const Geometry::BinIDSurface* sectionGeometry(const SectionID&) const;
46  Geometry::BinIDSurface* sectionGeometry(const SectionID&);
47 
48  bool removeSection(const SectionID&,bool hist);
49  SectionID cloneSection(const SectionID&);
50 
51  bool isFullResolution() const;
52  RowCol loadedStep() const;
53  RowCol step() const;
54  void setStep(const RowCol& step,
55  const RowCol& loadedstep);
56 
57  PosID getPosID(const TrcKey&) const;
58  TrcKey getTrcKey(const PosID&) const;
59 
60  bool enableChecks(bool yn);
61  bool isChecksEnabled() const;
62  bool isNodeOK(const PosID&) const;
63 
64  bool isAtEdge(const PosID& pid) const;
65  PosID getNeighbor(const PosID&,const RowCol&) const;
66  int getConnectedPos(const PosID&,
67  TypeSet<PosID>*) const;
68 
69  bool getBoundingPolygon(const SectionID&,
70  Pick::Set&) const;
71  void getDataPointSet( const SectionID&,
72  DataPointSet&,
73  float shift=0.0) const;
74  void fillBinIDValueSet(const SectionID&,
76  Pos::Provider3D* prov=0) const;
77 
78  EMObjectIterator* createIterator(const EM::SectionID&,
79  const TrcKeyZSampling* =0) const;
80 protected:
81 
82  Geometry::BinIDSurface* createSectionGeometry() const;
83 
87 };
88 
89 
96 mExpClass(EarthModel) Horizon3D : public Horizon
98 public:
99 
100  virtual float getZ(const TrcKey&) const;
102  virtual bool setZ(const TrcKey&,float z,bool addtohist);
104  virtual bool setZAndNodeSourceType(const TrcKey&,float z,
105  bool addtohist, NodeSourceType type=Auto);
106 
107  virtual void setNodeSourceType(const TrcKey&,NodeSourceType);
108  virtual void setNodeSourceType(const PosID&,NodeSourceType);
109  virtual bool isNodeSourceType(const PosID&,
110  NodeSourceType) const;
111  virtual bool isNodeSourceType(const TrcKey&,
112  NodeSourceType) const;
113  virtual bool isNodeLocked(const PosID&)const;
114 
115  bool hasNodeSourceType(const PosID&) const;
116 
117  virtual bool hasZ(const TrcKey&) const;
119  virtual Coord3 getCoord(const TrcKey&) const;
120  virtual void setAttrib(const TrcKey&,int attr,int yn,
121  bool addtohist);
122  virtual bool isAttrib(const TrcKey&,int attr) const;
123 
124  virtual float getZValue(const Coord&,bool allow_udf=true,
125  int nr=0) const;
127 
128  TrcKeySampling range() const;
129  Interval<float> getZRange() const;
130 
131  void removeAll();
132  Horizon3DGeometry& geometry();
133  const Horizon3DGeometry& geometry() const;
134 
135  virtual void setArray(const SectionID&,const BinID& start,
136  const BinID& step, Array2D<float>* arr,
137  bool takeover);
138  static Horizon3D* createWithConstZ(float z,const TrcKeySampling&);
139  Array2D<float>* createArray2D(SectionID,
140  const ZAxisTransform* zt=0) const;
141  bool setArray2D(const Array2D<float>&,SectionID,
142  bool onlyfillundefs,
143  const char* histdesc,bool trimundef);
147  bool setArray2D(Array2D<float>*,const BinID& origin,
148  const BinID& step,
149  bool takeoverarr=true);
154  Executor* importer(const ObjectSet<BinIDValueSet>&,
155  const TrcKeySampling& hs);
159  Executor* auxDataImporter(const ObjectSet<BinIDValueSet>&,
160  const BufferStringSet& attribnms,int,
161  const TrcKeySampling& hs);
162 
163 
164  Pos::GeomID getSurveyGeomID() const { return survgeomid_; }
167  void setSurveyGeomID(Pos::GeomID);
168 
169  uiString getUserTypeStr() const { return userTypeStr(); }
171  { return tr("3D Horizon"); }
172 
173  void initAllAuxData(float val=mUdf(float));
175 
176  void initTrackingAuxData(float val=mUdf(float));
177  void initTrackingArrays();
178  void updateTrackingSampling();
179  bool saveParentArray();
180  bool readParentArray();
181  bool saveNodeArrays();
182  bool readNodeArrays();
183 
184  TrcKeySampling getTrackingSampling() const;
185  void setParent(const TrcKey&,const TrcKey& parent);
186  TrcKey getParent(const TrcKey&) const;
187  void getParents(const TrcKey&,
188  TypeSet<TrcKey>&) const;
189  bool selectChildren(const TrcKey&);
190  Array2D<char>* getChildren() const;
191  void deleteChildren();
192  void resetChildren();
193  void setNodeLocked(const TrcKey&,bool locked);
194  bool isNodeLocked(const TrcKey&) const;
195  void lockAll();
196  void unlockAll();
197  const Array2D<char>* getLockedNodes() const;
198 
199  void setParentColor(const Color&);
200  const Color& getParentColor() const;
201 
202  virtual bool setPos(const EM::PosID&,const Coord3&,
203  bool addtohistory);
204  virtual bool setPos(const EM::SectionID&,const EM::SubID&,
205  const Coord3&,bool addtohistory);
206 protected:
207  enum ArrayType{Parents,Children,LockNode,NodeSource};
208 
209  void fillPar(IOPar&) const;
210  bool usePar(const IOPar&);
211  void fillDisplayPar(IOPar&) const;
212  bool useDisplayPar(const IOPar&);
213 
214  const IOObjContext& getIOObjContext() const;
215  void initNodeArraysSize(const StepInterval<int>&,
216  const StepInterval<int>&);
217  void setNodeArraySize(const StepInterval<int>&,
219  void updateNodeSourceArray(const TrcKeySampling,
220  ArrayType);
221  Array2D<char>* getNodeSourceArray(ArrayType) const;
222  void setNodeSourceArray(Array2D<char>*,ArrayType);
223  void createNodeSourceArray(const StepInterval<int>&,
224  const StepInterval<int>&,
225  ArrayType);
226  TrcKeySampling getSectionTrckeySampling() const;
227 
228  friend class EMManager;
229  friend class EMObject;
231 
236 
238 
245 
246 public:
247  /*mDeprecated*/ float getZ(const BinID&) const;
249  /*mDeprecated*/ bool setZ(const BinID&,float z,bool addtohist);
252  { return getChildren(); }
253  TrcKey::SurvID getSurveyID() const { return getSurveyGeomID();}
254 
255  static Color sDefaultSelectionColor();
256  static Color sDefaultLockColor();
257 };
258 
259 
261 {
262 friend class FindTask;
263 friend class Horizon3D;
264 protected:
265  ChildFinder(const TrcKeySampling& tks,
266  const Array2D<od_int64>& parents,
267  Array2D<char>& children );
268  ~ChildFinder();
269 
270 
271  void addTask(od_int64);
272  void taskFinished(CallBacker*);
273  int nextStep();
274 
276  int queueid_;
280 
283 
286 };
287 
288 } // namespace EM
289 
290 #endif
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
Pos::GeomID survgeomid_
Definition: emhorizon3d.h:239
A lock of a type that (hopefully) suits your needs. To use it, you need the Locker class...
Definition: threadlock.h:53
Set of data points with group selection.
Definition: datapointset.h:48
Array2D< char > * nodesource_
Definition: emhorizon3d.h:240
#define mODTextTranslationClass(clss)
Definition: uistring.h:38
ArrayType
Definition: emhorizon3d.h:207
Is an identifier for each position in the earthmodel.
Definition: emposid.h:37
Array2D< char > & children_
Definition: emhorizon3d.h:278
void usePar(const IOPar &iop, ODPolygon< T > &poly, const char *inpkey)
Definition: polygon.h:188
#define od_int64
Definition: plftypes.h:36
Array2D< od_int64 > * parents_
Definition: emhorizon3d.h:235
Threads::Lock addlock_
Definition: emhorizon3d.h:284
Pos::SurvID SurvID
Definition: trckey.h:32
Array2D< char > * children_
Definition: emhorizon3d.h:234
Provides a subselection for 3D surveys.
Definition: posprovider.h:60
Threads::Atomic< int > nrtodo_
Definition: emhorizon3d.h:281
Definition: uistring.h:89
TrcKey::SurvID getSurveyID() const
Definition: emhorizon3d.h:253
Array2D< char > * getChildren(const TrcKey &) const
Definition: emhorizon3d.h:251
A cartesian coordinate in 2D space.
Definition: coord.h:25
Set of BufferString objects.
Definition: bufstringset.h:28
Surface data.
Definition: emsurfaceauxdata.h:40
od_int64 SubID
Definition: emposid.h:26
Horizon RowColSurfaceGeometry.
Definition: emhorizon.h:32
Takes work and puts it on a queue for execution either in parallel, singlethread or manual...
Definition: threadwork.h:39
Set of picks with something in common.
Definition: pickset.h:31
bool checksupport_
Definition: emhorizon3d.h:86
TrcKeySampling trackingsamp_
Definition: emhorizon3d.h:232
interface to threads that should be portable.
Definition: atomic.h:28
Iterator that iterates a number of positions (normally all) on an EMObject. The object is created by ...
Definition: emobject.h:122
#define mDefineEMObjFuncs(clss)
Definition: emobject.h:373
RowCol loadedstep_
Definition: emhorizon3d.h:84
The generalization of something (e.g. a computation) where the steps must be done in sequence...
Definition: task.h:124
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
RowCol step_
Definition: emhorizon3d.h:85
Horizontal sampling (inline and crossline range and steps).
Definition: trckeysampling.h:27
Definition: emhorizon3d.h:260
#define mUdf(type)
Use this macro to get the undefined for simple types.
Definition: undefval.h:272
Manages the loaded/half loaded EM objects in OpendTect.
Definition: emmanager.h:46
Hor+Vert sampling in 3D surveys.
Definition: trckeyzsampling.h:35
const Array2D< od_int64 > & parents_
Definition: emhorizon3d.h:277
Position.
Definition: commontypes.h:42
int queueid_
Definition: emhorizon3d.h:276
Scaling of floating point numbers.
Definition: scaler.h:33
Threads::WorkManager & twm_
Definition: emhorizon3d.h:275
Array2D< char > * lockednodes_
Definition: emhorizon3d.h:233
void fillPar(IOPar &iop, const ODPolygon< T > &poly, const char *inpkey)
Definition: polygon.h:175
A cartesian coordinate in 3D space.
Definition: coord.h:72
Threads::Lock finishlock_
Definition: emhorizon3d.h:285
Pos::GeomID getSurveyGeomID() const
Definition: emhorizon3d.h:164
Threads::Atomic< int > nrdone_
Definition: emhorizon3d.h:282
Index_Type GeomID
Definition: commontypes.h:52
uiString getUserTypeStr() const
Definition: emhorizon3d.h:169
IdxPair used for its row() and col().
Definition: rowcol.h:25
Definition: binidsurface.h:27
Positioning in a seismic survey: inline/crossline or lineNr/trcNr.
Definition: binid.h:30
Definition: emhorizon3d.h:207
Horizon3DGeometry geometry_
Definition: emhorizon3d.h:230
Base class for all EarthModel objects.
Definition: emobject.h:158
bool arrayinited_
Definition: emhorizon3d.h:244
static uiString userTypeStr()
Definition: emhorizon3d.h:170
Definition: picklocation.h:21
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
A Pos::IdxPairValueSet with BinIDs.
Definition: binidvalset.h:23
3D HorizonGeometry
Definition: emhorizon3d.h:40
NodeSourceType
Definition: emobject.h:163
Color is an RGB color object, with a transparancy. The storage is in a 4-byte integer, similar to Qt.
Definition: color.h:26
TrcKeySampling tks_
Definition: emhorizon3d.h:279
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
Color parentcolor_
Definition: emhorizon3d.h:237
SurfaceAuxData & auxdata
Definition: emhorizon3d.h:174
Base class for z-axis transforms.
Definition: zaxistransform.h:37
IOObjContext * getIOObjContext(Seis::GeomType, bool forread)
Horizon Surface.
Definition: emhorizon.h:47
Specification to enable chunkwise execution of a process.
Definition: executor.h:39
Holds the context for selecting and/or creating IOObjs.
Definition: ctxtioobj.h:62

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