OpendTect  6.3
stratlayersequence.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: Bert Bril
8  Date: Oct 2010
9 ________________________________________________________________________
10 
11 
12 -*/
13 
14 #include "stratmod.h"
15 #include "ailayer.h"
16 #include "stratlayer.h"
17 #include "propertyref.h"
18 
20 
21 namespace Strat
22 {
23 class Layer;
24 class Level;
25 class UnitRef;
26 class RefTree;
27 
35 {
36 public:
37 
38  LayerSequence(const PropertyRefSelection* prs=0);
39  LayerSequence( const LayerSequence& ls )
40  { *this = ls; }
41  virtual ~LayerSequence();
42  LayerSequence& operator =(const LayerSequence&);
43  bool isEmpty() const { return layers_.isEmpty(); }
44  void setEmpty() { deepErase(layers_); }
45 
46  int size() const { return layers_.size(); }
47  ObjectSet<Layer>& layers() { return layers_; }
48  const ObjectSet<Layer>& layers() const { return layers_; }
49  int layerIdxAtZ(float) const;
50  int nearestLayerIdxAtZ(float z) const;
52 
53  float startDepth() const { return z0_; }
54  void setStartDepth( float z ) { z0_ = z; prepareUse(); }
55  Interval<float> zRange() const;
56  void setXPos(float);
57 
58  PropertyRefSelection& propertyRefs() { return props_; }
59  const PropertyRefSelection& propertyRefs() const { return props_; }
60 
61  void getLayersFor( const UnitRef* ur, ObjectSet<Layer>& lys )
62  { return getLayersFor(ur,(ObjectSet<const Layer>&)lys);}
63  void getLayersFor(const UnitRef*,
64  ObjectSet<const Layer>&) const;
65  void getSequencePart(const Interval<float>& depthrg,
66  bool cropfirstlast,
67  LayerSequence&) const;
70  const RefTree& refTree() const;
71 
72  void prepareUse() const ;
73 
74  // Following will need to actually find the level
75  int indexOf(const Level&,int startsearchat=0) const;
77  float depthOf(const Level&) const;
79 
80  // Following will give the position of the level
81  // ... even if not present
82  int positionOf(const Level&) const;
85  float depthPositionOf(const Level&) const;
86 
87 protected:
88 
90  float z0_;
92 
93 };
94 
95 
96 }; // namespace Strat
#define mExpClass(module)
Definition: commondefs.h:157
PropertyRefSelection & propertyRefs()
Definition: stratlayersequence.h:58
int size() const
Definition: stratlayersequence.h:46
Definition: propertyref.h:174
User parameters to compute values for an elastic layer (den,p/s-waves).
Definition: elasticpropsel.h:23
LayerSequence(const LayerSequence &ls)
Definition: stratlayersequence.h:39
A sequence of layers.
Definition: stratlayersequence.h:34
FixedString Level()
Definition: keystrs.h:78
bool isEmpty() const
Definition: stratlayersequence.h:43
PropertyRefSelection props_
Definition: stratlayersequence.h:91
ObjectSet< T >::size_type indexOf(const ObjectSet< T > &os, const S &val)
Locate object in set.
Definition: objectset.h:173
ObjectSet< Layer > layers_
Definition: stratlayersequence.h:89
Set of pointers to objects.
Definition: commontypes.h:28
Stratigraphic level.
Definition: stratlevel.h:35
void setStartDepth(float z)
Definition: stratlayersequence.h:54
ObjectSet< Layer > & layers()
Definition: stratlayersequence.h:47
float z0_
Definition: stratlayersequence.h:90
float startDepth() const
Definition: stratlayersequence.h:53
Reference data for a stratigraphic unit.
Definition: stratunitref.h:36
const ObjectSet< Layer > & layers() const
Definition: stratlayersequence.h:48
void getLayersFor(const UnitRef *ur, ObjectSet< Layer > &lys)
Definition: stratlayersequence.h:61
Stratigraphy.
Definition: stratlevel.h:25
void setEmpty()
Definition: stratlayersequence.h:44
Tree of UnitRef&#39;s.
Definition: stratreftree.h:27
const PropertyRefSelection & propertyRefs() const
Definition: stratlayersequence.h:59
void deepErase(ObjectSet< T > &os)
empty the ObjectSet deleting all objects pointed to.
Definition: objectset.h:122

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