DGtal  0.9.3beta
Public Types | Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes
DGtal::KanungoNoise< TPointPredicate, TDomain, TDigitalSetContainer > Class Template Reference

#include <DGtal/geometry/volumes/KanungoNoise.h>

Public Types

typedef TPointPredicate PointPredicate
 
typedef TDomain::Point Point
 
typedef TDomain Domain
 
typedef TDigitalSetContainer DigitalSet
 

Public Member Functions

 BOOST_CONCEPT_ASSERT ((concepts::CDomain< TDomain >))
 
 BOOST_CONCEPT_ASSERT ((concepts::CPointPredicate< TPointPredicate >))
 
 BOOST_CONCEPT_ASSERT ((concepts::CDigitalSet< TDigitalSetContainer >))
 
 KanungoNoise (ConstAlias< PointPredicate > aPredicate, ConstAlias< Domain > aDomain, const double anAlpha)
 
 ~KanungoNoise ()
 
KanungoNoiseoperator= (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 PointPredicatemyPredicate
 
DigitalSetmySet
 
const DomainmyDomain
 
double myAlpha
 

Detailed Description

template<typename TPointPredicate, typename TDomain, typename TDigitalSetContainer = DigitalSetBySTLSet<TDomain>>
class DGtal::KanungoNoise< TPointPredicate, TDomain, TDigitalSetContainer >

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.

Note
This class explicitely stores the noisy point predicate in a digital set container model. Furthermore, the distance is given by the DistanceTransformation class with the Eucliean metric (the distance is computed on both true and false points from the point predicate in the given domain).
Template Parameters
TPointPredicateany model of point predicate concept (concepts::CPointPredicate)
TDomainany model of CDomain
TDigitalSetContainercontainer type to store the point predicate (default: DigitalSetBySTLSet)

Definition at line 84 of file KanungoNoise.h.

Member Typedef Documentation

template<typename TPointPredicate, typename TDomain, typename TDigitalSetContainer = DigitalSetBySTLSet<TDomain>>
typedef TDigitalSetContainer DGtal::KanungoNoise< TPointPredicate, TDomain, TDigitalSetContainer >::DigitalSet

DigitalSet type.

Definition at line 104 of file KanungoNoise.h.

template<typename TPointPredicate, typename TDomain, typename TDigitalSetContainer = DigitalSetBySTLSet<TDomain>>
typedef TDomain DGtal::KanungoNoise< TPointPredicate, TDomain, TDigitalSetContainer >::Domain

Domain type.

Definition at line 101 of file KanungoNoise.h.

template<typename TPointPredicate, typename TDomain, typename TDigitalSetContainer = DigitalSetBySTLSet<TDomain>>
typedef TDomain::Point DGtal::KanungoNoise< TPointPredicate, TDomain, TDigitalSetContainer >::Point

Point type.

Definition at line 98 of file KanungoNoise.h.

template<typename TPointPredicate, typename TDomain, typename TDigitalSetContainer = DigitalSetBySTLSet<TDomain>>
typedef TPointPredicate DGtal::KanungoNoise< TPointPredicate, TDomain, TDigitalSetContainer >::PointPredicate

Object type.

Definition at line 95 of file KanungoNoise.h.

Constructor & Destructor Documentation

template<typename TPointPredicate, typename TDomain, typename TDigitalSetContainer = DigitalSetBySTLSet<TDomain>>
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.

Parameters
aPredicateinput point predicate defining the input objects.
aDomaindomain used for the distance transformation computation.
anAlphanoise parameter between ]0,1[.
template<typename TPointPredicate, typename TDomain, typename TDigitalSetContainer = DigitalSetBySTLSet<TDomain>>
DGtal::KanungoNoise< TPointPredicate, TDomain, TDigitalSetContainer >::~KanungoNoise ( )

Destructor.

template<typename TPointPredicate, typename TDomain, typename TDigitalSetContainer = DigitalSetBySTLSet<TDomain>>
DGtal::KanungoNoise< TPointPredicate, TDomain, TDigitalSetContainer >::KanungoNoise ( )
protected

Constructor. Forbidden by default (protected to avoid g++ warnings).

template<typename TPointPredicate, typename TDomain, typename TDigitalSetContainer = DigitalSetBySTLSet<TDomain>>
DGtal::KanungoNoise< TPointPredicate, TDomain, TDigitalSetContainer >::KanungoNoise ( const KanungoNoise< TPointPredicate, TDomain, TDigitalSetContainer > &  other)
private

Copy constructor.

Parameters
otherthe object to clone. Forbidden by default.

Member Function Documentation

template<typename TPointPredicate, typename TDomain, typename TDigitalSetContainer = DigitalSetBySTLSet<TDomain>>
DGtal::KanungoNoise< TPointPredicate, TDomain, TDigitalSetContainer >::BOOST_CONCEPT_ASSERT ( (concepts::CDomain< TDomain >)  )

Concept checks.

template<typename TPointPredicate, typename TDomain, typename TDigitalSetContainer = DigitalSetBySTLSet<TDomain>>
DGtal::KanungoNoise< TPointPredicate, TDomain, TDigitalSetContainer >::BOOST_CONCEPT_ASSERT ( (concepts::CPointPredicate< TPointPredicate >)  )
template<typename TPointPredicate, typename TDomain, typename TDigitalSetContainer = DigitalSetBySTLSet<TDomain>>
DGtal::KanungoNoise< TPointPredicate, TDomain, TDigitalSetContainer >::BOOST_CONCEPT_ASSERT ( (concepts::CDigitalSet< TDigitalSetContainer >)  )
template<typename TPointPredicate, typename TDomain, typename TDigitalSetContainer = DigitalSetBySTLSet<TDomain>>
bool DGtal::KanungoNoise< TPointPredicate, TDomain, TDigitalSetContainer >::isValid ( ) const

Checks the validity/consistency of the object.

Returns
'true' if the object is valid, 'false' otherwise.
template<typename TPointPredicate, typename TDomain, typename TDigitalSetContainer = DigitalSetBySTLSet<TDomain>>
bool DGtal::KanungoNoise< TPointPredicate, TDomain, TDigitalSetContainer >::operator() ( const Point aPoint) const

PointPredicate concept method.

Parameters
aPointpoint to probe the predicate at.
Returns
true if the point is inside the nosified object.
template<typename TPointPredicate, typename TDomain, typename TDigitalSetContainer = DigitalSetBySTLSet<TDomain>>
KanungoNoise& DGtal::KanungoNoise< TPointPredicate, TDomain, TDigitalSetContainer >::operator= ( const KanungoNoise< TPointPredicate, TDomain, TDigitalSetContainer > &  other)

Assignment.

Parameters
otherthe object to copy.
Returns
a reference on 'this'. Forbidden by default.
template<typename TPointPredicate, typename TDomain, typename TDigitalSetContainer = DigitalSetBySTLSet<TDomain>>
void DGtal::KanungoNoise< TPointPredicate, TDomain, TDigitalSetContainer >::selfDisplay ( std::ostream &  out) const

Writes/Displays the object on an output stream.

Parameters
outthe output stream where the object is written.

Field Documentation

template<typename TPointPredicate, typename TDomain, typename TDigitalSetContainer = DigitalSetBySTLSet<TDomain>>
double DGtal::KanungoNoise< TPointPredicate, TDomain, TDigitalSetContainer >::myAlpha
private

Noise parameter.

Definition at line 187 of file KanungoNoise.h.

template<typename TPointPredicate, typename TDomain, typename TDigitalSetContainer = DigitalSetBySTLSet<TDomain>>
const Domain& DGtal::KanungoNoise< TPointPredicate, TDomain, TDigitalSetContainer >::myDomain
private

Pointeur to the domain.

Definition at line 184 of file KanungoNoise.h.

template<typename TPointPredicate, typename TDomain, typename TDigitalSetContainer = DigitalSetBySTLSet<TDomain>>
const PointPredicate& DGtal::KanungoNoise< TPointPredicate, TDomain, TDigitalSetContainer >::myPredicate
private

Pointeur to the object.

Definition at line 178 of file KanungoNoise.h.

template<typename TPointPredicate, typename TDomain, typename TDigitalSetContainer = DigitalSetBySTLSet<TDomain>>
DigitalSet* DGtal::KanungoNoise< TPointPredicate, TDomain, TDigitalSetContainer >::mySet
private

Explicit set to store the noisfied object points.

Definition at line 181 of file KanungoNoise.h.


The documentation for this class was generated from the following file: