OpendTect-6_4  6.4
trckey.h
Go to the documentation of this file.
1 #ifndef trckey_h
2 #define trckey_h
3 
4 /*+
5 ________________________________________________________________________
6 
7  (C) dGB Beheer B.V.; (LICENSE) http://opendtect.org/OpendTect_license.txt
8  Author: Kris/Bert/Salil
9  Date: 2013
10  RCS: $Id$
11 ________________________________________________________________________
12 
13 -*/
14 
15 #include "basicmod.h"
16 #include "binid.h"
17 
29 {
30 public:
31 
34 
35  TrcKey() { *this = udf(); }
36 
37  //3D
38  TrcKey(const BinID&); // default 3D surv ID
39  TrcKey(SurvID,const BinID&);
40 
41  //2D
42  TrcKey(Pos::GeomID,Pos::TraceID);
43 
44  bool is2D() const { return is2D(survid_); }
45  static bool is2D(SurvID);
46 
47  Pos::GeomID& geomID();
48  Pos::GeomID geomID() const;
49  static Pos::GeomID geomID(SurvID,const BinID&);
50  TrcKey& setGeomID(Pos::GeomID);
51 
52  bool operator==(const TrcKey&) const;
53 
54  inline bool isUdf() const { return *this==udf(); }
55  static const TrcKey& udf();
56  static SurvID std2DSurvID();
57  static SurvID std3DSurvID();
58  static SurvID cUndefSurvID();
59 
60  double distTo(const TrcKey&) const;
61  SurvID survID() const { return survid_; }
62  inline TrcKey& setSurvID( SurvID id )
63  { survid_ = id; return *this; }
64 
65  const BinID& position() const { return pos_; }
66  IdxType lineNr() const; // { return pos_.row(); }
67  IdxType trcNr() const; // { return pos_.col(); }
68  const BinID& binID() const { return position(); }
69  IdxType inl() const { return lineNr(); }
70  IdxType crl() const { return trcNr(); }
71  inline TrcKey& setPosition( const BinID& bid )
72  { pos_ = bid; return *this; }
73  inline TrcKey& setLineNr( IdxType nr )
74  { pos_.row() = nr; return *this; }
75  inline TrcKey& setTrcNr( IdxType nr )
76  { pos_.col() = nr; return *this; }
77  inline TrcKey& setBinID( const BinID& bid )
78  { return setPosition(bid); }
79  inline TrcKey& setInl( IdxType nr )
80  { return setLineNr(nr); }
81  inline TrcKey& setCrl( IdxType nr )
82  { return setTrcNr(nr); }
83 
84  TrcKey& setFrom(const Coord&);
85  Coord getCoord() const;
86 
87  /* mDeprecated */ const BinID& pos() const { return pos_; }
89  /* mDeprecated */ void setPos( const BinID& bid ) { pos_ = bid; }
91  /* mDeprecated */ IdxType& lineNr(); // { return pos_.row(); }
93  /* mDeprecated */ IdxType& trcNr(); // { return pos_.col(); }
95 
96 private:
97 
98  SurvID survid_;
100 
101 };
102 
103 
104 #endif
#define mExpClass(module)
Definition: commondefs.h:160
IdxType inl() const
Definition: trckey.h:69
TrcKey & setBinID(const BinID &bid)
Definition: trckey.h:77
bool operator==(const ArrayNDInfo &a1, const ArrayNDInfo &a2)
Definition: arrayndinfo.h:53
Index_Type TraceID
Definition: commontypes.h:51
void setPos(const BinID &bid)
Will go after 6.0. Use setPosition()
Definition: trckey.h:89
TrcKey & setCrl(IdxType nr)
Definition: trckey.h:81
Pos::SurvID SurvID
Definition: trckey.h:32
A cartesian coordinate in 2D space.
Definition: coord.h:25
const BinID & binID() const
Definition: trckey.h:68
SurvID survID() const
Definition: trckey.h:61
const BinID & pos() const
Will go after 6.0. Use position() or binID()
Definition: trckey.h:87
Index_Type SurvID
Definition: commontypes.h:49
TrcKey & setPosition(const BinID &bid)
Definition: trckey.h:71
TrcKey & setInl(IdxType nr)
Definition: trckey.h:79
Index_Type GeomID
Definition: commontypes.h:52
const BinID & position() const
Definition: trckey.h:65
IdxType crl() const
Definition: trckey.h:70
TrcKey & setTrcNr(IdxType nr)
Definition: trckey.h:75
Index_Type IdxType
Definition: idxpair.h:34
Positioning in a seismic survey: inline/crossline or lineNr/trcNr.
Definition: binid.h:30
bool is2D(const PicksType &picks)
Definition: pickset.h:142
bool isUdf() const
Definition: trckey.h:54
BinID pos_
Definition: trckey.h:99
bool is2D() const
Definition: trckey.h:44
Represents a unique trace position in one of the surveys that OpendTect is managing.
Definition: trckey.h:28
TrcKey & setLineNr(IdxType nr)
Definition: trckey.h:73
SurvID survid_
< Will go after 6.0. Use a set function
Definition: trckey.h:98
IdxPair::IdxType IdxType
Definition: trckey.h:33
TrcKey & setSurvID(SurvID id)
Definition: trckey.h:62
TrcKey()
Definition: trckey.h:35

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