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

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