OpendTect-6_4  6.4
horizontracker.h
Go to the documentation of this file.
1 #ifndef horizontracker_h
2 #define horizontracker_h
3 
4 /*+
5 ________________________________________________________________________
6 
7  (C) dGB Beheer B.V.; (LICENSE) http://opendtect.org/OpendTect_license.txt
8  Author: N. Hemstra
9  Date: March 2005
10  RCS: $Id$
11 ________________________________________________________________________
12 
13 -*/
14 
15 #include "task.h"
16 #include "thread.h"
17 #include "emposid.h"
18 #include "refcount.h"
19 #include "rowcol.h"
20 
21 namespace EM {
22  class Fault;
23  class Horizon;
24  class Horizon2D;
25  class Horizon3D;
26 }
27 
28 template <class T> class Array2DImpl;
29 
30 namespace Survey { class Geometry3D; }
31 class SeisTrc;
32 
33 
34 
35 namespace MPE
36 {
37 
43 {
44 public:
47 
48  void set3DSurvGeom(const Survey::Geometry3D&);
49 
50  bool init();
51 
52  const ObjectSet<EM::Fault>& getFaults() const { return faults_; }
53  void addFault(EM::Fault&);
54  void removeFault(EM::Fault&);
55 
56  int doStep();
57 
58  void fillPar(IOPar&) const;
59  bool usePar(const IOPar&);
60 
61  const char* errMsg() const { return errmsg_.str(); }
62  const EM::Horizon& horizon() const { return horizon_; }
63 
64  static FixedString sNrHorizons() { return "Nr Horizons"; }
65  static FixedString sKeyHorizonID() { return "Horizon ID"; }
66 
67  struct TrackTarget
68  {
69  friend class HorizonAutoTrackerTask;
71  void reset();
72 
73  static unsigned char getSourceMask(EM::SubID from,EM::SubID to);
74  static unsigned char cSourcePP() { return 1; }
75  static unsigned char cSourcePS() { return 2; }
76  static unsigned char cSourcePN() { return 4; }
77  static unsigned char cSourceSP() { return 8; }
78  static unsigned char cSourceSN() { return 16; }
79  static unsigned char cSourceNP() { return 32; }
80  static unsigned char cSourceNS() { return 64; }
81  static unsigned char cSourceNN() { return 128; }
82 
83  void computeProposal();
84 
86 
87  float score_;
88  float proposedz_;
89  unsigned char sources_;
90 
92 
93  bool istarget_;
95  bool isvalid_;
96  };
97 
98 
99 protected:
100  void removeAll();
101 
102  RowCol getArrayPos(const EM::PosID&) const;
103 
104 
105  float getInterpolZ(const EM::PosID&) const;
106  void computeScores();
109  /*Returns index (to array) if target should
110  be computed*/
111  void getSources(const EM::PosID&,
112  TypeSet<EM::PosID>&) const;
113 
114  const SeisTrc* getTrace(EM::SubID) const;
115  //Waits until it is loaded
116  void requestTrace(EM::SubID);
117  //Tell that you want it to be loaded
118 
120 
124 
126 
127  /* For 2D, there is one row in the arrays per line in the survey, and one
128  column per trace, using the step of the horizon.
129  For 3D, there is one row per inline in the survey, and one column per
130  trace, both with the step of the horizon. */
131 
133 
135 
139 
142 
144 
145 };
146 
147 } // namespace MPE
148 
149 #endif
od_int16 SectionID
Definition: emposid.h:25
#define mExpClass(module)
Definition: commondefs.h:160
EM::Horizon & horizon_
Definition: horizontracker.h:123
static unsigned char cSourceNP()
Definition: horizontracker.h:79
static unsigned char cSourceNN()
Definition: horizontracker.h:81
void requestTrace(EM::SubID)
PtrMan< Array2DImpl< bool > > tracewanted_
Definition: horizontracker.h:138
void fillPar(IOPar &) const
static FixedString sKeyHorizonID()
Definition: horizontracker.h:65
static unsigned char cSourcePP()
Definition: horizontracker.h:74
const char * str() const
Definition: odstring.h:48
T to(const F &fr)
Definition: convert.h:33
static FixedString sNrHorizons()
Definition: horizontracker.h:64
Fault Surface base class.
Definition: emfault.h:84
PtrMan< Array2DImpl< PtrMan< SeisTrc > > > diptrcs_
Definition: horizontracker.h:137
Is an identifier for each position in the earthmodel.
Definition: emposid.h:37
PtrMan< Array2DImpl< TrackTarget > > targetarray_
Definition: horizontracker.h:132
OD::String that holds an existing text string.
Definition: fixedstring.h:29
MPE stands for Model, Predict, Edit. Contains tracking and editing functions.
Definition: autotracker.h:32
EM::Horizon3D * hor3d_
Definition: horizontracker.h:122
unsigned char sources_
Definition: horizontracker.h:89
void set3DSurvGeom(const Survey::Geometry3D &)
bool init()
RowCol arrayorigin_
Definition: horizontracker.h:140
Implementation of Array2D.
Definition: arrayndimpl.h:102
int addPossibleTarget(EM::SectionID, EM::SubID)
void addSeed(EM::SectionID, EM::SubID)
RowCol step_
Definition: horizontracker.h:141
const ObjectSet< EM::Fault > & getFaults() const
Definition: horizontracker.h:52
RowCol getArrayPos(const EM::PosID &) const
PtrMan< Array2DImpl< PtrMan< SeisTrc > > > trcs_
Definition: horizontracker.h:136
od_int64 SubID
Definition: emposid.h:26
Set of pointers to objects.
Definition: commontypes.h:32
void getSources(const EM::PosID &, TypeSet< EM::PosID > &) const
2D Horizon. The Horizon is only present along 2d lines, set by addLine. Each position&#39;s subid is form...
Definition: emhorizon2d.h:108
The generalization of something (e.g. a computation) where the steps must be done in sequence...
Definition: task.h:124
void removeAll()
Definition: ptrman.h:79
bool usePar(const IOPar &)
Generalized set of parameters of the keyword-value type.
Definition: iopar.h:47
static unsigned char cSourceSP()
Definition: horizontracker.h:77
RefMan< Survey::Geometry3D > s3dgeom_
Definition: horizontracker.h:143
float score_
Definition: horizontracker.h:87
ObjectSet< EM::Fault > faults_
Definition: horizontracker.h:125
bool isvalid_
Definition: horizontracker.h:95
float proposedz_
Definition: horizontracker.h:88
FixedString Horizon()
Definition: keystrs.h:72
PtrMan< Array2DImpl< unsigned char > > history_
Definition: horizontracker.h:134
static unsigned char cSourceNS()
Definition: horizontracker.h:80
const EM::Horizon & horizon() const
Definition: horizontracker.h:62
void removeFault(EM::Fault &)
EM::Horizon2D * hor2d_
Definition: horizontracker.h:121
FixedString Fault()
Definition: keystrs.h:65
IdxPair used for its row() and col().
Definition: rowcol.h:25
float getInterpolZ(const EM::PosID &) const
OD::String with its own variable length buffer. The buffer has a guaranteed minimum size...
Definition: bufstring.h:40
Scaled down survey geometry for an inl/crl geometry.
Definition: survgeom3d.h:28
Seismic trace.
Definition: seistrc.h:34
BufferString errmsg_
Definition: horizontracker.h:119
Definition: horizontracker.h:67
EM::PosID pid_
Definition: horizontracker.h:85
Earth Model objects like horizons, faults, fault-sticks and bodies.
Definition: embody.h:25
static unsigned char cSourceSN()
Definition: horizontracker.h:78
int doStep()
HorizonAutoTracker * tracker_
Definition: horizontracker.h:91
bool istarget_
Definition: horizontracker.h:93
Definition: survgeom.h:25
void addFault(EM::Fault &)
const char * errMsg() const
Definition: horizontracker.h:61
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
mExpClass HorizonAutoTracker
SequentialTask to autotrack EM::Horizon.
Definition: horizontracker.h:45
~HorizonAutoTracker()
static unsigned char cSourcePS()
Definition: horizontracker.h:75
void computeScores()
const SeisTrc * getTrace(EM::SubID) const
bool needsrecalc_
Definition: horizontracker.h:94
Horizon Surface.
Definition: emhorizon.h:47
Definition: ptrman.h:168
static unsigned char cSourcePN()
Definition: horizontracker.h:76

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