OpendTect  6.3
reflectivitymodel.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: Kristofer
8  Date: Jan 2011
9 ________________________________________________________________________
10 
11 -*/
12 
13 #include "algomod.h"
14 #include "odcomplex.h"
15 #include "sets.h"
16 #include "objectset.h"
17 #include "typeset.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 
54  public ObjectSet<const ReflectivityModel>
55  , public RefCount::Referenced
56 {
57 };
58 
59 
60 //Implementations
61 
63 {
64  return mIsEqualWithUdf( reflectivity_.real(),s.reflectivity_.real(),1e-5) &&
65  mIsEqualWithUdf( reflectivity_.imag(),s.reflectivity_.imag(),1e-5) &&
66  mIsEqualWithUdf( time_, s.time_, 1e-5 ) &&
68  mIsEqualWithUdf( depth_, s.depth_, 1e-5 );
69 }
70 
72 { return !(*this==s); }
73 
74 
75 inline bool ReflectivitySpike::isDefined() const
76 {
77  return !mIsUdf(reflectivity_) && !mIsUdf(time_) &&
79 }
80 
81 
82 inline float ReflectivitySpike::time( bool isnmo ) const
83 {
84  return isnmo ? correctedtime_ : time_;
85 }
#define mExpClass(module)
Definition: commondefs.h:157
#define mIsUdf(val)
Use mIsUdf to check for undefinedness of simple types.
Definition: undefval.h:285
bool operator==(const ArrayNDInfo &a1, const ArrayNDInfo &a2)
Definition: arrayndinfo.h:51
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:82
float depth_
Definition: reflectivitymodel.h:43
bool isDefined() const
Definition: reflectivitymodel.h:75
Set of pointers to objects.
Definition: commontypes.h:28
Definition: reflectivitymodel.h:53
float_complex reflectivity_
Definition: reflectivitymodel.h:40
#define mUdf(type)
Use this macro to get the undefined for simple types.
Definition: undefval.h:270
std::complex< float > float_complex
Definition: odcomplex.h:16
bool operator!=(const ArrayNDInfo &a1, const ArrayNDInfo &a2)
Definition: arrayndinfo.h:60
TypeSet< ReflectivitySpike > ReflectivityModel
A table of reflectivies vs time and/or depth.
Definition: reflectivitymodel.h:49
#define mIsEqualWithUdf(x, y, e)
Definition: commondefs.h:57
#define mClass(module)
Definition: commondefs.h:161
bool operator==(const ReflectivitySpike &s) const
Definition: reflectivitymodel.h:62
float correctedtime_
Corrected for normal moveout.
Definition: reflectivitymodel.h:42
bool operator!=(const ReflectivitySpike &s) const
Definition: reflectivitymodel.h:71

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