OpendTect-6_4  6.4
houghtransform.h
Go to the documentation of this file.
1 #ifndef houghtransform_h
2 #define houghtransform_h
3 /*
4 ________________________________________________________________________
5 
6  (C) dGB Beheer B.V.; (LICENSE) http://opendtect.org/OpendTect_license.txt
7  Author: N. Fredman
8  Date: 18-12-2002
9  RCS: $Id$
10 ________________________________________________________________________
11 
12 */
13 
14 
15 #include "algomod.h"
16 #include "threadlock.h"
17 #include "arrayndimpl.h"
18 #include "ranges.h"
19 
20 class Array3DInfo;
21 template <class T> class Array3D;
22 class SequentialTask;
23 template <class T, class B> class TopList;
24 class PlaneFrom3DSpaceHoughTransformTask;
25 class Plane3;
26 
46 {
47 public:
48  PlaneFrom3DSpaceHoughTransform();
49  virtual ~PlaneFrom3DSpaceHoughTransform();
50 
51  void setResolution( double dangle,
52  int distsize );
58  int getParamSpaceSize() const;
59  int getNrDistVals() const;
60 
61  void setClipRate( float );
67  float clipRate() const;
68 
69  void setData( const Array3D<float>* );
70  ObjectSet<SequentialTask>* createCalculators();
71 
73  sortParamSpace(int) const;
82  Plane3 getPlane( int plane ) const;
87  int getNrPointsAfterClip() const;
94 protected:
95  void incParamPos( int normal, double dist );
96  float cliprate_;
99 
101  double deltadist_;
103  friend class ::PlaneFrom3DSpaceHoughTransformTask;
104 
106 };
107 
108 
114 {
115 public:
116  LineFrom2DSpaceHoughTransform(
117  const Array2D<float>&);
118  ~LineFrom2DSpaceHoughTransform();
119 
120  bool compute();
121 
122  void setThreshold(float val,bool above_val);
123  /*<Make hough array based on above/below val.*/
124  void setLineAngleRange(Interval<float>rg);
125  /*<rg is between 0-PI in radian.*/
126  void setTopList(int nr) { toplistnr_ = nr; }
127  /*<nr is the number of top confident lines.*/
128  Array2D<unsigned char>* getResult() const { return result_; }
129  /*<0/1 array, 1 means on a line. */
130 
131 //protected:
132 
133  bool setLineFlag(float radius,float theta);
134 
139 
140  float threshold_;
144 };
145 
146 
147 #endif
#define mExpClass(module)
Definition: commondefs.h:160
Array2D< unsigned int > * paramspace_
Definition: houghtransform.h:100
Array2D< int > * hougharr_
Definition: houghtransform.h:137
A lock of a type that (hopefully) suits your needs. To use it, you need the Locker class...
Definition: threadlock.h:53
Array3DInfo * datainfo_
Definition: houghtransform.h:98
Finds planes in Array3D<float>&#39;s regions with high values. All positions in the array above a thresho...
Definition: houghtransform.h:45
Contains the information about the size of Array3D, and in what order the data is stored (if accessab...
Definition: arrayndinfo.h:118
double deltadist_
Definition: houghtransform.h:101
TypeSet< Coord3 > * normals_
Definition: houghtransform.h:102
Array2D< int > * origcnt_
Definition: houghtransform.h:136
A Plane3 is a plane in space, with the equation: Ax + By + Cz + D = 0.
Definition: trigonometry.h:484
Is a class that holds a "top N" list with the N highest (or lowest) values that is added...
Definition: houghtransform.h:23
int toplistnr_
Definition: houghtransform.h:142
Threads::Lock paramspacelock_
Definition: houghtransform.h:105
The generalization of something (e.g. a computation) where the steps must be done in sequence...
Definition: task.h:124
Finds lines in Array2D<float>&#39;s regions with high values.
Definition: houghtransform.h:113
Array2D< unsigned char > * result_
Definition: houghtransform.h:138
float cliprate_
Definition: houghtransform.h:96
Interval< float > anglerg_
Definition: houghtransform.h:143
float threshold_
Definition: houghtransform.h:140
const Array2D< float > & input_
Definition: houghtransform.h:135
TypeSet< unsigned int > calcpositions_
Definition: houghtransform.h:97
Array2D< unsigned char > * getResult() const
Definition: houghtransform.h:128
Coord3 normal() const
Definition: trigonometry.h:512
bool abovethreshold_
Definition: houghtransform.h:141
void setTopList(int nr)
Definition: houghtransform.h:126
Array3D ( Subclass of ArrayND ) is a three dimensional array.
Definition: arraynd.h:153

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