OpendTect-6_4  6.4
linesetposinfo.h
Go to the documentation of this file.
1 #ifndef linesetposinfo_h
2 #define linesetposinfo_h
3 
4 /*+
5 ________________________________________________________________________
6 
7  (C) dGB Beheer B.V.; (LICENSE) http://opendtect.org/OpendTect_license.txt
8  Author: Bert
9  Date: 2005 / Mar 2008
10  RCS: $Id$
11 ________________________________________________________________________
12 
13 -*/
14 
15 #include "generalmod.h"
16 #include "posinfo2d.h"
17 #include "objectset.h"
18 class BinIDValueSet;
19 
20 
21 namespace PosInfo
22 {
23 
27 {
28 public:
29 
30  virtual ~LineSet2DData() { deepErase(data_); }
31 
32  Line2DData& addLine(const char*);
33  int nrLines() const { return data_.size(); }
34  const char* lineName( int idx ) const
35  { return data_[idx]->lnm_.buf(); }
36  const Line2DData& lineData( int idx ) const
37  { return data_[idx]->pos_; }
38  const Line2DData* getLineData(const char*) const;
39  void removeLine(const char*);
40 
41  struct IR
42  {
43  IR() : posns_(0) {}
44  ~IR(); // { delete posns_; }
45 
48  };
49  void intersect(const BinIDValueSet&,ObjectSet<IR>&) const;
50 
51  float getDistBetwTrcs(bool,const char* linenm =0) const;
52  BinID getElementStepout(const char* linenm) const;
53  void compDistBetwTrcsStats();
54  bool areStatsComputed() const
55  { return trcdiststatsperlines_.size(); }
56 
57 protected:
58 
59  struct Info
60  {
63  };
64 
66 
67  Info* findLine(const char*) const;
68 
69  mStruct(General) LineTrcDistStats
70  {
71  LineTrcDistStats( BufferString linename,
72  float mediandist,
73  float maxdist )
74  : linename_(linename)
75  , mediandist_(mediandist)
76  , maxdist_( maxdist ) {};
77 
78  bool operator ==( LineTrcDistStats ltds ) const
79  {
80  return ltds.linename_ == linename_
81  && ltds.mediandist_ == mediandist_
82  && ltds.maxdist_ == maxdist_;
83  }
84 
85  BufferString linename_;
86  float mediandist_;
87  float maxdist_;
88  };
89 
91 };
92 
93 } // namespace PosInfo
94 
95 #endif
#define mExpClass(module)
Definition: commondefs.h:160
bool operator==(const ArrayNDInfo &a1, const ArrayNDInfo &a2)
Definition: arrayndinfo.h:53
#define mStruct(module)
Definition: commondefs.h:165
BufferString lnm_
Definition: linesetposinfo.h:61
ObjectSet< Info > data_
Definition: linesetposinfo.h:65
const Line2DData & lineData(int idx) const
Definition: linesetposinfo.h:36
BinIDValueSet * posns_
Definition: linesetposinfo.h:47
Definition: linesetposinfo.h:41
Position info for a 2D line.
Definition: posinfo2d.h:65
Set of pointers to objects.
Definition: commontypes.h:32
int nrLines() const
Definition: linesetposinfo.h:33
Definition: linesetposinfo.h:59
const char * lineName(int idx) const
Definition: linesetposinfo.h:34
Position info for a set of 2D lines.
Definition: linesetposinfo.h:26
virtual ~LineSet2DData()
Definition: linesetposinfo.h:30
Position info, often segmented.
Definition: posinfo.h:40
bool areStatsComputed() const
Definition: linesetposinfo.h:54
OD::String with its own variable length buffer. The buffer has a guaranteed minimum size...
Definition: bufstring.h:40
Positioning in a seismic survey: inline/crossline or lineNr/trcNr.
Definition: binid.h:30
Line2DData pos_
Definition: linesetposinfo.h:62
A Pos::IdxPairValueSet with BinIDs.
Definition: binidvalset.h:23
TypeSet< LineTrcDistStats > trcdiststatsperlines_
Definition: linesetposinfo.h:88
BufferString lnm_
Definition: linesetposinfo.h:46
IR()
Definition: linesetposinfo.h:43
void deepErase(ObjectSet< T > &os)
empty the ObjectSet deleting all objects pointed to.
Definition: objectset.h:118

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