OpendTect-6_4  6.4
stratlayersequence.h
Go to the documentation of this file.
1 #ifndef stratlayersequence_h
2 #define stratlayersequence_h
3 
4 /*+
5 ________________________________________________________________________
6 
7  (C) dGB Beheer B.V.; (LICENSE) http://opendtect.org/OpendTect_license.txt
8  Author: Bert Bril
9  Date: Oct 2010
10  RCS: $Id$
11 ________________________________________________________________________
12 
13 
14 -*/
15 
16 #include "stratmod.h"
17 #include "ailayer.h"
18 #include "stratlayer.h"
19 #include "propertyref.h"
20 
22 
23 namespace Strat
24 {
25 class Layer;
26 class Level;
27 class UnitRef;
28 class RefTree;
29 
37 {
38 public:
39 
40  LayerSequence(const PropertyRefSelection* prs=0);
41  LayerSequence( const LayerSequence& ls )
42  { *this = ls; }
43  virtual ~LayerSequence();
44  LayerSequence& operator =(const LayerSequence&);
45  bool isEmpty() const { return layers_.isEmpty(); }
46  void setEmpty() { deepErase(layers_); }
47 
48  int size() const { return layers_.size(); }
49  ObjectSet<Layer>& layers() { return layers_; }
50  const ObjectSet<Layer>& layers() const { return layers_; }
51  int layerIdxAtZ(float) const;
52  int nearestLayerIdxAtZ(float z) const;
54 
55  float startDepth() const { return z0_; }
56  void setStartDepth( float z ) { z0_ = z; prepareUse(); }
57  Interval<float> zRange() const;
58  void setXPos(float);
59 
60  PropertyRefSelection& propertyRefs() { return props_; }
61  const PropertyRefSelection& propertyRefs() const { return props_; }
62 
63  void getLayersFor( const UnitRef* ur, ObjectSet<Layer>& lys )
64  { return getLayersFor(ur,(ObjectSet<const Layer>&)lys);}
65  void getLayersFor(const UnitRef*,
66  ObjectSet<const Layer>&) const;
67  void getSequencePart(const Interval<float>& depthrg,
68  bool cropfirstlast,
69  LayerSequence&) const;
72  const RefTree& refTree() const;
73 
74  void prepareUse() const ;
75 
76  // Following will need to actually find the level
77  int indexOf(const Level&,int startsearchat=0) const;
79  float depthOf(const Level&) const;
81 
82  // Following will give the position of the level
83  // ... even if not present
84  int positionOf(const Level&) const;
87  float depthPositionOf(const Level&) const;
88 
89 protected:
90 
92  float z0_;
94 
95 };
96 
97 
98 }; // namespace Strat
99 
100 #endif
#define mExpClass(module)
Definition: commondefs.h:160
PropertyRefSelection & propertyRefs()
Definition: stratlayersequence.h:60
int size() const
Definition: stratlayersequence.h:48
Definition: propertyref.h:176
User parameters to compute values for an elastic layer (den,p/s-waves).
Definition: elasticpropsel.h:25
LayerSequence(const LayerSequence &ls)
Definition: stratlayersequence.h:41
A sequence of layers.
Definition: stratlayersequence.h:36
FixedString Level()
Definition: keystrs.h:78
bool isEmpty() const
Definition: stratlayersequence.h:45
PropertyRefSelection props_
Definition: stratlayersequence.h:93
ObjectSet< T >::size_type indexOf(const ObjectSet< T > &os, const S &val)
Locate object in set.
Definition: objectset.h:169
ObjectSet< Layer > layers_
Definition: stratlayersequence.h:91
Set of pointers to objects.
Definition: commontypes.h:32
Stratigraphic level.
Definition: stratlevel.h:42
void setStartDepth(float z)
Definition: stratlayersequence.h:56
ObjectSet< Layer > & layers()
Definition: stratlayersequence.h:49
float z0_
Definition: stratlayersequence.h:92
float startDepth() const
Definition: stratlayersequence.h:55
Reference data for a stratigraphic unit.
Definition: stratunitref.h:38
const ObjectSet< Layer > & layers() const
Definition: stratlayersequence.h:50
void getLayersFor(const UnitRef *ur, ObjectSet< Layer > &lys)
Definition: stratlayersequence.h:63
Stratigraphy.
Definition: stratlevel.h:26
void setEmpty()
Definition: stratlayersequence.h:46
Tree of UnitRef&#39;s.
Definition: stratreftree.h:29
const PropertyRefSelection & propertyRefs() const
Definition: stratlayersequence.h:61
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