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

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