OpendTect-6_4  6.4
velocityfunction.h
Go to the documentation of this file.
1 #ifndef velocityfunction_h
2 #define velocityfunction_h
3 
4 /*+
5 ________________________________________________________________________
6 
7  (C) dGB Beheer B.V.; (LICENSE) http://opendtect.org/OpendTect_license.txt
8  Author: K. Tingdahl
9  Date: April 2005
10  RCS: $Id$
11 ________________________________________________________________________
12 
13 
14 -*/
15 
16 #include "velocitymod.h"
17 #include "enums.h"
18 #include "factory.h"
19 #include "multiid.h"
20 #include "position.h"
21 #include "ranges.h"
22 #include "refcount.h"
23 #include "samplingdata.h"
24 #include "threadlock.h"
25 #include "veldesc.h"
26 
27 namespace Attrib { class DataHolder; };
28 
29 class BinIDValueSet;
30 
31 
32 namespace Vel
33 {
34 
35 class FunctionSource;
36 
42 {
43 public:
44  void ref() const;
45  void unRef() const;
46  void unRefNoDelete() const;
47 
48  Function(FunctionSource&);
49  const FunctionSource& getSource() const { return source_; }
50 
51  virtual const VelocityDesc& getDesc() const;
52 
53  float getVelocity(float z) const;
54  const BinID& getBinID() const;
55  virtual bool moveTo(const BinID&);
56 
57  virtual void removeCache();
58 
59  virtual StepInterval<float> getAvailableZ() const = 0;
60  void setDesiredZRange(const StepInterval<float>&);
61  const StepInterval<float>& getDesiredZ() const;
62 
63 protected:
64  virtual ~Function();
65 
66  virtual bool computeVelocity(float z0, float dz, int nr,
67  float* res ) const = 0;
68 
72 
73 private:
74  friend class FunctionSource;
75 
79 };
80 
81 
87 public:
89  FunctionSource,const MultiID&,factory)
90 
91  virtual BufferString userName() const;
92  virtual const VelocityDesc& getDesc() const = 0;
93  virtual void getSurroundingPositions(const BinID&,
94  BinIDValueSet&) const;
95  virtual void getAvailablePositions(BinIDValueSet&) const {}
96 
97  ConstRefMan<Function> getFunction(const BinID&);
98  virtual Function* createFunction(const BinID&) = 0;
99 
100  const MultiID& multiID() const { return mid_; }
101 
102  virtual NotifierAccess* changeNotifier() { return 0; }
103  virtual BinID changeBinID() const { return BinID(-1,-1); }
104 
105  virtual void fillPar(IOPar&) const {}
106  virtual bool usePar(const IOPar&) { return true; }
107 
108  const char* errMsg() const;
109 
110 protected:
111 
112  friend class Function;
113  void refFunction(const Function* v);
114  bool unRefFunction(const Function* v);
115 
116  int findFunction(const BinID&) const;
118 
119 
122 
126 };
127 
128 } // namespace Vel
129 
130 #endif
BinID bid_
Definition: velocityfunction.h:70
#define mExpClass(module)
Definition: commondefs.h:160
Velocity.
Definition: velocityfunction.h:32
virtual void getAvailablePositions(BinIDValueSet &) const
Definition: velocityfunction.h:95
To be able to send and/or receive CallBacks, inherit from this class.
Definition: callback.h:272
virtual NotifierAccess * changeNotifier()
Definition: velocityfunction.h:102
Definition: velocityfunction.h:85
A lock of a type that (hopefully) suits your needs. To use it, you need the Locker class...
Definition: threadlock.h:53
Interface class for Notifier. See comments there.
Definition: callback.h:161
Definition: veldesc.h:38
virtual BinID changeBinID() const
Definition: velocityfunction.h:103
StepInterval< float > desiredrg_
Definition: velocityfunction.h:71
FunctionSource & source_
Definition: velocityfunction.h:69
#define mDefineFactory1ParamInClass(T, P, funcname)
Definition: factory.h:447
Set of pointers to objects.
Definition: commontypes.h:32
#define mRefCountImplNoDestructor(ClassName)
Macro to setup a class without destructor for reference counting.
Definition: refcount.h:167
Generalized set of parameters of the keyword-value type.
Definition: iopar.h:47
virtual bool usePar(const IOPar &)
Definition: velocityfunction.h:106
Threads::Lock cachelock_
Definition: velocityfunction.h:76
BufferString errmsg_
Definition: velocityfunction.h:121
SamplingData< double > cachesd_
Definition: velocityfunction.h:78
virtual void fillPar(IOPar &) const
Definition: velocityfunction.h:105
const MultiID & multiID() const
Definition: velocityfunction.h:100
ObjectSet< Function > functions_
Definition: velocityfunction.h:123
Threads::Lock lock_
Definition: velocityfunction.h:125
OD::String with its own variable length buffer. The buffer has a guaranteed minimum size...
Definition: bufstring.h:40
Positioning in a seismic survey: inline/crossline or lineNr/trcNr.
Definition: binid.h:30
A Pos::IdxPairValueSet with BinIDs.
Definition: binidvalset.h:23
MultiID mid_
Definition: velocityfunction.h:120
const char * errMsg() const
Definition: horizontracker.h:61
TypeSet< int > refcounts_
Definition: velocityfunction.h:124
const FunctionSource & getSource() const
Definition: velocityfunction.h:49
Definition: ptrman.h:190
Compound key consisting of ints.
Definition: multiid.h:25
Semblance Attribute.
Definition: attribdataholder.h:25
Definition: velocityfunction.h:41
TypeSet< float > * cache_
Definition: velocityfunction.h:77

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