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

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