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

#include <CanonicSCellEmbedder.h>

Public Types

typedef CanonicSCellEmbedder
< TKSpace > 
Self
typedef TKSpace KSpace
typedef KSpace::SCell SCell
typedef KSpace::Space Space
typedef Space::RealPoint RealPoint
typedef SCell Argument
typedef RealPoint Value
typedef Space::Integer Integer
typedef Space::Point Point

Public Member Functions

 BOOST_CONCEPT_ASSERT ((CCellularGridSpaceND< TKSpace >))
 ~CanonicSCellEmbedder ()
 CanonicSCellEmbedder ()
 CanonicSCellEmbedder (const KSpace &aKSpace)
 CanonicSCellEmbedder (const Self &other)
Selfoperator= (const Self &other)
const KSpacespace () const
RealPoint embed (const SCell &cell) const
RealPoint operator() (const SCell &cell) const
void selfDisplay (std::ostream &out) const
bool isValid () const

Protected Attributes

const KSpacemyKSpace

Detailed Description

template<typename TKSpace>
struct DGtal::CanonicSCellEmbedder< TKSpace >

Aim: A trivial embedder for signed cell, which corresponds to the canonic injection of cell centroids into Rn.

Description of class 'CanonicSCellEmbedder'

Model of CSCellEmbedder.

Template Parameters:
TKSpacethe type of cellular grid space where the embedder works, a model of CCellularGridSpaceND.

Definition at line 64 of file CanonicSCellEmbedder.h.


Member Typedef Documentation

template<typename TKSpace>
typedef SCell DGtal::CanonicSCellEmbedder< TKSpace >::Argument

Definition at line 74 of file CanonicSCellEmbedder.h.

template<typename TKSpace>
typedef Space::Integer DGtal::CanonicSCellEmbedder< TKSpace >::Integer

Definition at line 77 of file CanonicSCellEmbedder.h.

template<typename TKSpace>
typedef TKSpace DGtal::CanonicSCellEmbedder< TKSpace >::KSpace

Definition at line 70 of file CanonicSCellEmbedder.h.

template<typename TKSpace>
typedef Space::Point DGtal::CanonicSCellEmbedder< TKSpace >::Point

Definition at line 78 of file CanonicSCellEmbedder.h.

template<typename TKSpace>
typedef Space::RealPoint DGtal::CanonicSCellEmbedder< TKSpace >::RealPoint

Definition at line 73 of file CanonicSCellEmbedder.h.

template<typename TKSpace>
typedef KSpace::SCell DGtal::CanonicSCellEmbedder< TKSpace >::SCell

Definition at line 71 of file CanonicSCellEmbedder.h.

template<typename TKSpace>
typedef CanonicSCellEmbedder<TKSpace> DGtal::CanonicSCellEmbedder< TKSpace >::Self

Definition at line 67 of file CanonicSCellEmbedder.h.

template<typename TKSpace>
typedef KSpace::Space DGtal::CanonicSCellEmbedder< TKSpace >::Space

Definition at line 72 of file CanonicSCellEmbedder.h.

template<typename TKSpace>
typedef RealPoint DGtal::CanonicSCellEmbedder< TKSpace >::Value

Definition at line 75 of file CanonicSCellEmbedder.h.


Constructor & Destructor Documentation

template<typename TKSpace >
DGtal::CanonicSCellEmbedder< TKSpace >::~CanonicSCellEmbedder ( )
inline

Destructor. Nothing special.

Definition at line 47 of file CanonicSCellEmbedder.ih.

{}
template<typename TKSpace >
DGtal::CanonicSCellEmbedder< TKSpace >::CanonicSCellEmbedder ( )
inline

Default constructor. The object is not valid.

Definition at line 53 of file CanonicSCellEmbedder.ih.

: myKSpace( 0 )
{}
template<typename TKSpace >
DGtal::CanonicSCellEmbedder< TKSpace >::CanonicSCellEmbedder ( const KSpace aKSpace)
inline

Constructor from space.

Definition at line 60 of file CanonicSCellEmbedder.ih.

: myKSpace( &aKSpace )
{}
template<typename TKSpace >
DGtal::CanonicSCellEmbedder< TKSpace >::CanonicSCellEmbedder ( const Self other)
inline

Copy constructor.

Parameters:
otherthe object to clone.

Definition at line 67 of file CanonicSCellEmbedder.ih.

: myKSpace( other.myKSpace )
{}

Member Function Documentation

template<typename TKSpace>
DGtal::CanonicSCellEmbedder< TKSpace >::BOOST_CONCEPT_ASSERT ( (CCellularGridSpaceND< TKSpace >)  )
template<typename TKSpace >
DGtal::CanonicSCellEmbedder< TKSpace >::RealPoint DGtal::CanonicSCellEmbedder< TKSpace >::embed ( const SCell cell) const
inline

Map a signed cell to its corresponding point in the Euclidean space.

Parameters:
cellany signed cell in the digital space.
Returns:
its canconical embedding in the Euclidean space.

Definition at line 93 of file CanonicSCellEmbedder.ih.

{
return this->operator()( scell );
}
template<typename TKSpace >
bool DGtal::CanonicSCellEmbedder< TKSpace >::isValid ( ) const
inline

Checks the validity/consistency of the object.

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

Definition at line 114 of file CanonicSCellEmbedder.ih.

{
return myKSpace != 0;
}
template<typename TKSpace >
DGtal::CanonicSCellEmbedder< TKSpace >::RealPoint DGtal::CanonicSCellEmbedder< TKSpace >::operator() ( const SCell cell) const
inline

Map a signed cell to its corresponding point in the Euclidean space.

Parameters:
cellany signed cell in the digital space.
Returns:
its canconical embedding in the Euclidean space.

Definition at line 101 of file CanonicSCellEmbedder.ih.

{
ASSERT( this->isValid() );
Point dp = myKSpace->sKCoords( scell );
RealPoint p;
for ( Dimension i = 0; i < dp.size(); ++i )
p[ i ] = NumberTraits<Integer>::castToDouble( dp[ i ] ) / 2;
return p;
}
template<typename TKSpace >
DGtal::CanonicSCellEmbedder< TKSpace >::Self & DGtal::CanonicSCellEmbedder< TKSpace >::operator= ( const Self other)
inline

Assignment.

Parameters:
otherthe object to clone.
Returns:
a reference to 'this'.

Definition at line 75 of file CanonicSCellEmbedder.ih.

References DGtal::CanonicSCellEmbedder< TKSpace >::myKSpace.

{
myKSpace = other.myKSpace;
return *this;
}
template<typename TKSpace>
void DGtal::CanonicSCellEmbedder< TKSpace >::selfDisplay ( std::ostream &  out) const

Writes/Displays the object on an output stream.

Parameters:
outthe output stream where the object is written.
template<typename TKSpace >
const DGtal::CanonicSCellEmbedder< TKSpace >::KSpace & DGtal::CanonicSCellEmbedder< TKSpace >::space ( ) const
inline
Returns:
the cellular grid space.

Definition at line 84 of file CanonicSCellEmbedder.ih.

{
ASSERT( this->isValid() );
return *myKSpace;
}

Field Documentation

template<typename TKSpace>
const KSpace* DGtal::CanonicSCellEmbedder< TKSpace >::myKSpace
protected

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