OpendTect-6_4  6.4
emseedpicker.h
Go to the documentation of this file.
1 #ifndef emseedpicker_h
2 #define emseedpicker_h
3 
4 /*+
5 ________________________________________________________________________
6 
7  (C) dGB Beheer B.V.; (LICENSE) http://opendtect.org/OpendTect_license.txt
8  Author: A.H. Bril
9  Date: 23-10-1996
10  Contents: Ranges
11  RCS: $Id$
12 ________________________________________________________________________
13 
14 -*/
15 
16 #include "mpeenginemod.h"
17 #include "callback.h"
18 
19 #include "attribsel.h"
20 #include "emposid.h"
21 #include "position.h"
22 #include "sets.h"
23 #include "trckeysampling.h"
24 #include "trckeyvalue.h"
25 #include "uistring.h"
26 #include "undo.h"
27 
28 
29 namespace MPE
30 {
31 
32 class EMTracker;
33 class EMSeedPicker;
34 mExpClass(MPEEngine) Patch
35 { mRefCountImpl(Patch);
36 public:
37  Patch(const EMSeedPicker*);
38  const TypeSet<TrcKeyValue>& getPath() const;
39  void getTrcKeySampling(TrcKeySampling&) const;
40  int nrSeeds();
41  Coord3 seedCoord(int) const;
42  int addSeed(const TrcKeyValue&,bool sort);
43  int addSeed(const TrcKeyValue&);
45  void removeSeed(int);
46  void clear();
47 
48 protected:
49  EM::PosID seedNode(int) const;
50  int findClosedSeed3d(const EM::PosID&);
51  int findClosedSeed2d(const TrcKeyValue&);
53 private:
55 protected:
56  int findClosestSeedRdmIdx(const EM::PosID&);
57 };
63 mExpClass(MPEEngine) EMSeedPicker: public CallBacker
65 public:
66  virtual ~EMSeedPicker();
67 
68 
69  virtual void setSectionID(EM::SectionID);
70  virtual EM::SectionID getSectionID() const;
71 
72  virtual bool startSeedPick();
75  const Patch* getPatch() const { return patch_; }
76  virtual void endPatch(bool);
77  bool stopSeedPick();
78 
79  void addSeedToPatch(const TrcKeyValue&,bool sort);
80  void addSeedToPatch(const TrcKeyValue&);
83  bool addSeed(const TrcKeyValue&,bool drop=false);
84  virtual bool addSeed(const TrcKeyValue& seedcrd,bool drop,
85  const TrcKeyValue& seedkey) { return false;}
86  TrcKeyValue getAddedSeed() const;
87  void getSeeds(TypeSet<TrcKey>&) const;
88  int indexOf(const TrcKey&) const;
89 
90  virtual bool removeSeed(const TrcKey&,
91  bool enviromment=true,
92  bool retrack=true) { return false;}
93  virtual TrcKey replaceSeed(const TrcKey&,const TrcKeyValue&)
94  { return TrcKey::udf(); }
95 
96  virtual void setSelSpec(const Attrib::SelSpec*);
97  virtual const Attrib::SelSpec* getSelSpec() const;
98  virtual bool reTrack() { return false;}
99  virtual int nrSeeds() const;
100 
101  void blockSeedPick(bool);
102  bool isSeedPickBlocked() const;
103  void setSowerMode(bool);
104  bool getSowerMode() const;
105 
106  enum TrackMode { TrackFromSeeds, TrackBetweenSeeds,
107  DrawAndSnap, DrawBetweenSeeds };
108 
109  void setTrackMode(TrackMode);
110  TrackMode getTrackMode() const;
111  bool doesModeUseVolume() const { return false;}
112 
113  virtual const char* errMsg() const { return 0; }
114 
115 
116  void setSeedPickArea(const TrcKeySampling&);
117  const TrcKeySampling& getSeedPickArea() const;
118  EMTracker& emTracker() const { return tracker_; }
119  bool lineTrackDirection( BinID& dir,
120  bool perptotrackdir = false ) const;
121  virtual bool updatePatchLine(bool) { return false; }
122  Undo& horPatchUndo();
123  const Undo& horPatchUndo() const;
124  bool canUndo();
125  bool canReDo();
126 
127 
131 
132 protected:
134 
137 
141 
147 
156 
157 };
158 
159 } // namespace MPE
160 
161 #endif
#define mRefCountImpl(ClassName)
Macro to setup a class with destructor for reference counting.
Definition: refcount.h:163
od_int16 SectionID
Definition: emposid.h:25
#define mExpClass(module)
Definition: commondefs.h:160
Definition: trckeyvalue.h:27
Notifier< EMSeedPicker > seedRemoved
Definition: emseedpicker.h:129
TypeSet< TrcKey > junctions_
Definition: emseedpicker.h:145
const Patch * getPatch() const
Definition: emseedpicker.h:75
To be able to send and/or receive CallBacks, inherit from this class.
Definition: callback.h:272
const EMSeedPicker * seedpicker_
Definition: emseedpicker.h:52
TypeSet< TrcKey > trackbounds_
Definition: emseedpicker.h:144
#define mODTextTranslationClass(clss)
Definition: uistring.h:38
bool sowermode_
Definition: emseedpicker.h:153
Is an identifier for each position in the earthmodel.
Definition: emposid.h:37
bool doesModeUseVolume() const
Definition: emseedpicker.h:111
EMTracker & tracker_
Definition: emseedpicker.h:135
MPE stands for Model, Predict, Edit. Contains tracking and editing functions.
Definition: autotracker.h:32
virtual bool addSeed(const TrcKeyValue &seedcrd, bool drop, const TrcKeyValue &seedkey)
Definition: emseedpicker.h:84
void clear(std::ios &)
void addSeed(EM::SectionID, EM::SubID)
EMTracker & emTracker() const
Definition: emseedpicker.h:118
Tracks EM objects.
Definition: emtracker.h:40
Handles adding of seeds and retracking of events based on new seeds. An instance of the class is usua...
Definition: emseedpicker.h:63
TypeSet< TrcKey > propagatelist_
Definition: emseedpicker.h:142
Notifier< EMSeedPicker > seedToBeAddedRemoved
Definition: emseedpicker.h:130
Attrib::SelSpec selspec_
Definition: emseedpicker.h:136
ObjectSet< T >::size_type indexOf(const ObjectSet< T > &os, const S &val)
Locate object in set.
Definition: objectset.h:169
Notifier< EMSeedPicker > seedAdded
Definition: emseedpicker.h:128
bool didchecksupport_
Definition: emseedpicker.h:149
TypeSet< TrcKey > seedlist_
Definition: emseedpicker.h:143
Class to handle undo/redo information.
Definition: undo.h:42
Definition: callback.h:254
Horizontal sampling (inline and crossline range and steps).
Definition: trckeysampling.h:27
Definition: emseedpicker.h:34
bool blockpicking_
Definition: emseedpicker.h:148
Undo & patchundo_
Definition: emseedpicker.h:155
TypeSet< TrcKeyValue > seeds_
Definition: emseedpicker.h:54
virtual const char * errMsg() const
Definition: emseedpicker.h:113
virtual TrcKey replaceSeed(const TrcKey &, const TrcKeyValue &)
Definition: emseedpicker.h:93
TrackMode
Definition: emseedpicker.h:106
A cartesian coordinate in 3D space.
Definition: coord.h:72
TrcKeySampling seedpickarea_
Definition: emseedpicker.h:152
void sort(ObjectSet< T > &os)
Sort ObjectSet. Must have operator > defined for elements.
Definition: objectset.h:220
static const TrcKey & udf()
Positioning in a seismic survey: inline/crossline or lineNr/trcNr.
Definition: binid.h:30
TrcKeyValue lastsowseed_
Definition: emseedpicker.h:140
virtual bool removeSeed(const TrcKey &, bool enviromment=true, bool retrack=true)
Definition: emseedpicker.h:90
virtual bool reTrack()
Definition: emseedpicker.h:98
TypeSet< TrcKey > eraselist_
Definition: emseedpicker.h:146
Specifies an attribute selection (ID or output number of NN).
Definition: attribsel.h:45
Represents a unique trace position in one of the surveys that OpendTect is managing.
Definition: trckey.h:28
Patch * patch_
Definition: emseedpicker.h:154
virtual bool updatePatchLine(bool)
Definition: emseedpicker.h:121
TrackMode trackmode_
Definition: emseedpicker.h:151
TrcKeyValue addedseed_
Definition: emseedpicker.h:138
TrcKeyValue lastseed_
Definition: emseedpicker.h:139
EM::SectionID sectionid_
Definition: emseedpicker.h:150

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