OpendTect  6.3
transform.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: Kristofer Tingdahl
8  Date: 10-12-1999
9 ________________________________________________________________________
10 
11 
12 -*/
13 
14 #include "algomod.h"
15 #include "task.h"
16 #include "sets.h"
17 #include "odcomplex.h"
18 
19 class ArrayNDInfo;
20 template <class T> class ArrayND;
21 
22 
30 {
31 public:
33  bool setInputInfo(const ArrayNDInfo&);
34  const ArrayNDInfo& getInputInfo() const;
35 
36  void setInput(const float*);
37  void setInput(const float_complex*);
38  void setOutput(float*);
39  void setOutput(float_complex*);
40 
41  void setSampling(int);
42  void setScope(int nr,int batchsampling);
46  void setScope(int nr,const int* batchstarts);
51  bool setDir(bool forward);
52  bool getDir() const { return forward_; }
53  //true for forward
54  bool run(bool parallel);
55  //SequentialTask::execute can be used as well
56 
58 protected:
59  virtual bool setup();
60  int nextStep();
61 
62  class Transform1D;
63  virtual Transform1D* createTransform() const = 0;
64 
68 
69  bool forward_;
70  int sampling_;
72  const int* batchstarts_;
73  int nr_;
74 
76  int curdim_;
77  bool parallel_;
78 
80  const float* rinput_;
82  float* routput_;
83 
85  {
86  public:
87  virtual ~Transform1D() {}
88  void setInputData(const float_complex*);
89  void setInputData(const float*);
90  void setOutputData(float_complex*);
91  void setOutputData(float*);
92 
93  void setSize(int);
94  void setDir(bool forward);
95  void setSampling(int);
97  void setScope(int nr,int batchsampling);
101  void setScope(int nr,const int* batchstarts);
106  virtual bool init() { return true; }
107  virtual bool run(bool parallel) = 0;
108 
109  protected:
110 
111  Transform1D();
112 
113  int sz_;
114  bool forward_;
116  int nr_;
118  const int* batchstarts_;
119 
121  const float* rinput_;
123  float* routput_;
124  };
125 };
virtual bool init()
Definition: transform.h:106
#define mExpClass(module)
Definition: commondefs.h:157
bool parallel_
Definition: transform.h:77
int batchsampling_
Definition: transform.h:71
const float_complex * cinput_
Definition: transform.h:120
int batchsampling_
Definition: transform.h:117
int sz_
Definition: transform.h:113
Contains the information about the size of ArrayND, and in what order the data is stored (if accessab...
Definition: arrayndinfo.h:21
float * routput_
Definition: transform.h:82
int nr_
Definition: transform.h:116
Lets any 1D orthogonal transform (GenericTransformND::GenericTransform1D) be extended to ND...
Definition: transform.h:29
int curdim_
Definition: transform.h:76
virtual ~Transform1D()
Definition: transform.h:87
Set of pointers to objects.
Definition: commontypes.h:28
int sampling_
Definition: transform.h:115
The generalization of something (e.g. a computation) where the steps must be done in sequence...
Definition: task.h:147
TypeSet< int > nr1dtransforms_
Definition: transform.h:67
const float * rinput_
Definition: transform.h:121
ObjectSet< Transform1D > transforms_
Definition: transform.h:65
float_complex * coutput_
Definition: transform.h:122
ArrayNDInfo * info_
Definition: transform.h:75
const float_complex * cinput_
Definition: transform.h:79
std::complex< float > float_complex
Definition: odcomplex.h:16
bool forward_
Definition: transform.h:114
const int * batchstarts_
Definition: transform.h:118
ObjectSet< int > transforms1dstarts_
Definition: transform.h:66
An ArrayND is an array with a given number of dimensions and a size.
Definition: arraynd.h:29
Definition: transform.h:84
const float * rinput_
Definition: transform.h:80
const int * batchstarts_
Definition: transform.h:72
int nr_
Definition: transform.h:73
float * routput_
Definition: transform.h:123
int sampling_
Definition: transform.h:70
float_complex * coutput_
Definition: transform.h:81
bool forward_
Definition: transform.h:69
bool getDir() const
Definition: transform.h:52

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