OpendTect-6_4  6.4
volprocsurfacelimitedfiller.h
Go to the documentation of this file.
1 #ifndef volprocsurfacelimitedfiller_h
2 #define volprocsurfacelimitedfiller_h
3 
4 /*+
5 ________________________________________________________________________
6 
7  (C) dGB Beheer B.V.; (LICENSE) http://opendtect.org/OpendTect_license.txt
8  Author: Y.C. Liu
9  Date: April 2010
10  RCS: $Id$
11 ________________________________________________________________________
12 
13 -*/
14 
15 #include "volumeprocessingmod.h"
16 #include "volprocstep.h"
17 #include "multiid.h"
18 
19 namespace Geometry { class FaultStickSurface; }
20 namespace EM { class Fault; class Horizon; class Horizon3D; }
21 
22 namespace VolProc
23 {
24 
34 mExpClass(VolumeProcessing) SurfaceLimitedFiller : public Step
36 public:
38  mDefaultFactoryInstanciationBase( "SurfaceLimitedFiller",
39  tr("Horizon-based painter - Advanced") );
40 
43 
44  bool isOK() const;
45 
46  bool needsInput() const { return false; }
47  bool isInputPrevStep() const { return true; }
48 
49  bool setSurfaces(const TypeSet<MultiID>&,
50  const TypeSet<char>& fillside);
51  /*Assume going down increases z.
52  For horizons, side = 1 if go below, -1 if go above.*/
53 
54  int nrOfSurfaces() const {return side_.size();}
55  char getSurfaceFillSide(int idx) const{ return side_[idx]; }
56  const MultiID* getSurfaceID(int idx) const;
57 
58  //Start value/grid stuff
59  bool usesStartValue() const { return usestartval_; }
60  void useStartValue(bool yn) { usestartval_ = yn; }
61 
62  float getStartValue() const { return fixedstartval_; }
63  void setStartValue(float vel) { fixedstartval_ = vel; }
64 
65  bool setStartValueHorizon(const MultiID*);
66  const MultiID* getStartValueHorizonID() const;
67  int getStartAuxdataIdx() const {return startauxdataselidx_;}
68  void setStartAuxdataIdx(int i) { startauxdataselidx_ = i; }
69 
70  //Gradient value/grid stuff
71  bool usesGradientValue() const { return usegradient_; }
72  void useGradientValue(bool yn) { usegradient_ = yn; }
73 
74  bool isGradientVertical() const { return gradvertical_; }
75  void setGradientVertical(bool yn){ gradvertical_ = yn; }
76 
77  float getGradient() const { return fixedgradient_; }
78  void setGradient(float grd) { fixedgradient_ = grd; }
79 
80  bool setGradientHorizon(const MultiID*);
81  const MultiID* getGradientHorizonID() const;
82  int getGradAuxdataIdx() { return gradauxdataselidx_; }
83  void setGradAuxdataIdx(int i){ gradauxdataselidx_ = i; }
84 
85  //Reference horizon/z stuff
86  bool usesRefZValue() const { return userefz_; }
87  void useRefZValue(bool yn) { userefz_ = yn; }
88 
89  void setRefZValue(float zv) { refz_ = zv; }
90  float getRefZValue() const { return refz_; }
91 
92  bool setRefHorizon(const MultiID*);
93  const MultiID* getRefHorizonID() const;
94 
95  void fillPar(IOPar&) const;
96  bool usePar(const IOPar&);
97  bool useHorInterFillerPar(const IOPar&);
98  virtual uiString errMsg() const { return errmsg_; }
99 
100  void releaseData();
101  bool canInputAndOutputBeSame() const { return true; }
102  bool needsFullVolume() const { return false; }
103  bool canHandle2D() const { return false; }
104 
105  /* mDeprecated (this function will be protected virtual after 6.0) */
106  od_int64 extraMemoryUsage(OutputSlotID,const TrcKeySampling&,
107  const StepInterval<int>&) const;
108 
109  virtual bool areSamplesIndependent() const { return true; }
110 
111 protected:
112 
113  bool prepareComp(int);
114  bool computeBinID(const BinID&, int);
115  EM::Horizon* loadHorizon(const MultiID&) const;
117  int setDataHorizon(const MultiID&,EM::Horizon3D*&,
118  int auxdataidx) const;
119  bool prefersBinIDWise() const { return true; }
120 
121  static const char* sKeySurfaceID() { return "Surface MID"; }
122  static const char* sKeySurfaceFillSide() { return "Surface fill side"; }
123  static const char* sKeyNrSurfaces() { return "Nr of surfaces"; }
124 
125  static const char* sKeyUseStartValue() { return "Use start value"; }
126  static const char* sKeyStartValue() { return "Start value"; }
127  static const char* sKeyStartValHorID() { return "Start value horizon"; }
128  static const char* sKeyStartAuxDataID(){ return "Start auxdata id"; }
129 
130  static const char* sKeyUseGradValue() { return "Use gradient value"; }
131  static const char* sKeyGradValue() { return "Gradient value"; }
132  static const char* sKeyGradHorID() { return "Gradient horizon"; }
133  static const char* sKeyGradAuxDataID() { return "Gradient auxdata id"; }
134  static const char* sKeyGradType() { return "Gradient type"; }
135 
136  static const char* sKeyRefHorID() { return "Reference horizon"; }
137  static const char* sKeyRefZ() { return "Reference z"; }
138  static const char* sKeyUseRefZ() { return "Use reference z"; }
139 
147 
154 
157  float refz_;
158  bool userefz_;
159 
160  /*The following four have the same size, for any idx,
161  faults_[idx] or hors_[idx] is 0. */
166 
168  double valrange_;
169 };
170 
171 } // namespace VolProc
172 
173 #endif
#define mExpClass(module)
Definition: commondefs.h:160
bool canHandle2D() const
Definition: volprocsurfacelimitedfiller.h:103
int startauxidx_
Definition: volprocsurfacelimitedfiller.h:151
bool usesRefZValue() const
Definition: volprocsurfacelimitedfiller.h:86
MultiID starthormid_
Definition: volprocsurfacelimitedfiller.h:148
float getStartValue() const
Definition: volprocsurfacelimitedfiller.h:62
int startauxdataselidx_
Definition: volprocsurfacelimitedfiller.h:150
ObjectSet< EM::Horizon > hors_
Definition: volprocsurfacelimitedfiller.h:164
TypeSet< char > side_
Definition: volprocsurfacelimitedfiller.h:162
float fixedstartval_
Definition: volprocsurfacelimitedfiller.h:152
void useStartValue(bool yn)
Definition: volprocsurfacelimitedfiller.h:60
static const char * sKeyStartValHorID()
Definition: volprocsurfacelimitedfiller.h:127
void setStartAuxdataIdx(int i)
Definition: volprocsurfacelimitedfiller.h:68
static const char * sKeyStartAuxDataID()
Definition: volprocsurfacelimitedfiller.h:128
#define mODTextTranslationClass(clss)
Definition: uistring.h:38
bool usebottomval_
Definition: volprocsurfacelimitedfiller.h:167
bool isInputPrevStep() const
Definition: volprocsurfacelimitedfiller.h:47
#define mDefaultFactoryCreatorImpl(baseclss, clss)
Definition: factory.h:286
float getGradient() const
Definition: volprocsurfacelimitedfiller.h:77
float refz_
Definition: volprocsurfacelimitedfiller.h:157
MultiID gradhormid_
Definition: volprocsurfacelimitedfiller.h:140
float fixedgradient_
Definition: volprocsurfacelimitedfiller.h:144
void usePar(const IOPar &iop, ODPolygon< T > &poly, const char *inpkey)
Definition: polygon.h:188
#define od_int64
Definition: plftypes.h:36
ObjectSet< Geometry::FaultStickSurface > faults_
Definition: volprocsurfacelimitedfiller.h:165
int getStartAuxdataIdx() const
Definition: volprocsurfacelimitedfiller.h:67
EM::Horizon3D * starthorizon_
Definition: volprocsurfacelimitedfiller.h:149
static const char * sKeySurfaceFillSide()
Definition: volprocsurfacelimitedfiller.h:122
float getRefZValue() const
Definition: volprocsurfacelimitedfiller.h:90
EM::Horizon * refhorizon_
Definition: volprocsurfacelimitedfiller.h:156
Definition: uistring.h:89
bool usesStartValue() const
Definition: volprocsurfacelimitedfiller.h:59
static const char * sKeyGradValue()
Definition: volprocsurfacelimitedfiller.h:131
static const char * sKeyNrSurfaces()
Definition: volprocsurfacelimitedfiller.h:123
Definition: volprocsurfacelimitedfiller.h:34
TypeSet< MultiID > surfacelist_
Definition: volprocsurfacelimitedfiller.h:163
void setRefZValue(float zv)
Definition: volprocsurfacelimitedfiller.h:89
static const char * sKeyGradAuxDataID()
Definition: volprocsurfacelimitedfiller.h:133
Generalized set of parameters of the keyword-value type.
Definition: iopar.h:47
int getGradAuxdataIdx()
Definition: volprocsurfacelimitedfiller.h:82
Horizontal sampling (inline and crossline range and steps).
Definition: trckeysampling.h:27
static const char * sKeyRefHorID()
Definition: volprocsurfacelimitedfiller.h:136
void setStartValue(float vel)
Definition: volprocsurfacelimitedfiller.h:63
Adapter for a VolProc chain to external attribute calculation.
Definition: seisdatapackwriter.h:25
#define mDefaultFactoryInstanciationBase(keywrd, usernm)
Definition: factory.h:280
bool prefersBinIDWise() const
Definition: volprocsurfacelimitedfiller.h:119
int OutputSlotID
Definition: volprocstep.h:47
FixedString Horizon()
Definition: keystrs.h:72
double valrange_
Definition: volprocsurfacelimitedfiller.h:168
MultiID refhormid_
Definition: volprocsurfacelimitedfiller.h:155
static const char * sKeySurfaceID()
Definition: volprocsurfacelimitedfiller.h:121
static const char * sKeyGradHorID()
Definition: volprocsurfacelimitedfiller.h:132
static const char * sKeyUseGradValue()
Definition: volprocsurfacelimitedfiller.h:130
void fillPar(IOPar &iop, const ODPolygon< T > &poly, const char *inpkey)
Definition: polygon.h:175
char getSurfaceFillSide(int idx) const
Definition: volprocsurfacelimitedfiller.h:55
bool isGradientVertical() const
Definition: volprocsurfacelimitedfiller.h:74
EM::Horizon3D * gradhorizon_
Definition: volprocsurfacelimitedfiller.h:141
bool usestartval_
Definition: volprocsurfacelimitedfiller.h:153
FixedString Fault()
Definition: keystrs.h:65
An algorithm/calculation/transformation that takes one scalar volume as input, processes it...
Definition: volprocstep.h:42
static const char * sKeyRefZ()
Definition: volprocsurfacelimitedfiller.h:137
int gradauxidx_
Definition: volprocsurfacelimitedfiller.h:143
void useGradientValue(bool yn)
Definition: volprocsurfacelimitedfiller.h:72
virtual bool areSamplesIndependent() const
Definition: volprocsurfacelimitedfiller.h:109
Positioning in a seismic survey: inline/crossline or lineNr/trcNr.
Definition: binid.h:30
BufferString errmsg_
Definition: horizontracker.h:119
bool needsInput() const
Definition: volprocsurfacelimitedfiller.h:46
void setGradient(float grd)
Definition: volprocsurfacelimitedfiller.h:78
Earth Model objects like horizons, faults, fault-sticks and bodies.
Definition: embody.h:25
int gradauxdataselidx_
Definition: volprocsurfacelimitedfiller.h:142
bool gradvertical_
Definition: volprocsurfacelimitedfiller.h:146
virtual uiString errMsg() const
Definition: volprocsurfacelimitedfiller.h:98
void useRefZValue(bool yn)
Definition: volprocsurfacelimitedfiller.h:87
int nrOfSurfaces() const
Definition: volprocsurfacelimitedfiller.h:54
void setGradientVertical(bool yn)
Definition: volprocsurfacelimitedfiller.h:75
3D Horizon. A Horizon is made up of one or more grids (so they can overlap at faults). The grids are defined by knot-points in a matrix and fillstyle in between the knots.
Definition: emhorizon3d.h:96
bool usesGradientValue() const
Definition: volprocsurfacelimitedfiller.h:71
bool userefz_
Definition: volprocsurfacelimitedfiller.h:158
static const char * sKeyUseRefZ()
Definition: volprocsurfacelimitedfiller.h:138
bool canInputAndOutputBeSame() const
Definition: volprocsurfacelimitedfiller.h:101
static const char * sKeyUseStartValue()
Definition: volprocsurfacelimitedfiller.h:125
bool usegradient_
Definition: volprocsurfacelimitedfiller.h:145
Definition: arraytesselator.h:21
static const char * sKeyStartValue()
Definition: volprocsurfacelimitedfiller.h:126
bool needsFullVolume() const
Definition: volprocsurfacelimitedfiller.h:102
Compound key consisting of ints.
Definition: multiid.h:25
Horizon Surface.
Definition: emhorizon.h:47
void setGradAuxdataIdx(int i)
Definition: volprocsurfacelimitedfiller.h:83
static const char * sKeyGradType()
Definition: volprocsurfacelimitedfiller.h:134

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