DGtal  0.9.4beta
Public Types | Public Member Functions | Private Attributes
DGtal::functors::SCellToInnerPoint< KSpace > Class Template Reference

#include <DGtal/topology/SCellsFunctors.h>

Public Types

typedef KSpace::Point Output
 
typedef KSpace::SCell Input
 

Public Member Functions

 SCellToInnerPoint ()
 
 SCellToInnerPoint (ConstAlias< KSpace > aK)
 
 SCellToInnerPoint (const SCellToInnerPoint &other)
 
SCellToInnerPointoperator= (const SCellToInnerPoint &other)
 
Output operator() (const Input &s) const
 

Private Attributes

const KSpace * myK
 

Detailed Description

template<typename KSpace>
class DGtal::functors::SCellToInnerPoint< KSpace >

Aim: transforms a signed cell c into a point corresponding to the signed cell of greater dimension that is indirectly incident to c.

Description of template class 'SCellToInnerPoint'

For instance, a linel is mapped into the indirect incident pixel center and a surfel is mapped into the indirect incident voxel center.

Template Parameters
KSpacethe Khalimsky space
See also
SCellToPoint SCellToOuterPoint ConstIteratorAdapter KhalimskySpaceND PointVector
Examples:
tutorial-examples/FMMErosion.cpp.

Definition at line 323 of file SCellsFunctors.h.

Member Typedef Documentation

template<typename KSpace>
typedef KSpace::SCell DGtal::functors::SCellToInnerPoint< KSpace >::Input

Definition at line 329 of file SCellsFunctors.h.

template<typename KSpace>
typedef KSpace::Point DGtal::functors::SCellToInnerPoint< KSpace >::Output

Definition at line 328 of file SCellsFunctors.h.

Constructor & Destructor Documentation

template<typename KSpace>
DGtal::functors::SCellToInnerPoint< KSpace >::SCellToInnerPoint ( )
inline

Default constructor.

Definition at line 342 of file SCellsFunctors.h.

342 : myK(NULL) { }
template<typename KSpace>
DGtal::functors::SCellToInnerPoint< KSpace >::SCellToInnerPoint ( ConstAlias< KSpace >  aK)
inline

Constructor.

Parameters
aKa Khalimsky space

Definition at line 347 of file SCellsFunctors.h.

347 : myK(&aK) { }
template<typename KSpace>
DGtal::functors::SCellToInnerPoint< KSpace >::SCellToInnerPoint ( const SCellToInnerPoint< KSpace > &  other)
inline

Copy constructor.

Parameters
otherany SCellToInnerPoint functor

Definition at line 353 of file SCellsFunctors.h.

354  : myK(other.myK) { }

Member Function Documentation

template<typename KSpace>
Output DGtal::functors::SCellToInnerPoint< KSpace >::operator() ( const Input s) const
inline

Return a point (integer coordinates) from a scell (khalimsky coordinates)

Parameters
sa linel
Returns
the inner pixel center

Definition at line 375 of file SCellsFunctors.h.

376  {
377  ASSERT( myK );
378  Input pixel( myK->sDirectIncident( s, *myK->sOrthDirs( s ) ) );
379  return Output( myK->sCoords( pixel ) ); //integer coordinates
380  }
template<typename KSpace>
SCellToInnerPoint& DGtal::functors::SCellToInnerPoint< KSpace >::operator= ( const SCellToInnerPoint< KSpace > &  other)
inline

Assignment.

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

Definition at line 361 of file SCellsFunctors.h.

References DGtal::functors::SCellToInnerPoint< KSpace >::myK.

362  {
363  if (this != &other)
364  {
365  myK = other.myK;
366  }
367  return *this;
368  }

Field Documentation

template<typename KSpace>
const KSpace* DGtal::functors::SCellToInnerPoint< KSpace >::myK
private

Aliasing pointer on the Khalimsky space.

Definition at line 335 of file SCellsFunctors.h.

Referenced by DGtal::functors::SCellToInnerPoint< KSpace >::operator=().


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