OpendTect-6_4  6.4
volprocchain.h
Go to the documentation of this file.
1 #ifndef volprocchain_h
2 #define volprocchain_h
3 
4 /*+
5 ________________________________________________________________________
6 
7  (C) dGB Beheer B.V.; (LICENSE) http://opendtect.org/OpendTect_license.txt
8  Author: K. Tingdahl
9  Date: October 2006
10  RCS: $Id$
11 ________________________________________________________________________
12 
13 
14 -*/
15 
16 #include "volumeprocessingmod.h"
17 #include "volprocstep.h"
18 #include "multiid.h"
19 #include "refcount.h"
20 #include "threadlock.h"
21 
22 class Scaler;
23 
24 namespace VolProc
25 {
26 
29 mExpClass(VolumeProcessing) Chain
30 { mRefCountImpl(Chain); mODTextTranslationClass(Chain);
31 public:
32  Chain();
33 
34  mExpClass(VolumeProcessing) Connection
35  {
36  public:
37  Connection( Step::ID outpstep=Step::cUndefID(),
39  Step::ID inpstep=Step::cUndefID(),
41 
42  bool isUdf() const;
43  bool operator==(const Connection&) const;
44  bool operator!=(const Connection&) const;
45 
46  void fillPar(IOPar&,const char* key) const;
47  bool usePar(const IOPar&,const char* key);
48 
52 
56  };
57 
58  mExpClass(VolumeProcessing) Web
59  {
60  public:
61  bool addConnection(const Connection&);
62  void removeConnection(const Connection&);
63  void getConnections(Step::ID,bool input,
64  TypeSet<Connection>&) const;
69  { return connections_; }
71  { return connections_; }
72  private:
74  };
75 
76  bool addConnection(const Connection&);
77  void removeConnection(const Connection&);
78  void updateConnections();
79  const Web& getWeb() const { return web_; }
80 
81  void setZStep( float z, bool zist )
82  { zstep_=z; zist_ = zist; }
83  float getZStep() const { return zstep_; }
84  bool zIsT() const { return zist_; }
85 
86  int nrSteps() const;
87  Step* getStep(int);
88  Step* getStepFromName(const char*);
89  const Step* getStepFromName(const char*) const;
90  Step* getStepFromID(Step::ID);
91  const Step* getStepFromID(Step::ID) const;
92  int indexOf(const Step*) const;
93  void addStep(Step*);
94  void insertStep(int,Step*);
95  void swapSteps(int,int);
96  void removeStep(int);
97  const ObjectSet<Step>& getSteps() const { return steps_; }
98  int getNrUsers(Step::ID,Step::InputSlotID) const;
99 
100  bool setOutputSlot(Step::ID,Step::OutputSlotID);
101  void setOutputScalers(const ObjectSet<Scaler>&);
102  const ObjectSet<Scaler>& getOutputScalers() const;
103 
104  const VelocityDesc* getVelDesc() const;
105 
106  void fillPar(IOPar&) const;
107  bool usePar(const IOPar&);
108 
109  void setStorageID(const MultiID& mid);
110  const MultiID& storageID() const { return storageid_; }
111  uiString name() const;
112 
113  bool areSamplesIndependent() const;
114  bool needsFullVolume() const;
115  uiString errMsg() const;
116 
117  Step::ID getNewStepID() { return freeid_++; }
118 
119 private:
120 
121  friend class ChainExecutor;
122 
123  bool validConnection(const Connection&) const;
124 
125  static const char* sKeyNrSteps() { return "Nr Steps"; }
126  static const char* sKeyStepType() { return "Type"; }
127  static const char* sKeyNrConnections() { return "Nr Connections"; }
128  static const char* sKeyConnection(int idx,BufferString&);
129 
132 
136 
137  float zstep_;
138  bool zist_;
139 
143 
144 };
145 
146 } // namespace VolProc
147 
148 #include "volprocchainexec.h" // this include will go after 6.0
149 
150 #endif
#define mRefCountImpl(ClassName)
Macro to setup a class with destructor for reference counting.
Definition: refcount.h:163
#define mExpClass(module)
Definition: commondefs.h:160
void setZStep(float z, bool zist)
Definition: volprocchain.h:81
bool operator==(const ArrayNDInfo &a1, const ArrayNDInfo &a2)
Definition: arrayndinfo.h:53
ObjectSet< Scaler > outcompscalers_
Definition: volprocchain.h:142
#define mODTextTranslationClass(clss)
Definition: uistring.h:38
Step::ID outputstepid_
Step that is sending data.
Definition: volprocchain.h:54
Definition: veldesc.h:38
void usePar(const IOPar &iop, ODPolygon< T > &poly, const char *inpkey)
Definition: polygon.h:188
Web web_
Definition: volprocchain.h:135
Step::OutputSlotID outputslotid_
Definition: volprocchain.h:131
bool zIsT() const
Definition: volprocchain.h:84
static const char * sKeyNrConnections()
Definition: volprocchain.h:127
float getZStep() const
Definition: volprocchain.h:83
Definition: uistring.h:89
int InputSlotID
Definition: volprocstep.h:46
ObjectSet< T >::size_type indexOf(const ObjectSet< T > &os, const S &val)
Locate object in set.
Definition: objectset.h:169
TypeSet< Connection > connections_
Definition: volprocchain.h:73
static const char * sKeyStepType()
Definition: volprocchain.h:126
Definition: volprocchain.h:58
static int cUndefSlotID()
Definition: volprocstep.h:49
Set of pointers to objects.
Definition: commontypes.h:32
Set of (small) copyable elements.
Definition: commontypes.h:30
Generalized set of parameters of the keyword-value type.
Definition: iopar.h:47
A chain of Steps that can be applied to a volume of scalars.
Definition: volprocchain.h:29
const TypeSet< Connection > & getConnections() const
Definition: volprocchain.h:70
Threads::Atomic< int > freeid_
Definition: volprocchain.h:141
Adapter for a VolProc chain to external attribute calculation.
Definition: seisdatapackwriter.h:25
const Web & getWeb() const
Definition: volprocchain.h:79
int OutputSlotID
Definition: volprocstep.h:47
const ObjectSet< Step > & getSteps() const
Definition: volprocchain.h:97
int ID
Definition: volprocstep.h:45
static ID cUndefID()
Definition: volprocstep.h:48
bool operator!=(const ArrayNDInfo &a1, const ArrayNDInfo &a2)
Definition: arrayndinfo.h:62
Scaling of floating point numbers.
Definition: scaler.h:33
TypeSet< Connection > & getConnections()
Definition: volprocchain.h:68
void fillPar(IOPar &iop, const ODPolygon< T > &poly, const char *inpkey)
Definition: polygon.h:175
executes the work for a single VolProc::Chain.
Definition: volprocchainexec.h:27
ObjectSet< Step > steps_
Definition: volprocchain.h:134
An algorithm/calculation/transformation that takes one scalar volume as input, processes it...
Definition: volprocstep.h:42
Definition: volprocchain.h:34
OD::String with its own variable length buffer. The buffer has a guaranteed minimum size...
Definition: bufstring.h:40
static const char * sKeyNrSteps()
Definition: volprocchain.h:125
const MultiID & storageID() const
Definition: volprocchain.h:110
bool zist_
Definition: volprocchain.h:138
const char * errMsg() const
Definition: horizontracker.h:61
float zstep_
Definition: volprocchain.h:137
FixedString Chain()
Definition: keystrs.h:45
Step::InputSlotID inputslotid_
Definition: volprocchain.h:51
Step::OutputSlotID outputslotid_
Definition: volprocchain.h:55
Step::ID inputstepid_
Step that is receiving data.
Definition: volprocchain.h:50
bool isUdf(const T &t)
Definition: undefval.h:243
Step::ID getNewStepID()
Definition: volprocchain.h:117
MultiID storageid_
Definition: volprocchain.h:133
Compound key consisting of ints.
Definition: multiid.h:25
uiString errmsg_
Definition: volprocchain.h:140
Step::ID outputstepid_
Definition: volprocchain.h:130

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