OpendTect-6_4  6.4
transform.h
Go to the documentation of this file.
1 #ifndef transform_h
2 #define transform_h
3 
4 /*+
5 ________________________________________________________________________
6 
7  (C) dGB Beheer B.V.; (LICENSE) http://opendtect.org/OpendTect_license.txt
8  Author: Kristofer Tingdahl
9  Date: 10-12-1999
10  RCS: $Id$
11 ________________________________________________________________________
12 
13 
14 -*/
15 
16 #include "algomod.h"
17 #include "task.h"
18 #include "sets.h"
19 #include "odcomplex.h"
20 
21 class ArrayNDInfo;
22 template <class T> class ArrayND;
23 
24 
32 {
33 public:
35  bool setInputInfo(const ArrayNDInfo&);
36  const ArrayNDInfo& getInputInfo() const;
37 
38  void setInput(const float*);
39  void setInput(const float_complex*);
40  void setOutput(float*);
41  void setOutput(float_complex*);
42 
43  void setSampling(int);
44  void setScope(int nr,int batchsampling);
48  void setScope(int nr,const int* batchstarts);
53  bool setDir(bool forward);
54  bool getDir() const { return forward_; }
55  //true for forward
56  bool run(bool parallel);
57  //SequentialTask::execute can be used as well
58 
60 protected:
61  virtual bool setup();
62  int nextStep();
63 
64  class Transform1D;
65  virtual Transform1D* createTransform() const = 0;
66 
70 
71  bool forward_;
72  int sampling_;
74  const int* batchstarts_;
75  int nr_;
76 
78  int curdim_;
79  bool parallel_;
80 
82  const float* rinput_;
84  float* routput_;
85 
87  {
88  public:
89  virtual ~Transform1D() {}
90  void setInputData(const float_complex*);
91  void setInputData(const float*);
92  void setOutputData(float_complex*);
93  void setOutputData(float*);
94 
95  void setSize(int);
96  void setDir(bool forward);
97  void setSampling(int);
99  void setScope(int nr,int batchsampling);
103  void setScope(int nr,const int* batchstarts);
108  virtual bool init() { return true; }
109  virtual bool run(bool parallel) = 0;
110 
111  protected:
112 
113  Transform1D();
114 
115  int sz_;
116  bool forward_;
118  int nr_;
120  const int* batchstarts_;
121 
123  const float* rinput_;
125  float* routput_;
126  };
127 };
128 
129 #endif
virtual bool init()
Definition: transform.h:108
#define mExpClass(module)
Definition: commondefs.h:160
bool parallel_
Definition: transform.h:79
int batchsampling_
Definition: transform.h:73
const float_complex * cinput_
Definition: transform.h:122
int batchsampling_
Definition: transform.h:119
int sz_
Definition: transform.h:115
Contains the information about the size of ArrayND, and in what order the data is stored (if accessab...
Definition: arrayndinfo.h:23
float * routput_
Definition: transform.h:84
int nr_
Definition: transform.h:118
Lets any 1D orthogonal transform (GenericTransformND::GenericTransform1D) be extended to ND...
Definition: transform.h:31
int curdim_
Definition: transform.h:78
virtual ~Transform1D()
Definition: transform.h:89
Set of pointers to objects.
Definition: commontypes.h:32
int sampling_
Definition: transform.h:117
The generalization of something (e.g. a computation) where the steps must be done in sequence...
Definition: task.h:124
TypeSet< int > nr1dtransforms_
Definition: transform.h:69
const float * rinput_
Definition: transform.h:123
ObjectSet< Transform1D > transforms_
Definition: transform.h:67
float_complex * coutput_
Definition: transform.h:124
ArrayNDInfo * info_
Definition: transform.h:77
const float_complex * cinput_
Definition: transform.h:81
std::complex< float > float_complex
Definition: odcomplex.h:18
bool forward_
Definition: transform.h:116
const int * batchstarts_
Definition: transform.h:120
ObjectSet< int > transforms1dstarts_
Definition: transform.h:68
An ArrayND is an array with a given number of dimensions and a size.
Definition: arraynd.h:33
Definition: transform.h:86
const float * rinput_
Definition: transform.h:82
const int * batchstarts_
Definition: transform.h:74
int nr_
Definition: transform.h:75
float * routput_
Definition: transform.h:125
int sampling_
Definition: transform.h:72
float_complex * coutput_
Definition: transform.h:83
bool forward_
Definition: transform.h:71
bool getDir() const
Definition: transform.h:54

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