OpendTect  6.3
emseedpicker.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: A.H. Bril
8  Date: 23-10-1996
9  Contents: Ranges
10 ________________________________________________________________________
11 
12 -*/
13 
14 #include "mpeenginemod.h"
15 #include "attribsel.h"
16 #include "emposid.h"
17 #include "position.h"
18 #include "trckeysampling.h"
19 #include "trckeyvalue.h"
20 #include "uistring.h"
21 #include "undo.h"
22 
23 
24 namespace MPE
25 {
26 
27 class EMTracker;
28 class EMSeedPicker;
29 mExpClass(MPEEngine) Patch : public RefCount::Referenced
30 {
31 public:
32  Patch(const EMSeedPicker*);
33  const TypeSet<TrcKeyValue>& getPath() const;
34  void getTrcKeySampling(TrcKeySampling&) const;
35  int nrSeeds();
36  Coord3 seedCoord(int) const;
37  int addSeed(const TrcKeyValue&,bool sort=true);
38  void removeSeed(int);
39  void clear();
40 
41 protected:
42  ~Patch();
43  EM::PosID seedNode(int) const;
44  int findClosestSeedRdmIdx(const EM::PosID&);
45  int findClosedSeed3d(const EM::PosID&);
46  int findClosedSeed2d(const TrcKeyValue&);
48 private:
50 };
56 mExpClass(MPEEngine) EMSeedPicker: public CallBacker
58 public:
59  virtual ~EMSeedPicker();
60 
61 
62  virtual void setSectionID(EM::SectionID);
63  virtual EM::SectionID getSectionID() const;
64 
65  virtual bool startSeedPick();
68  const Patch* getPatch() const { return patch_; }
69  virtual void endPatch(bool);
70  bool stopSeedPick();
71 
72  void addSeedToPatch(const TrcKeyValue&,bool sort=true);
73  bool addSeed(const TrcKeyValue&,bool drop=false);
74  virtual bool addSeed(const TrcKeyValue& seedcrd,bool drop,
75  const TrcKeyValue& seedkey) { return false;}
76  TrcKeyValue getAddedSeed() const;
77  void getSeeds(TypeSet<TrcKey>&) const;
78  int indexOf(const TrcKey&) const;
79 
80  virtual bool removeSeed(const TrcKey&,
81  bool enviromment=true,
82  bool retrack=true) { return false;}
83  virtual TrcKey replaceSeed(const TrcKey&,const TrcKeyValue&)
84  { return TrcKey::udf(); }
85 
86  virtual void setSelSpec(const Attrib::SelSpec*);
87  virtual const Attrib::SelSpec* getSelSpec() const;
88  virtual bool reTrack() { return false;}
89  virtual int nrSeeds() const;
90 
91  void blockSeedPick(bool);
92  bool isSeedPickBlocked() const;
93  void setSowerMode(bool);
94  bool getSowerMode() const;
95 
96  enum TrackMode { TrackFromSeeds, TrackBetweenSeeds,
97  DrawAndSnap, DrawBetweenSeeds };
98 
99  void setTrackMode(TrackMode);
100  TrackMode getTrackMode() const;
101  bool doesModeUseVolume() const { return false;}
102 
103  virtual const uiString& errMsg() const { return uiString::emptyString(); }
104 
105 
106  void setSeedPickArea(const TrcKeySampling&);
107  const TrcKeySampling& getSeedPickArea() const;
108  EMTracker& emTracker() const { return tracker_; }
109  bool lineTrackDirection( BinID& dir,
110  bool perptotrackdir = false ) const;
111  virtual bool updatePatchLine(bool) { return false; }
112  Undo& horPatchUndo();
113  const Undo& horPatchUndo() const;
114  bool canUndo();
115  bool canReDo();
116 
117 
121 
122 protected:
124 
127 
131 
137 
146 
147 };
148 
149 } // namespace MPE
od_int16 SectionID
Definition: emposid.h:23
#define mExpClass(module)
Definition: commondefs.h:157
Definition: trckeyvalue.h:25
Notifier< EMSeedPicker > seedRemoved
Definition: emseedpicker.h:119
TypeSet< TrcKey > junctions_
Definition: emseedpicker.h:135
const Patch * getPatch() const
Definition: emseedpicker.h:68
Inherit from this class to be able to send and/or receive CallBacks.
Definition: callback.h:182
const EMSeedPicker * seedpicker_
Definition: emseedpicker.h:47
TypeSet< TrcKey > trackbounds_
Definition: emseedpicker.h:134
#define mODTextTranslationClass(clss)
Definition: uistring.h:37
bool sowermode_
Definition: emseedpicker.h:143
Is an identifier for each position in the earthmodel.
Definition: emposid.h:35
bool doesModeUseVolume() const
Definition: emseedpicker.h:101
EMTracker & tracker_
Definition: emseedpicker.h:125
MPE stands for Model, Predict, Edit. Contains tracking and editing functions.
Definition: autotracker.h:30
virtual bool addSeed(const TrcKeyValue &seedcrd, bool drop, const TrcKeyValue &seedkey)
Definition: emseedpicker.h:74
void clear(std::ios &)
void addSeed(EM::SectionID, EM::SubID)
static const uiString & emptyString()
Definition: uistring.h:107
EMTracker & emTracker() const
Definition: emseedpicker.h:108
Tracks EM objects.
Definition: emtracker.h:38
Handles adding of seeds and retracking of events based on new seeds. An instance of the class is usua...
Definition: emseedpicker.h:56
TypeSet< TrcKey > propagatelist_
Definition: emseedpicker.h:132
Definition: uistring.h:88
Notifier< EMSeedPicker > seedToBeAddedRemoved
Definition: emseedpicker.h:120
Attrib::SelSpec selspec_
Definition: emseedpicker.h:126
ObjectSet< T >::size_type indexOf(const ObjectSet< T > &os, const S &val)
Locate object in set.
Definition: objectset.h:173
Notifier< EMSeedPicker > seedAdded
Definition: emseedpicker.h:118
bool didchecksupport_
Definition: emseedpicker.h:139
TypeSet< TrcKey > seedlist_
Definition: emseedpicker.h:133
Class to handle undo/redo information.
Definition: undo.h:40
Class to help setup a callback handling.
Definition: notify.h:121
3D point or vector
Definition: commontypes.h:57
Horizontal sampling (inline and crossline range and steps).
Definition: trckeysampling.h:25
Definition: emseedpicker.h:29
bool blockpicking_
Definition: emseedpicker.h:138
Undo & patchundo_
Definition: emseedpicker.h:145
TypeSet< TrcKeyValue > seeds_
Definition: emseedpicker.h:49
virtual TrcKey replaceSeed(const TrcKey &, const TrcKeyValue &)
Definition: emseedpicker.h:83
TrackMode
Definition: emseedpicker.h:96
virtual const uiString & errMsg() const
Definition: emseedpicker.h:103
TrcKeySampling seedpickarea_
Definition: emseedpicker.h:142
void sort(ObjectSet< T > &os)
Sort ObjectSet. Must have operator > defined for elements.
Definition: objectset.h:224
static const TrcKey & udf()
Positioning in a seismic survey: inline/crossline or lineNr/trcNr.
Definition: binid.h:28
TrcKeyValue lastsowseed_
Definition: emseedpicker.h:130
virtual bool removeSeed(const TrcKey &, bool enviromment=true, bool retrack=true)
Definition: emseedpicker.h:80
virtual bool reTrack()
Definition: emseedpicker.h:88
TypeSet< TrcKey > eraselist_
Definition: emseedpicker.h:136
Specifies an attribute selection (ID or output number of NN).
Definition: attribsel.h:43
Represents a unique trace position in one of the surveys that OpendTect is managing.
Definition: trckey.h:26
Patch * patch_
Definition: emseedpicker.h:144
virtual bool updatePatchLine(bool)
Definition: emseedpicker.h:111
TrackMode trackmode_
Definition: emseedpicker.h:141
TrcKeyValue addedseed_
Definition: emseedpicker.h:128
TrcKeyValue lastseed_
Definition: emseedpicker.h:129
EM::SectionID sectionid_
Definition: emseedpicker.h:140

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