DGtal 1.3.0
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes
DGtal::DigitalTopology< TForegroundAdjacency, TBackgroundAdjacency > Class Template Reference

Aim: Represents a digital topology as a couple of adjacency relations. More...

#include <DGtal/topology/DigitalTopology.h>

Public Types

typedef TForegroundAdjacency ForegroundAdjacency
 
typedef TBackgroundAdjacency BackgroundAdjacency
 
typedef ForegroundAdjacency::Point Point
 
typedef BackgroundAdjacency::Point BackPoint
 
typedef DigitalTopology< BackgroundAdjacency, ForegroundAdjacencyReverseTopology
 

Public Member Functions

 BOOST_CONCEPT_ASSERT ((concepts::CAdjacency< ForegroundAdjacency >))
 
 BOOST_CONCEPT_ASSERT ((concepts::CAdjacency< BackgroundAdjacency >))
 
 DigitalTopology (ConstAlias< ForegroundAdjacency > aKappa, ConstAlias< BackgroundAdjacency > aLambda, DigitalTopologyProperties props=UNKNOWN_DT)
 
 ~DigitalTopology ()
 
 DigitalTopology (const DigitalTopology &other)
 
const ForegroundAdjacencykappa () const
 
const BackgroundAdjacencylambda () const
 
DigitalTopologyProperties properties () const
 
ReverseTopology reverseTopology () const
 
void selfDisplay (std::ostream &out) const
 
bool isValid () const
 

Protected Member Functions

 DigitalTopology ()
 

Private Member Functions

DigitalTopologyoperator= (const DigitalTopology &other)
 

Private Attributes

const ForegroundAdjacencymyKappa
 
const BackgroundAdjacencymyLambda
 
const DigitalTopologyProperties myProps
 

Detailed Description

template<typename TForegroundAdjacency, typename TBackgroundAdjacency>
class DGtal::DigitalTopology< TForegroundAdjacency, TBackgroundAdjacency >

Aim: Represents a digital topology as a couple of adjacency relations.

Description of template class 'DigitalTopology'

The most famous are the (4,8) and (8,4) topologies on Z^2 (see seminal Rosenfeld paper). The two given adjacency relations should be defined for all digital points used afterwards. For instance, they should operate on points of the same dimension. The first adjacency defines the foreground topology while the second adjacency defines the background topology. The opposite topology is the reverse couple. Both adjacencies should be instantiable.

A digital topology is classically denoted by a couple \( (\kappa,\lambda) \), which explains the notations in the class.

typedef SpaceND< int, 2 > Zi2;
Adj4 adj4;
Adj8 adj8;
typedef DT48::ReverseTopology DT84;
DT48 dt( adj4, adj8, JORDAN_DT );
cout << dt << std::endl;
DT84 opp_dt = dt.reverseTopology();
cout << opp_dt << std::endl;
Aim: Represents a digital topology as a couple of adjacency relations.
Aim: Describes digital adjacencies in digital spaces that are defined with the 1-norm and the infinit...
Template Parameters
TForegroundAdjacencyany model of CAdjacency.
TBackgroundAdjacencyany model of CAdjacency.
Examples
topology/3dBorderExtraction.cpp.

Definition at line 95 of file DigitalTopology.h.

Member Typedef Documentation

◆ BackgroundAdjacency

template<typename TForegroundAdjacency , typename TBackgroundAdjacency >
typedef TBackgroundAdjacency DGtal::DigitalTopology< TForegroundAdjacency, TBackgroundAdjacency >::BackgroundAdjacency

Definition at line 100 of file DigitalTopology.h.

◆ BackPoint

template<typename TForegroundAdjacency , typename TBackgroundAdjacency >
typedef BackgroundAdjacency::Point DGtal::DigitalTopology< TForegroundAdjacency, TBackgroundAdjacency >::BackPoint

Definition at line 103 of file DigitalTopology.h.

◆ ForegroundAdjacency

template<typename TForegroundAdjacency , typename TBackgroundAdjacency >
typedef TForegroundAdjacency DGtal::DigitalTopology< TForegroundAdjacency, TBackgroundAdjacency >::ForegroundAdjacency

Definition at line 99 of file DigitalTopology.h.

◆ Point

template<typename TForegroundAdjacency , typename TBackgroundAdjacency >
typedef ForegroundAdjacency::Point DGtal::DigitalTopology< TForegroundAdjacency, TBackgroundAdjacency >::Point

Definition at line 101 of file DigitalTopology.h.

◆ ReverseTopology

template<typename TForegroundAdjacency , typename TBackgroundAdjacency >
typedef DigitalTopology<BackgroundAdjacency,ForegroundAdjacency> DGtal::DigitalTopology< TForegroundAdjacency, TBackgroundAdjacency >::ReverseTopology

Opposite topology type.

Definition at line 112 of file DigitalTopology.h.

Constructor & Destructor Documentation

◆ DigitalTopology() [1/3]

template<typename TForegroundAdjacency , typename TBackgroundAdjacency >
DGtal::DigitalTopology< TForegroundAdjacency, TBackgroundAdjacency >::DigitalTopology ( ConstAlias< ForegroundAdjacency aKappa,
ConstAlias< BackgroundAdjacency aLambda,
DigitalTopologyProperties  props = UNKNOWN_DT 
)

Defines the digital topology (kappa,lambda).

Parameters
aKappaa const reference to the adjacency object chosen for the foreground topology.
aLambdaa const reference to the adjacency object chosen for the background topology.
propsan hint of the properties of this digital topology, default is UNKNOWN.

◆ ~DigitalTopology()

template<typename TForegroundAdjacency , typename TBackgroundAdjacency >
DGtal::DigitalTopology< TForegroundAdjacency, TBackgroundAdjacency >::~DigitalTopology ( )

Destructor.

◆ DigitalTopology() [2/3]

template<typename TForegroundAdjacency , typename TBackgroundAdjacency >
DGtal::DigitalTopology< TForegroundAdjacency, TBackgroundAdjacency >::DigitalTopology ( const DigitalTopology< TForegroundAdjacency, TBackgroundAdjacency > &  other)

Copy constructor.

Parameters
otherthe object to clone.

◆ DigitalTopology() [3/3]

template<typename TForegroundAdjacency , typename TBackgroundAdjacency >
DGtal::DigitalTopology< TForegroundAdjacency, TBackgroundAdjacency >::DigitalTopology ( )
protected

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

Member Function Documentation

◆ BOOST_CONCEPT_ASSERT() [1/2]

template<typename TForegroundAdjacency , typename TBackgroundAdjacency >
DGtal::DigitalTopology< TForegroundAdjacency, TBackgroundAdjacency >::BOOST_CONCEPT_ASSERT ( (concepts::CAdjacency< BackgroundAdjacency >)  )

◆ BOOST_CONCEPT_ASSERT() [2/2]

template<typename TForegroundAdjacency , typename TBackgroundAdjacency >
DGtal::DigitalTopology< TForegroundAdjacency, TBackgroundAdjacency >::BOOST_CONCEPT_ASSERT ( (concepts::CAdjacency< ForegroundAdjacency >)  )

◆ isValid()

template<typename TForegroundAdjacency , typename TBackgroundAdjacency >
bool DGtal::DigitalTopology< TForegroundAdjacency, TBackgroundAdjacency >::isValid ( ) const

Checks the validity/consistency of the object.

Returns
'true' if the object is valid, 'false' otherwise.

◆ kappa()

template<typename TForegroundAdjacency , typename TBackgroundAdjacency >
const ForegroundAdjacency & DGtal::DigitalTopology< TForegroundAdjacency, TBackgroundAdjacency >::kappa ( ) const
Returns
a const reference to the foreground connectedness.

◆ lambda()

template<typename TForegroundAdjacency , typename TBackgroundAdjacency >
const BackgroundAdjacency & DGtal::DigitalTopology< TForegroundAdjacency, TBackgroundAdjacency >::lambda ( ) const
Returns
a const reference to the background connectedness.

◆ operator=()

template<typename TForegroundAdjacency , typename TBackgroundAdjacency >
DigitalTopology & DGtal::DigitalTopology< TForegroundAdjacency, TBackgroundAdjacency >::operator= ( const DigitalTopology< TForegroundAdjacency, TBackgroundAdjacency > &  other)
private

Assignment.

Parameters
otherthe object to copy.
Returns
a reference on 'this'. Forbidden by default.

◆ properties()

template<typename TForegroundAdjacency , typename TBackgroundAdjacency >
DigitalTopologyProperties DGtal::DigitalTopology< TForegroundAdjacency, TBackgroundAdjacency >::properties ( ) const
Returns
JORDAN iff the topology is Jordan, NOT_JORDAN iff the topology is known to be NOT_JORDAN, UNKNOWN otherwise.

◆ reverseTopology()

template<typename TForegroundAdjacency , typename TBackgroundAdjacency >
ReverseTopology DGtal::DigitalTopology< TForegroundAdjacency, TBackgroundAdjacency >::reverseTopology ( ) const
Returns
a digital topology object which is the reverse topology of this (ie.

\[ (\lambda,\kappa) \]

.

◆ selfDisplay()

template<typename TForegroundAdjacency , typename TBackgroundAdjacency >
void DGtal::DigitalTopology< TForegroundAdjacency, TBackgroundAdjacency >::selfDisplay ( std::ostream &  out) const

Writes/Displays the object on an output stream.

Parameters
outthe output stream where the object is written.

Field Documentation

◆ myKappa

template<typename TForegroundAdjacency , typename TBackgroundAdjacency >
const ForegroundAdjacency& DGtal::DigitalTopology< TForegroundAdjacency, TBackgroundAdjacency >::myKappa
private

a const reference to the adjacency object chosen for the foreground topology.

Definition at line 188 of file DigitalTopology.h.

◆ myLambda

template<typename TForegroundAdjacency , typename TBackgroundAdjacency >
const BackgroundAdjacency& DGtal::DigitalTopology< TForegroundAdjacency, TBackgroundAdjacency >::myLambda
private

a const reference to the adjacency object chosen for the background topology.

Definition at line 194 of file DigitalTopology.h.

◆ myProps

template<typename TForegroundAdjacency , typename TBackgroundAdjacency >
const DigitalTopologyProperties DGtal::DigitalTopology< TForegroundAdjacency, TBackgroundAdjacency >::myProps
private

an hint of the properties of this digital topology, default is UNKNOWN.

Definition at line 200 of file DigitalTopology.h.


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