OpendTect-6_4  6.4
reflectivitymodel.h
Go to the documentation of this file.
1 #ifndef reflectivitymodel_h
2 #define reflectivitymodel_h
3 
4 /*+
5 ________________________________________________________________________
6 
7  (C) dGB Beheer B.V.; (LICENSE) http://opendtect.org/OpendTect_license.txt
8  Author: Kristofer
9  Date: Jan 2011
10  RCS: $Id$
11 ________________________________________________________________________
12 
13 -*/
14 
15 #include "algomod.h"
16 #include "odcomplex.h"
17 #include "sets.h"
18 
19 
25 {
26 public:
28  : reflectivity_( mUdf(float), mUdf(float) )
29  , time_( mUdf(float) )
30  , correctedtime_( mUdf(float) )
31  , depth_( mUdf(float) )
32  {}
33 
34  inline bool isDefined() const;
35  inline float time(bool isnmo=true) const;
36 
37  inline bool operator==(const ReflectivitySpike& s) const;
38  inline bool operator!=(const ReflectivitySpike& s) const;
39 
41  float time_;
43  float depth_;
44 };
45 
46 
50 
51 
52 //Implementations
53 
55 {
56  return mIsEqualWithUdf( reflectivity_.real(),s.reflectivity_.real(),1e-5) &&
57  mIsEqualWithUdf( reflectivity_.imag(),s.reflectivity_.imag(),1e-5) &&
58  mIsEqualWithUdf( time_, s.time_, 1e-5 ) &&
60  mIsEqualWithUdf( depth_, s.depth_, 1e-5 );
61 }
62 
64 { return !(*this==s); }
65 
66 
67 inline bool ReflectivitySpike::isDefined() const
68 {
69  return !mIsUdf(reflectivity_) && !mIsUdf(time_) &&
71 }
72 
73 
74 inline float ReflectivitySpike::time( bool isnmo ) const
75 {
76  return isnmo ? correctedtime_ : time_;
77 }
78 
79 #endif
#define mIsUdf(val)
Use mIsUdf to check for undefinedness of simple types.
Definition: undefval.h:287
bool operator==(const ArrayNDInfo &a1, const ArrayNDInfo &a2)
Definition: arrayndinfo.h:53
float time_
Definition: reflectivitymodel.h:41
A reflectivity spike.
Definition: reflectivitymodel.h:24
ReflectivitySpike()
Definition: reflectivitymodel.h:27
float time(bool isnmo=true) const
Definition: reflectivitymodel.h:74
float depth_
Definition: reflectivitymodel.h:43
bool isDefined() const
Definition: reflectivitymodel.h:67
float_complex reflectivity_
Definition: reflectivitymodel.h:40
#define mUdf(type)
Use this macro to get the undefined for simple types.
Definition: undefval.h:272
std::complex< float > float_complex
Definition: odcomplex.h:18
bool operator!=(const ArrayNDInfo &a1, const ArrayNDInfo &a2)
Definition: arrayndinfo.h:62
TypeSet< ReflectivitySpike > ReflectivityModel
A table of reflectivies vs time and/or depth.
Definition: reflectivitymodel.h:49
#define mIsEqualWithUdf(x, y, e)
Definition: commondefs.h:55
#define mClass(module)
Definition: commondefs.h:164
bool operator==(const ReflectivitySpike &s) const
Definition: reflectivitymodel.h:54
float correctedtime_
Corrected for normal moveout.
Definition: reflectivitymodel.h:42
bool operator!=(const ReflectivitySpike &s) const
Definition: reflectivitymodel.h:63

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