DGtal
1.5.beta
|
Aim: From a point predicate (model of concepts::CPointPredicate), this class constructs another point predicate as a noisy version of the input one. More...
#include <DGtal/geometry/volumes/KanungoNoise.h>
Public Types | |
typedef TPointPredicate | PointPredicate |
Object type. More... | |
typedef TDomain::Point | Point |
Point type. More... | |
typedef TDomain | Domain |
Domain type. More... | |
typedef TDigitalSetContainer | DigitalSet |
DigitalSet type. More... | |
Public Member Functions | |
BOOST_CONCEPT_ASSERT ((concepts::CDomain< TDomain >)) | |
Concept checks. More... | |
BOOST_CONCEPT_ASSERT ((concepts::CPointPredicate< TPointPredicate >)) | |
BOOST_CONCEPT_ASSERT ((concepts::CDigitalSet< TDigitalSetContainer >)) | |
KanungoNoise (ConstAlias< PointPredicate > aPredicate, ConstAlias< Domain > aDomain, const double anAlpha) | |
~KanungoNoise () | |
KanungoNoise & | operator= (const KanungoNoise &other) |
bool | operator() (const Point &aPoint) const |
void | selfDisplay (std::ostream &out) const |
bool | isValid () const |
Protected Member Functions | |
KanungoNoise () | |
Private Member Functions | |
KanungoNoise (const KanungoNoise &other) | |
Private Attributes | |
const PointPredicate & | myPredicate |
Pointeur to the object. More... | |
DigitalSet * | mySet |
Explicit set to store the noisfied object points. More... | |
const Domain & | myDomain |
Pointeur to the domain. More... | |
double | myAlpha |
Noise parameter. More... | |
Aim: From a point predicate (model of concepts::CPointPredicate), this class constructs another point predicate as a noisy version of the input one.
Description of template class 'KanungoNoise'
The noise model used here, called Kanungo noise, can be defined as follows: for each point on a domain, we compute the distance \( d \) to the "border" of the point predicate (see below) and the point label (true/false) is reverted with probability:
\[ \alpha^d \]
for \( 0< \alpha < 1\) specified at construction step.
TPointPredicate | any model of point predicate concept (concepts::CPointPredicate) |
TDomain | any model of CDomain |
TDigitalSetContainer | container type to store the point predicate (default: DigitalSetBySTLSet) |
Definition at line 84 of file KanungoNoise.h.
typedef TDigitalSetContainer DGtal::KanungoNoise< TPointPredicate, TDomain, TDigitalSetContainer >::DigitalSet |
DigitalSet type.
Definition at line 104 of file KanungoNoise.h.
typedef TDomain DGtal::KanungoNoise< TPointPredicate, TDomain, TDigitalSetContainer >::Domain |
Domain type.
Definition at line 101 of file KanungoNoise.h.
typedef TDomain::Point DGtal::KanungoNoise< TPointPredicate, TDomain, TDigitalSetContainer >::Point |
Point type.
Definition at line 98 of file KanungoNoise.h.
typedef TPointPredicate DGtal::KanungoNoise< TPointPredicate, TDomain, TDigitalSetContainer >::PointPredicate |
Object type.
Definition at line 95 of file KanungoNoise.h.
DGtal::KanungoNoise< TPointPredicate, TDomain, TDigitalSetContainer >::KanungoNoise | ( | ConstAlias< PointPredicate > | aPredicate, |
ConstAlias< Domain > | aDomain, | ||
const double | anAlpha | ||
) |
Constructor. This constructor will compute the distance transformations and the explicit noisy point predicate as a digitalset.
aPredicate | input point predicate defining the input objects. |
aDomain | domain used for the distance transformation computation. |
anAlpha | noise parameter between ]0,1[. |
DGtal::KanungoNoise< TPointPredicate, TDomain, TDigitalSetContainer >::~KanungoNoise | ( | ) |
Destructor.
|
protected |
Constructor. Forbidden by default (protected to avoid g++ warnings).
|
private |
Copy constructor.
other | the object to clone. Forbidden by default. |
DGtal::KanungoNoise< TPointPredicate, TDomain, TDigitalSetContainer >::BOOST_CONCEPT_ASSERT | ( | (concepts::CDigitalSet< TDigitalSetContainer >) | ) |
DGtal::KanungoNoise< TPointPredicate, TDomain, TDigitalSetContainer >::BOOST_CONCEPT_ASSERT | ( | (concepts::CDomain< TDomain >) | ) |
Concept checks.
DGtal::KanungoNoise< TPointPredicate, TDomain, TDigitalSetContainer >::BOOST_CONCEPT_ASSERT | ( | (concepts::CPointPredicate< TPointPredicate >) | ) |
bool DGtal::KanungoNoise< TPointPredicate, TDomain, TDigitalSetContainer >::isValid | ( | ) | const |
Checks the validity/consistency of the object.
bool DGtal::KanungoNoise< TPointPredicate, TDomain, TDigitalSetContainer >::operator() | ( | const Point & | aPoint | ) | const |
PointPredicate concept method.
aPoint | point to probe the predicate at. |
KanungoNoise& DGtal::KanungoNoise< TPointPredicate, TDomain, TDigitalSetContainer >::operator= | ( | const KanungoNoise< TPointPredicate, TDomain, TDigitalSetContainer > & | other | ) |
Assignment.
other | the object to copy. |
void DGtal::KanungoNoise< TPointPredicate, TDomain, TDigitalSetContainer >::selfDisplay | ( | std::ostream & | out | ) | const |
Writes/Displays the object on an output stream.
out | the output stream where the object is written. |
|
private |
Noise parameter.
Definition at line 187 of file KanungoNoise.h.
|
private |
Pointeur to the domain.
Definition at line 184 of file KanungoNoise.h.
|
private |
Pointeur to the object.
Definition at line 178 of file KanungoNoise.h.
|
private |
Explicit set to store the noisfied object points.
Definition at line 181 of file KanungoNoise.h.