OpendTect  6.6
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  RCS: $Id$
10 ________________________________________________________________________
11 
12 -*/
13 
14 #include "algomod.h"
15 #include "odcomplex.h"
16 #include "sets.h"
17 
18 
24 {
25 public:
27  : reflectivity_( mUdf(float), mUdf(float) )
28  , time_( mUdf(float) )
29  , correctedtime_( mUdf(float) )
30  , depth_( mUdf(float) )
31  {}
32 
33  inline bool isDefined() const;
34  inline float time(bool isnmo=true) const;
35 
36  inline bool operator==(const ReflectivitySpike& s) const;
37  inline bool operator!=(const ReflectivitySpike& s) const;
38 
40  float time_;
42  float depth_;
43 };
44 
45 
49 
50 
51 //Implementations
52 
54 {
55  return mIsEqualWithUdf( reflectivity_.real(),s.reflectivity_.real(),1e-5) &&
56  mIsEqualWithUdf( reflectivity_.imag(),s.reflectivity_.imag(),1e-5) &&
57  mIsEqualWithUdf( time_, s.time_, 1e-5 ) &&
59  mIsEqualWithUdf( depth_, s.depth_, 1e-5 );
60 }
61 
63 { return !(*this==s); }
64 
65 
66 inline bool ReflectivitySpike::isDefined() const
67 {
68  return !mIsUdf(reflectivity_) && !mIsUdf(time_) &&
70 }
71 
72 
73 inline float ReflectivitySpike::time( bool isnmo ) const
74 {
75  return isnmo ? correctedtime_ : time_;
76 }
77 
float_complex
std::complex< float > float_complex
Definition: odcomplex.h:17
mIsUdf
#define mIsUdf(val)
Use mIsUdf to check for undefinedness of simple types.
Definition: undefval.h:289
ReflectivitySpike::isDefined
bool isDefined() const
Definition: reflectivitymodel.h:66
ReflectivitySpike::depth_
float depth_
Definition: reflectivitymodel.h:42
ReflectivitySpike::reflectivity_
float_complex reflectivity_
Definition: reflectivitymodel.h:39
operator==
bool operator==(const ArrayNDInfo &a1, const ArrayNDInfo &a2)
Definition: arrayndinfo.h:81
ReflectivitySpike::time
float time(bool isnmo=true) const
Definition: reflectivitymodel.h:73
ReflectivitySpike::ReflectivitySpike
ReflectivitySpike()
Definition: reflectivitymodel.h:26
ReflectivityModel
TypeSet< ReflectivitySpike > ReflectivityModel
A table of reflectivies vs time and/or depth.
Definition: reflectivitymodel.h:48
operator!=
bool operator!=(const ArrayNDInfo &a1, const ArrayNDInfo &a2)
Definition: arrayndinfo.h:90
mClass
#define mClass(module)
Definition: commondefs.h:181
ReflectivitySpike::operator!=
bool operator!=(const ReflectivitySpike &s) const
Definition: reflectivitymodel.h:62
ReflectivitySpike
A reflectivity spike.
Definition: reflectivitymodel.h:24
mIsEqualWithUdf
#define mIsEqualWithUdf(x, y, e)
Definition: commondefs.h:68
odcomplex.h
mUdf
#define mUdf(type)
Use this macro to get the undefined for simple types.
Definition: undefval.h:274
sets.h
ReflectivitySpike::operator==
bool operator==(const ReflectivitySpike &s) const
Definition: reflectivitymodel.h:53
ReflectivitySpike::time_
float time_
Definition: reflectivitymodel.h:40
TypeSet< ReflectivitySpike >
ReflectivitySpike::correctedtime_
float correctedtime_
Corrected for normal moveout.
Definition: reflectivitymodel.h:41

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