DGtal 1.4.0
Loading...
Searching...
No Matches
DGtal::KanungoNoise< TPointPredicate, TDomain, TDigitalSetContainer > Class Template Reference

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.
 
typedef TDomain::Point Point
 Point type.
 
typedef TDomain Domain
 Domain type.
 
typedef TDigitalSetContainer DigitalSet
 DigitalSet type.
 

Public Member Functions

 BOOST_CONCEPT_ASSERT ((concepts::CDomain< TDomain >))
 Concept checks.
 
 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
 Pointeur to the object.
 
DigitalSetmySet
 Explicit set to store the noisfied object points.
 
const DomainmyDomain
 Pointeur to the domain.
 
double myAlpha
 Noise parameter.
 

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

◆ DigitalSet

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.

◆ Domain

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.

◆ Point

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.

◆ PointPredicate

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

◆ KanungoNoise() [1/3]

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[.

◆ ~KanungoNoise()

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

Destructor.

◆ KanungoNoise() [2/3]

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).

◆ KanungoNoise() [3/3]

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

◆ BOOST_CONCEPT_ASSERT() [1/3]

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

◆ BOOST_CONCEPT_ASSERT() [2/3]

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

Concept checks.

◆ BOOST_CONCEPT_ASSERT() [3/3]

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

◆ isValid()

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.

◆ operator()()

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.

◆ operator=()

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.

◆ selfDisplay()

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

◆ myAlpha

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.

◆ myDomain

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.

◆ myPredicate

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.

◆ mySet

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: