OpendTect  6.6
velocitypicks.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: April 2005
9  RCS: $Id$
10 ________________________________________________________________________
11 
12 
13 -*/
14 
15 #include "velocitymod.h"
16 #include "multidimstorage.h"
17 #include "callback.h"
18 #include "color.h"
19 #include "emposid.h"
20 #include "enums.h"
21 #include "multiid.h"
22 #include "ranges.h"
23 #include "refcount.h"
24 #include "rowcol.h"
25 
26 class Undo;
27 class IOObj;
28 template <class T> class Smoother1D;
29 class BinIDValueSet;
30 class IOObjContext;
31 
32 namespace EM { class Horizon3D; }
33 
34 namespace Vel
35 {
36 
37 class PicksMgr;
38 
39 mExpClass(Velocity) Pick
40 {
41 public:
42  Pick(float depth=mUdf(float),
43  float vel=mUdf(float),
44  float offset=mUdf(float),EM::ObjectID=-1);
45  bool operator==(const Pick& b) const;
46 
47  float depth_;
48  float offset_;
49  float vel_;
51 };
52 
53 
56 mExpClass(Velocity) Picks : public CallBacker
57 { mRefCountImpl(Picks)
58 public:
59  Picks();
60  Picks(bool zit);
61 
62  enum PickType { RMO, RMS, Delta, Epsilon, Eta };
64  PickType pickType() const;
65  void setPickType( PickType, bool resetcolor );
66  const char* zDomain() const;
67 
68  bool setColor(const Color&,bool savedefault);
70  const Color& getColor() const { return color_; }
71  bool getDefaultColor(Color&) const;
72 
73 
74  Undo& undo();
75 
76  void removeAll(bool undo=true,bool interactionend=true);
77  bool isEmpty() const;
78 
79 
81  const StepInterval<float>& getSnappingInterval() const { return snapper_; }
82  RowCol find(const BinID&,const Pick&) const;
83  RowCol set(const BinID&, const Pick&,
84  bool undo=true,bool interactionend=true);
85  void set(const RowCol&,
86  const Pick&,bool undo=true,
87  bool interactionend=true);
88  int get(const BinID&, TypeSet<float>* depths,
89  TypeSet<float>* vals,
92  bool interpolatehors ) const;
94  void get(const BinID&, TypeSet<Pick>&,
95  bool interpolatehors,
96  bool normalizerefoffset ) const;
98  bool get(const RowCol&, BinID&, Pick& );
99  void get(const EM::ObjectID&,TypeSet<RowCol>&) const;
100  void remove(const RowCol&,
101  bool undo=true,bool interactionend=true);
102 
103  const MultiDimStorage<Pick>& getAll() const { return picks_; }
104 
109  bool isChanged() const;
110  void resetChangedFlag() { changed_ = false; }
111 
112  bool store(const IOObj*);
115  const MultiID& storageID() const;
116  bool zIsTime() const { return zit_; }
117 
118  Smoother1D<float>* getSmoother() { return smoother_; }
119  const Smoother1D<float>* getSmoother() const { return smoother_; }
122 
123  const char* errMsg() const;
124  static const char* sKeyIsTime();
125 
126  void setAll(float vel,bool undo=true);
127 
130 
131  float refOffset() const { return refoffset_; }
132  void setReferenceOffset(float n);
133 
134  const MultiID& gatherID() const;
135  void setGatherID(const MultiID&);
136 
137 
138  void addHorizon(const MultiID&,
139  bool addzeroonfail=false);
141  int nrHorizons() const;
142 
148  float searchradius,BinIDValueSet&) const;
152  char getHorizonStatus(const BinID&) const;
158  static const char* sKeyVelocityPicks();
159  static const char* sKeyRefOffset();
160  static const char* sKeyGatherID();
161  static const char* sKeyNrHorizons();
162  static const char* sKeyHorizonPrefix();
163  static const char* sKeyPickType();
164 
165 protected:
166  void getColorKey(BufferString&) const;
168  friend class PicksMgr;
169  void fillIOObjPar(IOPar&) const;
170  bool useIOObjPar(const IOPar&);
171  float normalizeRMO(float depth,float rmo,
172  float offset) const;
176  void fillPar(IOPar&) const;
177  bool usePar(const IOPar&);
178 
180 
181  float refoffset_;
183  bool load(const IOObj*);
187 
189 
193 
196 
197  bool changed_;
198  bool zit_;
199 
200 };
201 
202 
203 mExpClass(Velocity) PicksMgr : public CallBacker
204 {
205 public:
208 
209  Picks* get(const MultiID&,bool gathermid,
210  bool create, bool forcefromstorage );
211 
212  const char* errMsg() const;
213 protected:
214  friend class Picks;
215 
217 
220 };
221 
222 
223 mGlobal(Velocity) PicksMgr& VPM();
224 
225 } // namespace Vel
226 
Vel::Picks::sKeyIsTime
static const char * sKeyIsTime()
Vel::Picks::sKeyPickType
static const char * sKeyPickType()
emposid.h
Vel::Picks::removeHorizon
void removeHorizon(EM::ObjectID)
Vel
Velocity.
Definition: velocityfunction.h:32
Vel::Picks::change
CNotifier< Picks, const BinID & > change
Definition: velocitypicks.h:105
Vel::Picks::setGatherID
void setGatherID(const MultiID &)
Vel::Picks::addHorizon
void addHorizon(EM::Horizon3D *)
Vel::Pick::offset_
float offset_
Definition: velocitypicks.h:48
Vel::Picks::horizonChangeCB
void horizonChangeCB(CallBacker *)
Vel::Picks::get
bool get(const RowCol &, BinID &, Pick &)
Vel::Picks
Definition: velocitypicks.h:57
Vel::Picks::getHorizon
EM::Horizon3D * getHorizon(EM::ObjectID)
mGlobal
#define mGlobal(module)
Definition: commondefs.h:180
ObjectSet< EM::Horizon3D >
Vel::Picks::getAll
const MultiDimStorage< Pick > & getAll() const
Definition: velocitypicks.h:103
BinIDValueSet
A Pos::IdxPairValueSet with BinIDs.
Definition: binidvalset.h:23
Vel::PicksMgr::surveyChange
void surveyChange(CallBacker *)
Vel::Picks::refOffset
float refOffset() const
Definition: velocitypicks.h:131
Vel::Picks::sKeyVelocityPicks
static const char * sKeyVelocityPicks()
Pick
Definition: picklocation.h:21
Vel::Picks::removeHorizons
void removeHorizons()
mExpClass
#define mExpClass(module)
Definition: commondefs.h:177
Vel::Picks::storageID
const MultiID & storageID() const
Vel::Picks::getStorageContext
static const IOObjContext & getStorageContext()
Vel::Picks::undo
Undo & undo()
Vel::Picks::resetChangedFlag
void resetChangedFlag()
Definition: velocitypicks.h:110
Vel::Picks::setPickType
void setPickType(PickType, bool resetcolor)
Vel::Picks::sKeyHorizonPrefix
static const char * sKeyHorizonPrefix()
callback.h
CallBacker
Inherit from this class to be able to send and/or receive CallBacks.
Definition: callback.h:185
Vel::Picks::normalizeRMO
float normalizeRMO(float depth, float rmo, float offset) const
Vel::Pick::emobjid_
EM::ObjectID emobjid_
Definition: velocitypicks.h:50
MultiDimStorage
Definition: multidimstorage.h:25
Vel::Picks::smoother_
Smoother1D< float > * smoother_
Definition: velocitypicks.h:191
Vel::Picks::getHorizon
const EM::Horizon3D * getHorizon(EM::ObjectID) const
Vel::Picks::getSmoother
Smoother1D< float > * getSmoother()
Definition: velocitypicks.h:118
Vel::Picks::refoffset_
float refoffset_
Definition: velocitypicks.h:181
Vel::Picks::changelate
CNotifier< Picks, const BinID & > changelate
Definition: velocitypicks.h:106
EM
Earth Model objects like horizons, faults, fault-sticks and bodies.
Definition: bulk2dhorizonscanner.h:26
Vel::Picks::errMsg
const char * errMsg() const
Vel::Pick::depth_
float depth_
Definition: velocitypicks.h:47
Vel::Picks::getSmoother
const Smoother1D< float > * getSmoother() const
Definition: velocitypicks.h:119
Vel::Picks::gatherid_
MultiID gatherid_
Definition: velocitypicks.h:182
Vel::Picks::getDefaultColor
bool getDefaultColor(Color &) const
Vel::Picks::changed_
bool changed_
Definition: velocitypicks.h:197
multiid.h
BinID
Positioning in a seismic survey: inline/crossline or lineNr/trcNr.
Definition: binid.h:31
StepInterval< float >
Vel::Pick::vel_
float vel_
Definition: velocitypicks.h:49
Vel::PicksMgr
Definition: velocitypicks.h:204
Vel::Picks::getSnappingInterval
const StepInterval< float > & getSnappingInterval() const
Definition: velocitypicks.h:81
Vel::Pick::Pick
Pick(float depth=mUdf(float), float vel=mUdf(float), float offset=mUdf(float), EM::ObjectID=-1)
Vel::Picks::setReferenceOffset
void setReferenceOffset(float n)
Vel::Picks::setSmoother
void setSmoother(Smoother1D< float > *)
Becomes mine.
Vel::Picks::setSnappingInterval
void setSnappingInterval(const StepInterval< float > &)
Vel::PicksMgr::PicksMgr
PicksMgr()
Vel::Picks::isChanged
bool isChanged() const
IOObjContext
Holds the context for selecting and/or creating IOObjs.
Definition: ctxtioobj.h:62
Vel::Picks::get
int get(const BinID &, TypeSet< float > *depths, TypeSet< float > *vals, TypeSet< RowCol > *, TypeSet< EM::ObjectID > *, bool interpolatehors) const
Vel::Picks::mDeclareEnumUtils
mDeclareEnumUtils(PickType) PickType pickType() const
Smoother1D
Smoothes a 1d signal with an operator.
Definition: smoother1d.h:28
Vel::Picks::storageid_
MultiID storageid_
Definition: velocitypicks.h:185
Vel::Picks::useIOObjPar
bool useIOObjPar(const IOPar &)
IOObj
Definition: ioobj.h:58
Vel::Picks::color_
Color color_
Definition: velocitypicks.h:195
Vel::Picks::nrHorizons
int nrHorizons() const
Vel::Pick::operator==
bool operator==(const Pick &b) const
Vel::Picks::sKeyRefOffset
static const char * sKeyRefOffset()
Vel::Picks::zDomain
const char * zDomain() const
Vel::Picks::get
void get(const EM::ObjectID &, TypeSet< RowCol > &) const
Vel::Picks::PickType
PickType
Definition: velocitypicks.h:62
Vel::Picks::store
bool store(const IOObj *)
Vel::PicksMgr::errmsg_
BufferString errmsg_
Definition: velocitypicks.h:218
Vel::PicksMgr::errMsg
const char * errMsg() const
Vel::Picks::errmsg_
BufferString errmsg_
Definition: velocitypicks.h:190
Vel::Picks::removeAll
void removeAll(bool undo=true, bool interactionend=true)
Vel::PicksMgr::velpicks_
ObjectSet< Picks > velpicks_
Definition: velocitypicks.h:219
MultiID
Compound key consisting of ints.
Definition: multiid.h:24
Vel::Picks::setAll
void setAll(float vel, bool undo=true)
Vel::Picks::RMS
@ RMS
Definition: velocitypicks.h:62
BufferString
OD::String with its own variable length buffer. The buffer has a guaranteed minimum size.
Definition: bufstring.h:40
Vel::Picks::setColor
bool setColor(const Color &, bool savedefault)
Vel::Picks::gatherID
const MultiID & gatherID() const
Vel::Picks::getHorizonID
EM::ObjectID getHorizonID(int) const
Vel::Picks::picktype_
PickType picktype_
Definition: velocitypicks.h:194
Vel::Picks::addHorizon
void addHorizon(const MultiID &, bool addzeroonfail=false)
EM::ObjectID
od_int32 ObjectID
Definition: emposid.h:23
Vel::Picks::fillPar
void fillPar(IOPar &) const
enums.h
Vel::Picks::setContextPickType
static void setContextPickType(IOObjContext &, PickType)
Vel::Picks::isEmpty
bool isEmpty() const
Vel::Picks::sKeyNrHorizons
static const char * sKeyNrHorizons()
Vel::Picks::undo_
Undo * undo_
Definition: velocitypicks.h:188
Vel::Picks::find
RowCol find(const BinID &, const Pick &) const
Vel::Picks::set
void set(const RowCol &, const Pick &, bool undo=true, bool interactionend=true)
mUdf
#define mUdf(type)
Use this macro to get the undefined for simple types.
Definition: undefval.h:274
refcount.h
color.h
RowCol
IdxPair used for its row() and col().
Definition: rowcol.h:25
Vel::Picks::sKeyGatherID
static const char * sKeyGatherID()
Vel::Picks::usePar
bool usePar(const IOPar &)
Vel::Picks::horizons_
ObjectSet< EM::Horizon3D > horizons_
Definition: velocitypicks.h:192
create
static uiHor3DInterpol * create(uiParent *)
Vel::Picks::interpolateVelocity
bool interpolateVelocity(EM::ObjectID, float searchradius, BinIDValueSet &) const
Vel::Picks::get
void get(const BinID &, TypeSet< Pick > &, bool interpolatehors, bool normalizerefoffset) const
Vel::PicksMgr::~PicksMgr
~PicksMgr()
ranges.h
Vel::Picks::remove
void remove(const RowCol &, bool undo=true, bool interactionend=true)
Vel::Picks::picks_
MultiDimStorage< Pick > picks_
Definition: velocitypicks.h:186
Vel::Picks::Picks
mRefCountImpl(Picks) public Picks(bool zit)
Vel::Picks::getColorKey
void getColorKey(BufferString &) const
Color
Color is an RGB color object, with a transparancy. The storage is in a 4-byte integer,...
Definition: color.h:26
Vel::Picks::load
bool load(const IOObj *)
CNotifier
Notifier with automatic capsule creation.
Definition: notify.h:171
rowcol.h
Vel::Picks::fillIOObjPar
void fillIOObjPar(IOPar &) const
Vel::Picks::snapper_
StepInterval< float > snapper_
Definition: velocitypicks.h:184
IOPar
Generalized set of parameters of the keyword-value type.
Definition: iopar.h:55
EM::Horizon3D
3D Horizon. A Horizon is made up of one or more grids (so they can overlap at faults)....
Definition: emhorizon3d.h:96
Vel::Picks::getHorizonStatus
char getHorizonStatus(const BinID &) const
Vel::Picks::set
RowCol set(const BinID &, const Pick &, bool undo=true, bool interactionend=true)
Vel::VPM
PicksMgr & VPM()
Vel::Picks::zit_
bool zit_
Definition: velocitypicks.h:198
Vel::PicksMgr::get
Picks * get(const MultiID &, bool gathermid, bool create, bool forcefromstorage)
Vel::Picks::getColor
const Color & getColor() const
Definition: velocitypicks.h:70
multidimstorage.h
TypeSet< float >
Vel::Picks::zIsTime
bool zIsTime() const
Definition: velocitypicks.h:116
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