DGtal  1.5.beta
DGtal::RegularPointEmbedder< TSpace > Class Template Reference

Aim: A simple point embedder where grid steps are given for each axis. Note that the real point (0,...,0) is mapped onto the digital point (0,...,0). More...

#include <DGtal/kernel/RegularPointEmbedder.h>

Inheritance diagram for DGtal::RegularPointEmbedder< TSpace >:
[legend]

Public Types

typedef TSpace Space
 
typedef Space::Point Point
 
typedef Space::RealPoint RealPoint
 
typedef Point Argument
 
typedef RealPoint Value
 
typedef Space::Integer Integer
 
typedef Space::RealVector RealVector
 

Public Member Functions

 ~RegularPointEmbedder ()
 
 RegularPointEmbedder ()
 
RegularPointEmbedderoperator= (const RegularPointEmbedder &other)
 
void init (typename RealVector::Component gridStep)
 
void init (const RealVector &gridSteps)
 
Point floor (const RealPoint &p) const
 
Point ceil (const RealPoint &p) const
 
Point round (const RealPoint &p) const
 
RealPoint embed (const Point &p) const
 
RealPoint operator() (const Point &p) const
 
RealVector gridSteps () const
 
void selfDisplay (std::ostream &out) const
 
bool isValid () const
 

Protected Attributes

RealVector myGridSteps
 The grid steps. More...
 

Private Member Functions

 BOOST_CONCEPT_ASSERT ((concepts::CSpace< TSpace >))
 

Detailed Description

template<typename TSpace>
class DGtal::RegularPointEmbedder< TSpace >

Aim: A simple point embedder where grid steps are given for each axis. Note that the real point (0,...,0) is mapped onto the digital point (0,...,0).

Description of template class 'RegularPointEmbedder'

RegularPointEmbedder is a model of CPointEmbedder.

Template Parameters
TSpacethe type of digital Space where the digitized object lies. A model of CSpace.

Definition at line 68 of file RegularPointEmbedder.h.

Member Typedef Documentation

◆ Argument

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

Definition at line 77 of file RegularPointEmbedder.h.

◆ Integer

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

Definition at line 80 of file RegularPointEmbedder.h.

◆ Point

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

Definition at line 75 of file RegularPointEmbedder.h.

◆ RealPoint

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

Definition at line 76 of file RegularPointEmbedder.h.

◆ RealVector

template<typename TSpace >
typedef Space::RealVector DGtal::RegularPointEmbedder< TSpace >::RealVector

Definition at line 81 of file RegularPointEmbedder.h.

◆ Space

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

Definition at line 74 of file RegularPointEmbedder.h.

◆ Value

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

Definition at line 78 of file RegularPointEmbedder.h.

Constructor & Destructor Documentation

◆ ~RegularPointEmbedder()

template<typename TSpace >
DGtal::RegularPointEmbedder< TSpace >::~RegularPointEmbedder ( )

Destructor.

◆ RegularPointEmbedder()

template<typename TSpace >
DGtal::RegularPointEmbedder< TSpace >::RegularPointEmbedder ( )

Constructor. The object is not valid.

Member Function Documentation

◆ BOOST_CONCEPT_ASSERT()

template<typename TSpace >
DGtal::RegularPointEmbedder< TSpace >::BOOST_CONCEPT_ASSERT ( (concepts::CSpace< TSpace >)  )
private

◆ ceil()

template<typename TSpace >
Point DGtal::RegularPointEmbedder< TSpace >::ceil ( const RealPoint p) const
Parameters
pany point in the Euclidean space.
Returns
the digital point ceil( p / gridSteps ).

◆ embed()

template<typename TSpace >
RealPoint DGtal::RegularPointEmbedder< TSpace >::embed ( const Point p) const

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

Parameters
pany digital point in the digital space.
Returns
its centroid embedding in the Euclidean space.

◆ floor()

template<typename TSpace >
Point DGtal::RegularPointEmbedder< TSpace >::floor ( const RealPoint p) const
Parameters
pany point in the Euclidean space.
Returns
the digital point floor( p / gridSteps ).

◆ gridSteps()

template<typename TSpace >
RealVector DGtal::RegularPointEmbedder< TSpace >::gridSteps ( ) const
Returns
the grid steps in each direction.

◆ init() [1/2]

template<typename TSpace >
void DGtal::RegularPointEmbedder< TSpace >::init ( const RealVector gridSteps)

Initializes the embedder. The real vector [gridSteps] specifies the grid steps in each direction.

Parameters
gridStepsthe grid steps in each direction.

◆ init() [2/2]

template<typename TSpace >
void DGtal::RegularPointEmbedder< TSpace >::init ( typename RealVector::Component  gridStep)

Initializes the embedder. The real value [gridStep] specifies the same grid step in every direction.

Parameters
gridStepthe grid step (distance between two embedded adjacent digital points) identical in every direction.

Referenced by main().

◆ isValid()

template<typename TSpace >
bool DGtal::RegularPointEmbedder< TSpace >::isValid ( ) const

Checks the validity/consistency of the object.

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

◆ operator()()

template<typename TSpace >
RealPoint DGtal::RegularPointEmbedder< TSpace >::operator() ( const Point p) const

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

Parameters
pany digital point in the digital space.
Returns
its centroid embedding in the Euclidean space.

◆ operator=()

template<typename TSpace >
RegularPointEmbedder& DGtal::RegularPointEmbedder< TSpace >::operator= ( const RegularPointEmbedder< TSpace > &  other)

Assignment. Required by concepts::CPointPredicate.

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

◆ round()

template<typename TSpace >
Point DGtal::RegularPointEmbedder< TSpace >::round ( const RealPoint p) const
Parameters
pany point in the Euclidean space.
Returns
the digital point round( p / gridSteps ), i.e. the "closest" digital point.

◆ selfDisplay()

template<typename TSpace >
void DGtal::RegularPointEmbedder< TSpace >::selfDisplay ( std::ostream &  out) const

Writes/Displays the object on an output stream.

Parameters
outthe output stream where the object is written.

Field Documentation

◆ myGridSteps

template<typename TSpace >
RealVector DGtal::RegularPointEmbedder< TSpace >::myGridSteps
protected

The grid steps.

Definition at line 180 of file RegularPointEmbedder.h.


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