OpendTect-6_4  6.4
seisbayesclass.h
Go to the documentation of this file.
1 #ifndef seisbayesclass_h
2 #define seisbayesclass_h
3 
4 /*
5 ________________________________________________________________________
6 
7  (C) dGB Beheer B.V.; (LICENSE) http://opendtect.org/OpendTect_license.txt
8  Author: Bert
9  Date: Feb 2010
10  RCS: $Id$
11 ________________________________________________________________________
12 
13 */
14 
15 #include "seismod.h"
16 #include "executor.h"
17 #include "bufstringset.h"
18 class SeisTrc;
19 class SeisTrcBuf;
20 class ProbDenFunc;
21 class SeisTrcReader;
22 class SeisTrcWriter;
23 
24 
43 public:
44 
45  SeisBayesClass(const IOPar&);
46  ~SeisBayesClass();
47 
48  static const char* sKeyPDFID();
49  static const char* sKeyAPProbID();
50  static const char* sKeySeisInpID();
51  static const char* sKeySeisOutID();
52  static const char* sKeyPreNorm();
53  static const char* sKeyPostNorm();
54  static const char* sKeyPreScale();
55 
56  int nextStep();
57  uiString uiMessage() const;
58  uiString uiNrDoneText() const;
59  od_int64 nrDone() const;
60  od_int64 totalNr() const;
61 
62 protected:
63 
64  bool is2d_;
73  const IOPar& pars_;
75  bool doprenorm_;
78 
79  const int nrdims_;
80  const int nrpdfs_;
81  const bool needclass_;
86  int initstep_;
88 
89  bool getPDFs();
90  void preScalePDFs();
91  void postScaleProbs();
92  bool getReaders();
93  bool getWriters();
94 
95  SeisTrcReader* getReader(const char*,bool,int);
96  int readInpTrcs();
97  int createOutput();
98  int closeDown();
99 
100  float getPDFValue(int ipdf,int isamp,int icomp,
101  bool inp=false) const;
102  float getAPTrcVal(int ipdf,int isamp,int icomp);
103  void calcPerBinProbs();
104  void calcProbs(int);
105  void calcClass();
106  void calcDet();
107  void cleanUp();
108  void prepOutTrc(SeisTrc&,bool) const;
109  void getClass(const TypeSet<float>&,int&,
110  float&) const;
111 
112 };
113 
114 #define mGetSeisBayesKey(ky,nr) \
115  IOPar::compKey(SeisBayesClass::sKey##ky(),nr)
116 #define mGetSeisBayesIDKey(ky,nr) mGetSeisBayesKey(ky##ID,nr)
117 
118 #define mGetSeisBayesPreScaleKey(nr) mGetSeisBayesKey(PreScale,nr)
119 #define mGetSeisBayesPDFIDKey(nr) mGetSeisBayesIDKey(PDF,nr)
120 #define mGetSeisBayesAPProbIDKey(nr) mGetSeisBayesIDKey(APProb,nr)
121 #define mGetSeisBayesSeisInpIDKey(nr) mGetSeisBayesIDKey(SeisInp,nr)
122 #define mGetSeisBayesSeisOutIDKey(nr) mGetSeisBayesIDKey(SeisOut,nr)
123 
124 
125 #endif
#define mExpClass(module)
Definition: commondefs.h:160
Summary for a Seismic object.
Definition: segydirectdef.h:23
int initstep_
Definition: seisbayesclass.h:86
#define mODTextTranslationClass(clss)
Definition: uistring.h:38
bool cleanUp(bool alsoioobj=true)
Base class for Probability Density Functions.
Definition: probdenfunc.h:31
#define od_int64
Definition: plftypes.h:36
ObjectSet< SeisTrcReader > aprdrs_
Definition: seisbayesclass.h:68
TypeSet< float > prescales_
Definition: seisbayesclass.h:77
Definition: seiswrite.h:41
const bool needclass_
Definition: seisbayesclass.h:81
uiString msg_
Definition: seisbayesclass.h:84
od_int64 nrdone_
Definition: seisbayesclass.h:82
Definition: uistring.h:89
SeisTrcBuf & aptrcs_
Definition: seisbayesclass.h:71
const int nrdims_
Definition: seisbayesclass.h:79
Set of BufferString objects.
Definition: bufstringset.h:28
ObjectSet< SeisTrcReader > rdrs_
Definition: seisbayesclass.h:67
reads from a seismic data store.
Definition: seisread.h:50
Generalized set of parameters of the keyword-value type.
Definition: iopar.h:47
od_int64 totalnr_
Definition: seisbayesclass.h:83
SeisTrcBuf & outtrcs_
Definition: seisbayesclass.h:72
const IOPar & pars_
Definition: seisbayesclass.h:73
const int nrpdfs_
Definition: seisbayesclass.h:80
TypeSet< float > pdfinpvals_
Definition: seisbayesclass.h:87
ObjectSet< SeisTrcWriter > wrrs_
Definition: seisbayesclass.h:69
Bayesian inversion/classification for seismic data using PDFs.
Definition: seisbayesclass.h:41
SeisTrcBuf & inptrcs_
Definition: seisbayesclass.h:70
Seismic trace.
Definition: seistrc.h:34
bool doprenorm_
Definition: seisbayesclass.h:75
set of seismic traces.
Definition: seisbuf.h:31
ObjectSet< TypeSet< int > > pdfxtbls_
Definition: seisbayesclass.h:74
ObjectSet< ProbDenFunc > pdfs_
Definition: seisbayesclass.h:66
BufferStringSet pdfnames_
Definition: seisbayesclass.h:85
bool is2d_
Definition: seisbayesclass.h:64
bool dopostnorm_
Definition: seisbayesclass.h:76
ObjectSet< ProbDenFunc > inppdfs_
Definition: seisbayesclass.h:65
Specification to enable chunkwise execution of a process.
Definition: executor.h:39

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