OpendTect  6.6
trckey.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: Kris/Bert/Salil
8  Date: 2013
9  RCS: $Id$
10 ________________________________________________________________________
11 
12 -*/
13 
14 #include "basicmod.h"
15 #include "binid.h"
16 
28 {
29 public:
30 
33 
34  TrcKey() { *this = udf(); }
35 
36  //3D
37  TrcKey(const BinID&); // default 3D surv ID
38  TrcKey(SurvID,const BinID&);
39 
40  //2D
42 
43  bool is2D() const { return is2D(survid_); }
44  static bool is2D(SurvID);
45 
48  static Pos::GeomID geomID(SurvID,const BinID&);
50 
51  bool operator==(const TrcKey&) const;
52  bool operator!=( const TrcKey& oth ) const
53  { return !(*this==oth); }
54 
55  bool exists() const;
56  inline bool isUdf() const { return *this==udf(); }
57  static const TrcKey& udf();
58  void setUdf();
59  static SurvID std2DSurvID();
60  static SurvID std3DSurvID();
61  static SurvID cUndefSurvID();
62 
63  double distTo(const TrcKey&) const;
64  SurvID survID() const { return survid_; }
65  inline TrcKey& setSurvID( SurvID id )
66  { survid_ = id; return *this; }
67 
68  const BinID& position() const { return pos_; }
69  IdxType lineNr() const; // { return pos_.row(); }
70  IdxType trcNr() const; // { return pos_.col(); }
71  const BinID& binID() const { return position(); }
72  IdxType inl() const { return lineNr(); }
73  IdxType crl() const { return trcNr(); }
74  inline TrcKey& setPosition( const BinID& bid )
75  { pos_ = bid; return *this; }
76  inline TrcKey& setLineNr( IdxType nr )
77  { pos_.row() = nr; return *this; }
78  inline TrcKey& setTrcNr( IdxType nr )
79  { pos_.col() = nr; return *this; }
80  inline TrcKey& setBinID( const BinID& bid )
81  { return setPosition(bid); }
82  inline TrcKey& setInl( IdxType nr )
83  { return setLineNr(nr); }
84  inline TrcKey& setCrl( IdxType nr )
85  { return setTrcNr(nr); }
86 
87  TrcKey& setFrom(const Coord&);
88  Coord getCoord() const;
89 
90  /* mDeprecated */ const BinID& pos() const { return pos_; }
92  /* mDeprecated */ void setPos( const BinID& bid ) { pos_ = bid; }
94  /* mDeprecated */ IdxType& lineNr(); // { return pos_.row(); }
96  /* mDeprecated */ IdxType& trcNr(); // { return pos_.col(); }
98 
99 private:
100 
103 
104 };
105 
106 
TrcKey::isUdf
bool isUdf() const
Definition: trckey.h:56
TrcKey::TrcKey
TrcKey(Pos::GeomID, Pos::TraceID)
TrcKey::geomID
static Pos::GeomID geomID(SurvID, const BinID &)
TrcKey::setLineNr
TrcKey & setLineNr(IdxType nr)
Definition: trckey.h:76
TrcKey::lineNr
IdxType lineNr() const
TrcKey::setSurvID
TrcKey & setSurvID(SurvID id)
Definition: trckey.h:65
TrcKey::udf
static const TrcKey & udf()
TrcKey::operator!=
bool operator!=(const TrcKey &oth) const
Definition: trckey.h:52
mExpClass
#define mExpClass(module)
Definition: commondefs.h:177
TrcKey::setTrcNr
TrcKey & setTrcNr(IdxType nr)
Definition: trckey.h:78
Pos::SurvID
Index_Type SurvID
Definition: commontypes.h:84
TrcKey::setBinID
TrcKey & setBinID(const BinID &bid)
Definition: trckey.h:80
binid.h
TrcKey::binID
const BinID & binID() const
Definition: trckey.h:71
TrcKey::TrcKey
TrcKey(const BinID &)
IdxPair::IdxType
Index_Type IdxType
Definition: idxpair.h:33
TrcKey::position
const BinID & position() const
Definition: trckey.h:68
TrcKey::survid_
SurvID survid_
< Will go after 6.0. Use a set function
Definition: trckey.h:101
TrcKey::TrcKey
TrcKey(SurvID, const BinID &)
TrcKey::setPosition
TrcKey & setPosition(const BinID &bid)
Definition: trckey.h:74
TrcKey::cUndefSurvID
static SurvID cUndefSurvID()
TrcKey::is2D
bool is2D() const
Definition: trckey.h:43
TrcKey::lineNr
IdxType & lineNr()
TrcKey::trcNr
IdxType trcNr() const
BinID
Positioning in a seismic survey: inline/crossline or lineNr/trcNr.
Definition: binid.h:31
Coord
A cartesian coordinate in 2D space.
Definition: coord.h:25
TrcKey::IdxType
IdxPair::IdxType IdxType
Definition: trckey.h:32
TrcKey::setGeomID
TrcKey & setGeomID(Pos::GeomID)
Pos::TraceID
Index_Type TraceID
Definition: commontypes.h:86
TrcKey::std3DSurvID
static SurvID std3DSurvID()
TrcKey::trcNr
IdxType & trcNr()
< Will go after 6.0. Use a set function
TrcKey::pos_
BinID pos_
Definition: trckey.h:102
TrcKey::geomID
Pos::GeomID & geomID()
TrcKey::setInl
TrcKey & setInl(IdxType nr)
Definition: trckey.h:82
TrcKey
Represents a unique trace position in one of the surveys that OpendTect is managing.
Definition: trckey.h:28
TrcKey::operator==
bool operator==(const TrcKey &) const
TrcKey::setCrl
TrcKey & setCrl(IdxType nr)
Definition: trckey.h:84
TrcKey::setUdf
void setUdf()
TrcKey::SurvID
Pos::SurvID SurvID
Definition: trckey.h:31
TrcKey::is2D
static bool is2D(SurvID)
TrcKey::setPos
void setPos(const BinID &bid)
Will go after 6.0. Use setPosition()
Definition: trckey.h:92
TrcKey::geomID
Pos::GeomID geomID() const
TrcKey::crl
IdxType crl() const
Definition: trckey.h:73
TrcKey::TrcKey
TrcKey()
Definition: trckey.h:34
TrcKey::distTo
double distTo(const TrcKey &) const
TrcKey::survID
SurvID survID() const
Definition: trckey.h:64
TrcKey::setFrom
TrcKey & setFrom(const Coord &)
Uses survID.
TrcKey::std2DSurvID
static SurvID std2DSurvID()
TrcKey::getCoord
Coord getCoord() const
Uses survID.
TrcKey::inl
IdxType inl() const
Definition: trckey.h:72
TrcKey::pos
const BinID & pos() const
Will go after 6.0. Use position() or binID()
Definition: trckey.h:90
Pos::GeomID
Index_Type GeomID
Definition: commontypes.h:87
TrcKey::exists
bool exists() const
check in geometry

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