OpendTect  6.6
welllog.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: Bert Bril
8  Date: Aug 2003
9  RCS: $Id$
10 ________________________________________________________________________
11 
12 
13 -*/
14 
15 #include "wellmod.h"
16 #include "welldahobj.h"
17 #include "ranges.h"
18 #include "iopar.h"
19 #include "unitofmeasure.h"
20 #include "propertyref.h"
21 
22 namespace Well
23 {
24 
44 {
45 public:
46 
47  Log( const char* nm=0 )
48  : DahObj(nm)
49  , range_(mUdf(float),-mUdf(float))
50  , iscode_(false) {}
51  Log( const Log& t )
52  : DahObj("") { *this = t; }
53  Log& operator =(const Log&);
54 
55  bool isLoaded() const;
56 
57  float value( int idx ) const { return vals_[idx]; }
58  void setValue(int idx,float val);
59 
60  float getValue(float md,bool noudfs=false) const;
61  void addValue(float md,float val);
65  void ensureAscZ();
66  // Do this after adding values when Z may be reversed
67  bool insertAtDah(float md,float val);
69 
70  Interval<float>& valueRange() { return range_; }
71  const Interval<float>& valueRange() const { return range_; }
72 
73  const char* mnemLabel() const;
74  const Mnemonic* mnemonic() const;
75  void setMnemLabel( const char* );
76 
77  const char* unitMeasLabel() const { return unitmeaslbl_;}
78  const UnitOfMeasure* unitOfMeasure() const;
79  void setUnitMeasLabel( const char* s ) { unitmeaslbl_ = s; }
80  void convertTo(const UnitOfMeasure*);
82  bool isCode() const { return iscode_; }
85  Log* cleanUdfs() const;
89  const float val = mUdf(float));
90 
91  static const char* sKeyMnemLbl();
92  static const char* sKeyUnitLbl();
93  static const char* sKeyHdrInfo();
94  static const char* sKeyStorage();
95  static const char* sKeyDahRange();
96  static const char* sKeyLogRange();
97 
98  float* valArr() { return vals_.arr(); }
99  const float* valArr() const { return vals_.arr(); }
100 
101  IOPar& pars() { return pars_; }
102  const IOPar& pars() const { return pars_; }
103 
104 protected:
105 
110  bool iscode_;
112 
113  void removeAux( int idx ) { vals_.removeSingle(idx); }
114  void eraseAux() { vals_.erase(); }
115  float gtVal(float,int&) const;
116 
117 };
118 
119 
120 } // namespace Well
121 
Well::Log::pars_
IOPar pars_
Definition: welllog.h:111
Well::Log::mnemLabel
const char * mnemLabel() const
Well::Log::Log
Log(const Log &t)
Definition: welllog.h:51
unitofmeasure.h
Well::Log::Log
Log(const char *nm=0)
Definition: welllog.h:47
Well::Log::gtVal
float gtVal(float, int &) const
mExpClass
#define mExpClass(module)
Definition: commondefs.h:177
Well::Log::eraseAux
void eraseAux()
Definition: welllog.h:114
Well::Log::value
float value(int idx) const
Definition: welllog.h:57
Well::Log::mnemonic
const Mnemonic * mnemonic() const
Well::Log::updateAfterValueChanges
void updateAfterValueChanges()
call it upon any change of value(s)
Well::Log::sKeyUnitLbl
static const char * sKeyUnitLbl()
Mnemonic
Definition: mnemonics.h:26
Well::Log::addValue
void addValue(float md, float val)
addition must always ascend or descend
Well::Log::setValue
void setValue(int idx, float val)
Well::Log::upScaleLog
Log * upScaleLog(const StepInterval< float > &) const
Well::Log::valueRange
const Interval< float > & valueRange() const
Definition: welllog.h:71
Well::Log::convertTo
void convertTo(const UnitOfMeasure *)
Well::Log::sKeyStorage
static const char * sKeyStorage()
Well::Log::mnemlbl_
BufferString mnemlbl_
Definition: welllog.h:109
Well::Log::sampleLog
Log * sampleLog(const StepInterval< float > &) const
Well::Log::sKeyDahRange
static const char * sKeyDahRange()
StepInterval< float >
Well::Log::pars
IOPar & pars()
Definition: welllog.h:101
Well::Log::ensureAscZ
void ensureAscZ()
Well
Definition: directionalsurvey.h:20
Well::Log::createSampledLog
static Log * createSampledLog(const StepInterval< float > &, const float val=mUdf(float))
Well::Log::vals_
TypeSet< float > vals_
Definition: welllog.h:106
Well::Log::setMnemLabel
void setMnemLabel(const char *)
Well::Log::valueRange
Interval< float > & valueRange()
Definition: welllog.h:70
Well::Log::unitMeasLabel
const char * unitMeasLabel() const
Definition: welllog.h:77
Well::Log::isCode
bool isCode() const
Definition: welllog.h:82
Well::Log::setUnitMeasLabel
void setUnitMeasLabel(const char *s)
Definition: welllog.h:79
Well::Log::pars
const IOPar & pars() const
Definition: welllog.h:102
File::Log
@ Log
Definition: file.h:122
Well::Log::range_
Interval< float > range_
Definition: welllog.h:107
Well::Log::getValue
float getValue(float md, bool noudfs=false) const
Well::Log::sKeyHdrInfo
static const char * sKeyHdrInfo()
propertyref.h
BufferString
OD::String with its own variable length buffer. The buffer has a guaranteed minimum size.
Definition: bufstring.h:40
Well::Log
Well log.
Definition: welllog.h:44
Well::Log::valArr
const float * valArr() const
Definition: welllog.h:99
Well::Log::removeAux
void removeAux(int idx)
Definition: welllog.h:113
UnitOfMeasure
Unit of Measure.
Definition: unitofmeasure.h:35
Well::Log::sKeyMnemLbl
static const char * sKeyMnemLbl()
Well::Log::valArr
float * valArr()
Definition: welllog.h:98
Well::Log::insertAtDah
bool insertAtDah(float md, float val)
Well::Log::isLoaded
bool isLoaded() const
welldahobj.h
Well::Log::cleanUdfs
Log * cleanUdfs() const
PropertyRef::StdType
StdType
Definition: propertyref.h:46
mUdf
#define mUdf(type)
Use this macro to get the undefined for simple types.
Definition: undefval.h:274
Well::Log::removeTopBottomUdfs
void removeTopBottomUdfs()
iopar.h
Well::Log::propType
PropertyRef::StdType propType() const
Well::Log::unitmeaslbl_
BufferString unitmeaslbl_
Definition: welllog.h:108
ranges.h
Interval< float >
Well::Log::sKeyLogRange
static const char * sKeyLogRange()
IOPar
Generalized set of parameters of the keyword-value type.
Definition: iopar.h:55
Well::Log::iscode_
bool iscode_
Definition: welllog.h:110
Well::Log::unitOfMeasure
const UnitOfMeasure * unitOfMeasure() const
TypeSet< float >
Well::DahObj
Depth/Distance along hole object.
Definition: welldahobj.h:28

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