OpendTect  6.3
prestackevents.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: K. Tingdahl
8  Date: March 2007
9 ________________________________________________________________________
10 
11 
12 -*/
13 
14 #include "prestackprocessingmod.h"
15 #include "prestackprocessingmod.h"
16 #include "bufstringset.h"
17 #include "callback.h"
18 #include "color.h"
19 #include "dbkey.h"
20 #include "threadlock.h"
21 #include "multidimstorage.h"
22 #include "offsetazimuth.h"
23 #include "position.h"
24 #include "refcount.h"
25 #include "undo.h"
26 #include "valseriesevent.h"
27 
28 class Executor;
29 class BinIDValueSet;
30 class OffsetAzimuth;
31 class TrcKeySampling;
32 
33 namespace EM { class Horizon3D; }
34 namespace Seis { class Provider; }
35 
36 namespace PreStack
37 {
38 
39 class CDPGeometrySet;
40 class GatherEvents;
41 class VelocityPicks;
42 
47 mExpClass(PreStackProcessing) Event
48 {
49 public:
50  Event(int sz,bool quality);
51  Event(const Event& b);
52  ~Event();
53  Event& operator=(const Event&);
54  void setSize(int sz,bool quality);
55  void removePick(int);
56  void addPick();
57  void insertPick(int);
58  int indexOf(const OffsetAzimuth&) const;
59 
60  int sz_;
61  float* pick_;
63 
64  static unsigned char cBestQuality() { return 254; }
65  static unsigned char cManPickQuality() { return 255; }
66  static unsigned char cDefaultQuality() { return 0; }
67  unsigned char* pickquality_;
68  //255 = manually picked
69  //0-254 = tracked
70 
71  unsigned char quality_;
72  short horid_;
74 };
75 
76 
81 mExpClass(PreStackProcessing) EventSet : public RefCount::Referenced
82 {
83 public:
84  EventSet();
85  EventSet(const EventSet&);
86  EventSet& operator=(const EventSet&);
87 
88  int indexOf(int horid) const;
89 
91  bool ischanged_;
92 protected:
93  ~EventSet();
94 };
95 
96 
102 mExpClass(PreStackProcessing) EventManager : public RefCount::Referenced
103  , public CallBacker
104 {
105  ~EventManager();
106 public:
107  mStruct(PreStackProcessing) DipSource
108  {
109  DipSource();
110  enum Type { None, Horizon, SteeringVolume };
112 
113  bool operator==(const DipSource& b) const;
114 
115  Type type_;
116  DBKey mid_;
117 
118  void fill(BufferString&) const;
119  bool use(const char*);
120  };
121  EventManager();
122 
123  const TypeSet<int>& getHorizonIDs() const { return horids_; }
124  int addHorizon(int id=-1);
128  bool removeHorizon(int id);
129  const DBKey& horizonEMReference(int id) const;
130  void setHorizonEMReference(int id,const DBKey&);
131  int nextHorizonID(bool usethis);
132  void setNextHorizonID(int);
133 
134  const Color& getColor() const { return color_; }
135  void setColor(const Color&);
136 
137  void setDipSource(const DipSource&,bool primary);
138  const DipSource& getDipSource(bool primary) const;
139 
140  Executor* setStorageID(const DBKey& mid,
141  bool reload );
151  const DBKey& getStorageID() const;
152 
153  bool getHorRanges(TrcKeySampling&) const;
154  bool getLocations(BinIDValueSet&) const;
155 
156  Undo& undo() { return undo_; }
157  const Undo& undo() const { return undo_; }
158 
159 
160  Executor* commitChanges();
161  Executor* load(const BinIDValueSet&,bool trigger);
162 
163  bool isChanged() const;
164  void resetChangedFlag(bool onlyhorflag);
167 
168  EventSet* getEvents(const BinID&,bool load,bool create);
169  const EventSet* getEvents(const BinID&,
170  bool load=false,bool create=false) const;
171 
172  void cleanUp(bool keepchanged);
173 
174  MultiDimStorage<EventSet*>& getStorage() { return events_; }
175 
179  const BinID& changeBid() const { return changebid_;}
182  void blockChange(bool yn,bool sendall);
194  void addReloadPositions(
195  const BinIDValueSet&);
196  void addReloadPosition(const BinID&);
197 
198  void reportChange(const BinID&);
199 
200  void fillPar(IOPar&) const;
201  bool usePar(const IOPar&);
202 
203 
204  bool getDip(const BinIDValue&,int horid,
205  float& inldip, float& crldip );
206 
207 protected:
208 
209  static const char* sKeyStorageID() { return "PS Picks"; }
210  bool getDip(const BinIDValue&,int horid,
211  bool primary,
212  float& inldip, float& crldip );
213 
217  VelocityPicks* velpicks_;
218 
220 
224 
229 
232 
233  DipSource primarydipsource_;
235 
238 
241 };
242 
243 
248 mExpClass(PreStackProcessing) SetPickUndo : public BinIDUndoEvent
249 {
250 public:
251  SetPickUndo(EventManager&,const BinID&,int horidx,
252  const OffsetAzimuth&,float depth,
253  unsigned char pickquality);
254  const char* getStandardDesc() const { return "prestack pick"; }
255  const BinID& getBinID() const { return bid_; }
256 
257  bool unDo();
258  bool reDo();
259 
260 protected:
261 
262  bool doWork( float, unsigned char );
263 
265  const BinID bid_;
266  const int horidx_;
268  const float olddepth_;
269  const unsigned char oldquality_;
270  float newdepth_;
271  unsigned char newquality_;
272 };
273 
274 
279 mExpClass(PreStackProcessing) SetEventUndo : public UndoEvent
280 {
281 public:
282  SetEventUndo(EventManager&,const BinID&,int horidx,
283  short horid,VSEvent::Type,
284  unsigned char pickquality);
285  SetEventUndo(EventManager&,const BinID&,int horidx);
286  const char* getStandardDesc() const { return "prestack pick"; }
287  const BinID& getBinID() const { return bid_; }
288 
289  bool unDo();
290  bool reDo();
291 
292 protected:
293 
294  bool addEvent();
295  bool removeEvent();
296 
298  const BinID bid_;
299  const int horidx_;
300 
301  unsigned char quality_;
302  short horid_;
304 
305  bool isremove_;
306 };
307 
308 
309 }; //namespace
#define mExpClass(module)
Definition: commondefs.h:157
Seis::Provider * secondarydipprovider_
Definition: prestackevents.h:237
const BinID bid_
Definition: prestackevents.h:265
MultiDimStorage< EventSet * > events_
Definition: prestackevents.h:214
Seismics.
Definition: segydirectdef.h:20
Inherit from this class to be able to send and/or receive CallBacks.
Definition: callback.h:182
const int horidx_
Definition: prestackevents.h:299
static unsigned char cBestQuality()
Definition: prestackevents.h:64
BinID UndoEvent.
Definition: undo.h:130
Definition: multidimstorage.h:23
BinIDUndoEvent for PreStack pick.
Definition: prestackevents.h:248
A lock of a type that (hopefully) suits your needs. To use it, you need the Locker class...
Definition: threadlock.h:51
bool operator==(const ArrayNDInfo &a1, const ArrayNDInfo &a2)
Definition: arrayndinfo.h:51
bool isremove_
Definition: prestackevents.h:305
uiString errmsg_
Definition: prestackevents.h:240
Threads::Lock eventlock_
Definition: prestackevents.h:215
is the access point for seismic traces. Instantiate a subclass and ask for what you need...
Definition: seisprovider.h:54
static const char * sKeyStorageID()
Definition: prestackevents.h:209
#define mStruct(module)
Definition: commondefs.h:162
TypeSet< int > horids_
Definition: prestackevents.h:221
void usePar(const IOPar &iop, ODPolygon< T > &poly, const char *inpkey)
Definition: polygon.h:200
const BinID & getBinID() const
Definition: prestackevents.h:255
DBKeySet horrefs_
Definition: prestackevents.h:222
Definition: prestackagc.h:18
Definition: dbkey.h:98
const Color & getColor() const
Definition: prestackevents.h:134
short horid_
Definition: prestackevents.h:302
MultiDimStorage< EventSet * > & getStorage()
Definition: prestackevents.h:174
int auxdatachanged_
Definition: prestackevents.h:231
Definition: uistring.h:88
Notifier< EventManager > resetChangeStatus
Triggers when the chang flags are reseted.
Definition: prestackevents.h:165
ObjectSet< T >::size_type indexOf(const ObjectSet< T > &os, const S &val)
Locate object in set.
Definition: objectset.h:173
VSEvent::Type eventtype_
Definition: prestackevents.h:303
#define mDeclareEnumUtils(enm)
Some utilities surrounding the often needed enum <-> string table.
Definition: enums.h:188
const Undo & undo() const
Definition: prestackevents.h:157
FixedString None()
Definition: keystrs.h:90
unsigned char quality_
Definition: prestackevents.h:71
const BinID & changeBid() const
Definition: prestackevents.h:179
EventManager & manager_
Definition: prestackevents.h:264
Class to handle undo/redo information.
Definition: undo.h:40
Class to help setup a callback handling.
Definition: notify.h:121
float * pick_
Definition: prestackevents.h:61
Set of pointers to objects.
Definition: commontypes.h:28
unsigned char quality_
Definition: prestackevents.h:301
static unsigned char cDefaultQuality()
Definition: prestackevents.h:66
Undo undo_
Definition: prestackevents.h:239
FixedString Provider()
Definition: keystrs.h:103
const unsigned char oldquality_
Definition: prestackevents.h:269
DBKey storageid_
Definition: prestackevents.h:216
Generalized set of parameters of the keyword-value type.
Definition: iopar.h:53
DipSource secondarydipsource_
Definition: prestackevents.h:234
Seis::Provider * primarydipprovider_
Definition: prestackevents.h:236
A EventSet is a set of Events on a single PreStack gather.
Definition: prestackevents.h:81
Horizontal sampling (inline and crossline range and steps).
Definition: trckeysampling.h:25
Undo & undo()
Definition: prestackevents.h:156
short horid_
Definition: prestackevents.h:72
FixedString Horizon()
Definition: keystrs.h:70
BinID and a value.
Definition: binidvalue.h:29
int nexthorid_
Definition: prestackevents.h:230
Color color_
Definition: prestackevents.h:219
Holds the information on how to undo/redo something.
Definition: undo.h:104
DipSource primarydipsource_
Definition: prestackevents.h:233
bool ischanged_
Definition: prestackevents.h:91
void fillPar(IOPar &iop, const ODPolygon< T > &poly, const char *inpkey)
Definition: polygon.h:187
VelocityPicks * velpicks_
Definition: prestackevents.h:217
Type
Definition: angles.h:25
const char * getStandardDesc() const
Definition: prestackevents.h:254
const BinID & getBinID() const
Definition: prestackevents.h:287
Notifier< EventManager > forceReload
Definition: prestackevents.h:189
OD::String with its own variable length buffer. The buffer has a guaranteed minimum size...
Definition: bufstring.h:38
const BinID bid_
Definition: prestackevents.h:298
BinIDValueSet * reloadbids_
Definition: prestackevents.h:228
static uiHor3DInterpol * create(uiParent *)
Positioning in a seismic survey: inline/crossline or lineNr/trcNr.
Definition: binid.h:28
Notifier< EventManager > change
Definition: prestackevents.h:176
unsigned char newquality_
Definition: prestackevents.h:271
UndoEvent for PreStack pick.
Definition: prestackevents.h:279
ObjectSet< EM::Horizon3D > emhorizons_
Definition: prestackevents.h:223
const OffsetAzimuth oa_
Definition: prestackevents.h:267
EventManager & manager_
Definition: prestackevents.h:297
const float olddepth_
Definition: prestackevents.h:268
BinID changebid_
Definition: prestackevents.h:225
Earth Model objects like horizons, faults, fault-sticks and bodies.
Definition: embody.h:23
A Pos::IdxPairValueSet with BinIDs.
Definition: binidvalset.h:21
BinIDValueSet * notificationqueue_
Definition: prestackevents.h:227
const TypeSet< int > & getHorizonIDs() const
Definition: prestackevents.h:123
Color is an RGB color object, with a transparancy. The storage is in a 4-byte integer, similar to Qt.
Definition: color.h:24
OffsetAzimuth * offsetazimuth_
Definition: prestackevents.h:62
Full key to any object in the OpendTect data store.
Definition: dbkey.h:36
unsigned char * pickquality_
Definition: prestackevents.h:67
float newdepth_
Definition: prestackevents.h:270
const char * getStandardDesc() const
Definition: prestackevents.h:286
Definition: offsetazimuth.h:24
static unsigned char cManPickQuality()
Definition: prestackevents.h:65
ObjectSet< Event > events_
Definition: prestackevents.h:90
A Event is a set of picks on an event on a single PreStack gather.
Definition: prestackevents.h:47
Type
Definition: valseriesevent.h:24
VSEvent::Type eventtype_
Definition: prestackevents.h:73
A EventManager is a set of EventsSet on multiple PreStack gathers, and are identified under the same ...
Definition: prestackevents.h:102
const int horidx_
Definition: prestackevents.h:266
Threads::Lock changebidlock_
Definition: prestackevents.h:226
Specification to enable chunkwise execution of a process.
Definition: executor.h:38
int sz_
Definition: prestackevents.h:60

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