OpendTect  6.3
interpollayermodel.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: Nanne Hemstra
8  Date: January 2014
9 ________________________________________________________________________
10 
11 -*/
12 
13 
14 #include "algomod.h"
15 #include "trckeyzsampling.h"
16 #include "factory.h"
17 #include "typeset.h"
18 
19 class TaskRunner;
20 
22 {
23 public:
24  mDefineFactoryInClass(InterpolationLayerModel,factory)
25  virtual ~InterpolationLayerModel();
26 
27  virtual InterpolationLayerModel* clone() const = 0;
28 
29  virtual bool isOK(const TrcKey* tk=0) const;
30 
31  virtual bool prepare(const TrcKeyZSampling&,TaskRunner* =0);
32  virtual void addSampling(const TrcKeySampling&);
33  virtual od_int64 getMemoryUsage(const TrcKeySampling&) const;
37  virtual float getLayerIndex(const TrcKey&,float z) const = 0;
38  virtual float getInterpolatedZ(const TrcKey&,float layer) const;
39 
40  bool modelHasTop() const;
41  bool modelHasBottom() const;
42 
43  static const char* sKeyModelType();
44 
45  virtual void fillPar(IOPar&) const;
46  virtual bool usePar(const IOPar&) { return true; }
47 
48 protected:
49  InterpolationLayerModel();
50  InterpolationLayerModel(const InterpolationLayerModel&);
51 
52  virtual bool hasSampling() const;
53 
56 
57 private:
58 
59  virtual int nrLayers() const = 0;
60  virtual float getZ(const TrcKey&,int layer) const = 0;
61 };
62 
63 
66 public:
68  InterpolationLayerModel,
70  "ZSlices",
71  tr("Z Slices"))
72 
73 protected:
77 
78 private:
79 
80  InterpolationLayerModel* clone() const;
81 
82  bool isOK(const TrcKey* tk=0) const;
83 
84  int nrLayers() const;
85  float getLayerIndex(const TrcKey&,float z) const;
86  float getZ(const TrcKey&,int layer) const;
88  { return 0; }
89 
90 };
#define mExpClass(module)
Definition: commondefs.h:157
virtual bool usePar(const IOPar &)
Definition: interpollayermodel.h:46
#define mODTextTranslationClass(clss)
Definition: uistring.h:37
od_int64 getMemoryUsage(const TrcKeySampling &) const
Definition: interpollayermodel.h:87
Definition: interpollayermodel.h:64
#define od_int64
Definition: plftypes.h:34
#define mDefaultFactoryInstantiation(baseclss, clss, keywrd, usernm)
Definition: factory.h:287
Definition: interpollayermodel.h:21
ObjectSet< TrcKeySampling > tkss_
Definition: interpollayermodel.h:54
Generalized set of parameters of the keyword-value type.
Definition: iopar.h:53
Class that can execute a task.
Definition: task.h:193
Horizontal sampling (inline and crossline range and steps).
Definition: trckeysampling.h:25
Hor+Vert sampling in 3D surveys.
Definition: trckeyzsampling.h:32
#define mDefineFactoryInClass(T, funcname)
Definition: factory.h:424
void fillPar(IOPar &iop, const ODPolygon< T > &poly, const char *inpkey)
Definition: polygon.h:187
ZSampling zsamp_
Definition: interpollayermodel.h:55
Represents a unique trace position in one of the surveys that OpendTect is managing.
Definition: trckey.h:26

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