OpendTect-6_4  6.4
emsurfaceauxdata.h
Go to the documentation of this file.
1 #ifndef emsurfaceauxdata_h
2 #define emsurfaceauxdata_h
3 
4 /*+
5 ________________________________________________________________________
6 
7  (C) dGB Beheer B.V.; (LICENSE) http://opendtect.org/OpendTect_license.txt
8  Author: Kristofer Tingdahl
9  Date: 4-11-2002
10  RCS: $Id$
11 ________________________________________________________________________
12 
13 
14 -*/
15 
16 #include "earthmodelmod.h"
17 #include "typeset.h"
18 #include "bufstringset.h"
19 #include "emposid.h"
20 #include "uistring.h"
21 
22 class Executor;
23 class IOObj;
24 class BinIDValueSet;
25 class TrcKeySampling;
26 
27 template <class T> class Array2D;
28 
29 namespace EM
30 {
31 
32 class Horizon3D;
33 class PosID;
34 
35 
41 { mODTextTranslationClass(SurfaceAuxData)
42 public:
43  SurfaceAuxData(Horizon3D&);
44  virtual ~SurfaceAuxData();
45  Executor* auxDataLoader(int selidx=-1);
46  Executor* auxDataLoader(const char* nm);
47  Executor* auxDataSaver(int dataidx=0,bool overwrite=false);
48 
49  void removeAll();
50  void removeSection(const SectionID&);
51 
52  int nrAuxData() const;
62  bool hasAuxDataName(const char*) const;
63  const char* auxDataName(int dataidx) const;
66  int auxDataIndex(const char*) const;
68  int addAuxData(const char* name);
72  void setAuxDataName(int dataidx,const char*);
73  void removeAuxData(int dataidx);
74  float getAuxDataVal(int dataidx,const PosID& posid) const;
75  float getAuxDataVal(int dataidx,const TrcKey&) const;
76  void setAuxDataVal(int dataidx,const PosID& posid,float val);
77  void setAuxDataVal(int dataidx,const PosID& posid,float val,
78  bool onlynewpos);
79  void setAuxDataVal(int dataidx,const TrcKey&,float val);
80 
81  void setAuxDataShift(int,float);
82  float auxDataShift(int) const;
83 
84  bool isChanged(int) const;
85  void resetChangedFlag();
86 
87  static bool hasAttribute(const IOObj&,const char* attrnm);
88  static BufferString getFileName(const IOObj&,const char* attrnm);
89  static BufferString getFileName(const char* fullexp,const char* attrnm);
90  static BufferString getFreeFileName(const IOObj&);
91  static bool removeFile(const IOObj&,const char* attrnm);
92  BufferString getFileName(const char* attrnm) const;
93  bool removeFile(const char* attrnm) const;
94 
95  void init(int dataidx,bool onlynewpos=false,
96  float val=mUdf(float));
99  Array2D<float>* createArray2D(int dataidx,SectionID) const;
100  void setArray2D(int dataidx,SectionID,const Array2D<float>&);
101  void setArray2D(int dataidx,SectionID,const Array2D<float>&,
102  const TrcKeySampling* tks);
103 
104  const ObjectSet<BinIDValueSet>& getData() const { return auxdata_; }
105 
106  bool usePar( const IOPar& );
107  void fillPar( IOPar& ) const;
108  void init(int dataidx,float val=mUdf(float));
110  enum AuxDataType { NoType=0, AutoShow, Tracking };
111  void setAuxDataType(int dataidx,AuxDataType);
112  AuxDataType getAuxDataType(int dataidx) const;
113 
114 protected:
116 
117  //One entry per auxdata
121  //One entry per section
123  bool changed_;
125 };
126 
127 } // namespace EM
128 
129 #endif
od_int16 SectionID
Definition: emposid.h:25
#define mExpClass(module)
Definition: commondefs.h:160
Definition: ioobj.h:58
#define mODTextTranslationClass(clss)
Definition: uistring.h:38
Is an identifier for each position in the earthmodel.
Definition: emposid.h:37
void usePar(const IOPar &iop, ODPolygon< T > &poly, const char *inpkey)
Definition: polygon.h:188
bool init()
BufferStringSet auxdatanames_
Definition: emsurfaceauxdata.h:118
const ObjectSet< BinIDValueSet > & getData() const
Definition: emsurfaceauxdata.h:104
BufferStringSet auxdatainfo_
Definition: emsurfaceauxdata.h:119
Set of BufferString objects.
Definition: bufstringset.h:28
Surface data.
Definition: emsurfaceauxdata.h:40
void removeAll()
Generalized set of parameters of the keyword-value type.
Definition: iopar.h:47
Array2D ( Subclass of ArrayND ) is a two dimensional array.
Definition: arraynd.h:131
Horizontal sampling (inline and crossline range and steps).
Definition: trckeysampling.h:27
#define mUdf(type)
Use this macro to get the undefined for simple types.
Definition: undefval.h:272
TypeSet< float > auxdatashift_
Definition: emsurfaceauxdata.h:120
void fillPar(IOPar &iop, const ODPolygon< T > &poly, const char *inpkey)
Definition: polygon.h:175
bool changed_
Definition: emsurfaceauxdata.h:123
OD::String with its own variable length buffer. The buffer has a guaranteed minimum size...
Definition: bufstring.h:40
TypeSet< AuxDataType > auxdatatypes_
Definition: emsurfaceauxdata.h:124
Earth Model objects like horizons, faults, fault-sticks and bodies.
Definition: embody.h:25
A Pos::IdxPairValueSet with BinIDs.
Definition: binidvalset.h:23
AuxDataType
Definition: emsurfaceauxdata.h:110
ObjectSet< BinIDValueSet > auxdata_
Definition: emsurfaceauxdata.h:122
Horizon3D & horizon_
Definition: emsurfaceauxdata.h:115
Represents a unique trace position in one of the surveys that OpendTect is managing.
Definition: trckey.h:28
3D Horizon. A Horizon is made up of one or more grids (so they can overlap at faults). The grids are defined by knot-points in a matrix and fillstyle in between the knots.
Definition: emhorizon3d.h:96
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