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 <DigitalTopology.h>

Public Types

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

Public Member Functions

 BOOST_CONCEPT_ASSERT ((CAdjacency< ForegroundAdjacency >))
 BOOST_CONCEPT_ASSERT ((CAdjacency< BackgroundAdjacency >))
 DigitalTopology (const ForegroundAdjacency &aKappa, const 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;
   typedef MetricAdjacency< Zi2, 1 > Adj4;
   typedef MetricAdjacency< Zi2, 2 > Adj8;
   Adj4 adj4;
   Adj8 adj8;
   typedef DigitalTopology< Adj4, Adj8 > DT48;
   typedef DT48::ReverseTopology DT84;
   DT48 dt( adj4, adj8, JORDAN_DT );
   cout << dt << std::endl;
   DT84 opp_dt = dt.reverseTopology();
   cout << opp_dt << std::endl;
Template Parameters:
TForegroundAdjacency any model of CAdjacency.
TBackgroundAdjacency any model of CAdjacency.

Member Typedef Documentation

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

Opposite topology type.


Constructor & Destructor Documentation

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

Defines the digital topology (kappa,lambda).

Parameters:
aKappa a const reference to the adjacency object chosen for the foreground topology.
aLambda a const reference to the adjacency object chosen for the background topology.
props an hint of the properties of this digital topology, default is UNKNOWN.
template<typename TForegroundAdjacency, typename TBackgroundAdjacency>
DGtal::DigitalTopology< TForegroundAdjacency, TBackgroundAdjacency >::~DigitalTopology (  ) 

Destructor.

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

Copy constructor.

Parameters:
other the object to clone.
template<typename TForegroundAdjacency, typename TBackgroundAdjacency>
DGtal::DigitalTopology< TForegroundAdjacency, TBackgroundAdjacency >::DigitalTopology (  )  [protected]

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


Member Function Documentation

template<typename TForegroundAdjacency, typename TBackgroundAdjacency>
DGtal::DigitalTopology< TForegroundAdjacency, TBackgroundAdjacency >::BOOST_CONCEPT_ASSERT ( (CAdjacency< ForegroundAdjacency >)   ) 
template<typename TForegroundAdjacency, typename TBackgroundAdjacency>
DGtal::DigitalTopology< TForegroundAdjacency, TBackgroundAdjacency >::BOOST_CONCEPT_ASSERT ( (CAdjacency< BackgroundAdjacency >)   ) 
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.
template<typename TForegroundAdjacency, typename TBackgroundAdjacency>
const ForegroundAdjacency& DGtal::DigitalTopology< TForegroundAdjacency, TBackgroundAdjacency >::kappa (  )  const
Returns:
a const reference to the foreground connectedness.
template<typename TForegroundAdjacency, typename TBackgroundAdjacency>
const BackgroundAdjacency& DGtal::DigitalTopology< TForegroundAdjacency, TBackgroundAdjacency >::lambda (  )  const
Returns:
a const reference to the background connectedness.
template<typename TForegroundAdjacency, typename TBackgroundAdjacency>
DigitalTopology& DGtal::DigitalTopology< TForegroundAdjacency, TBackgroundAdjacency >::operator= ( const DigitalTopology< TForegroundAdjacency, TBackgroundAdjacency > &  other  )  [private]

Assignment.

Parameters:
other the object to copy.
Returns:
a reference on 'this'. Forbidden by default.
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.
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) \]

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

Writes/Displays the object on an output stream.

Parameters:
out the output stream where the object is written.

Field Documentation

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.

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.

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.


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