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

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