DGtal  0.6.devel
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Types | Public Member Functions
DGtal::CanonicEmbedder< TSpace > Struct Template Reference

#include <CanonicEmbedder.h>

Public Types

typedef CanonicEmbedder< TSpace > Self
typedef TSpace Space
typedef Space::Integer Integer
typedef Space::Point Point
typedef Space::Vector Vector
typedef Space::RealPoint RealPoint
typedef Point Argument
typedef RealPoint Value

Public Member Functions

 BOOST_CONCEPT_ASSERT ((CSpace< TSpace >))
Point floor (const RealPoint &p) const
Point ceil (const RealPoint &p) const
Point round (const RealPoint &p) const
RealPoint embed (const Point &dp) const
RealPoint operator() (const Point &dp) const
void selfDisplay (std::ostream &out) const
bool isValid () const

Detailed Description

template<typename TSpace>
struct DGtal::CanonicEmbedder< TSpace >

Aim: A trivial embedder for digital points, which corresponds to the canonic injection of Zn into Rn.

Description of class 'CanonicEmbedder'

Model of CPointEmbedder.

Template Parameters:
TSpacethe type of digital Space where the embedder works.

Definition at line 64 of file CanonicEmbedder.h.


Member Typedef Documentation

template<typename TSpace>
typedef Point DGtal::CanonicEmbedder< TSpace >::Argument

Definition at line 75 of file CanonicEmbedder.h.

template<typename TSpace>
typedef Space::Integer DGtal::CanonicEmbedder< TSpace >::Integer

Definition at line 71 of file CanonicEmbedder.h.

template<typename TSpace>
typedef Space::Point DGtal::CanonicEmbedder< TSpace >::Point

Definition at line 72 of file CanonicEmbedder.h.

template<typename TSpace>
typedef Space::RealPoint DGtal::CanonicEmbedder< TSpace >::RealPoint

Definition at line 74 of file CanonicEmbedder.h.

template<typename TSpace>
typedef CanonicEmbedder<TSpace> DGtal::CanonicEmbedder< TSpace >::Self

Definition at line 67 of file CanonicEmbedder.h.

template<typename TSpace>
typedef TSpace DGtal::CanonicEmbedder< TSpace >::Space

Definition at line 70 of file CanonicEmbedder.h.

template<typename TSpace>
typedef RealPoint DGtal::CanonicEmbedder< TSpace >::Value

Definition at line 76 of file CanonicEmbedder.h.

template<typename TSpace>
typedef Space::Vector DGtal::CanonicEmbedder< TSpace >::Vector

Definition at line 73 of file CanonicEmbedder.h.


Member Function Documentation

template<typename TSpace>
DGtal::CanonicEmbedder< TSpace >::BOOST_CONCEPT_ASSERT ( (CSpace< TSpace >)  )
template<typename TSpace >
DGtal::CanonicEmbedder< TSpace >::Point DGtal::CanonicEmbedder< TSpace >::ceil ( const RealPoint p) const
inline
Parameters:
pany point in the Euclidean space.
Returns:
the digital point ceil( p ).

Definition at line 58 of file CanonicEmbedder.ih.

{
Point dp;
for ( Dimension i = 0; i < dp.size(); ++i )
dp[ i ] = (Integer) ceil( p[ i ] );
return dp;
}
template<typename TSpace >
DGtal::CanonicEmbedder< TSpace >::RealPoint DGtal::CanonicEmbedder< TSpace >::embed ( const Point dp) const
inline

Map a digital point to its corresponding point in the Euclidean space.

Parameters:
dpany digital point in the digital space.
Returns:
its canconical embedding in the Euclidean space.

Definition at line 80 of file CanonicEmbedder.ih.

{
return this->operator()( dp );
}
template<typename TSpace >
DGtal::CanonicEmbedder< TSpace >::Point DGtal::CanonicEmbedder< TSpace >::floor ( const RealPoint p) const
inline
Parameters:
pany point in the Euclidean space.
Returns:
the digital point floor( p ).

Definition at line 47 of file CanonicEmbedder.ih.

{
Point dp;
for ( Dimension i = 0; i < dp.size(); ++i )
dp[ i ] = (Integer) floor( p[ i ] );
return dp;
}
template<typename TSpace >
bool DGtal::CanonicEmbedder< TSpace >::isValid ( ) const
inline

Checks the validity/consistency of the object.

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

Definition at line 99 of file CanonicEmbedder.ih.

{
return true;
}
template<typename TSpace >
DGtal::CanonicEmbedder< TSpace >::RealPoint DGtal::CanonicEmbedder< TSpace >::operator() ( const Point dp) const
inline

Map a digital point to its corresponding point in the Euclidean space.

Parameters:
dpany digital point in the digital space.
Returns:
its canconical embedding in the Euclidean space.

Definition at line 88 of file CanonicEmbedder.ih.

{
RealPoint p;
for ( Dimension i = 0; i < dp.size(); ++i )
return p;
}
template<typename TSpace >
DGtal::CanonicEmbedder< TSpace >::Point DGtal::CanonicEmbedder< TSpace >::round ( const RealPoint p) const
inline
Parameters:
pany point in the Euclidean space.
Returns:
the digital point round( p ), i.e. the "closest" digital point.

Definition at line 69 of file CanonicEmbedder.ih.

{
Point dp;
for ( Dimension i = 0; i < dp.size(); ++i )
dp[ i ] = (Integer) round( p[ i ] );
return dp;
}
template<typename TSpace>
void DGtal::CanonicEmbedder< TSpace >::selfDisplay ( std::ostream &  out) const

Writes/Displays the object on an output stream.

Parameters:
outthe output stream where the object is written.

The documentation for this struct was generated from the following files: