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

#include <DGtal/topology/SCellsFunctors.h>

Public Types

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

Public Member Functions

 SCellToOuterPoint ()
 
 SCellToOuterPoint (ConstAlias< KSpace > aK)
 
 SCellToOuterPoint (const SCellToOuterPoint &other)
 
SCellToOuterPointoperator= (const SCellToOuterPoint &other)
 
Output operator() (const Input &s) const
 

Private Attributes

const KSpace * myK
 

Detailed Description

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

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

Description of template class 'SCellToOuterPoint'

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

Template Parameters
KSpacethe Khalimsky space
See also
SCellToPoint SCellToInnerPoint ConstIteratorAdapter KhalimskySpaceND PointVector

Definition at line 399 of file SCellsFunctors.h.

Member Typedef Documentation

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

Definition at line 404 of file SCellsFunctors.h.

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

Definition at line 403 of file SCellsFunctors.h.

Constructor & Destructor Documentation

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

Default constructor.

Definition at line 417 of file SCellsFunctors.h.

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

Constructor.

Parameters
aKa Khalimsky space

Definition at line 422 of file SCellsFunctors.h.

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

Copy constructor.

Parameters
otherany SCellToOuterPoint modifier

Definition at line 428 of file SCellsFunctors.h.

429  : myK(other.myK) { }

Member Function Documentation

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

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

Parameters
sa linel
Returns
the outer pixel center

Definition at line 450 of file SCellsFunctors.h.

451  {
452  ASSERT( myK );
453  Input pixel( myK->sIndirectIncident( s, *myK->sOrthDirs( s ) ) );
454  return Output( myK->sCoords( pixel ) ); //integer coordinates
455  }
template<typename KSpace>
SCellToOuterPoint& DGtal::functors::SCellToOuterPoint< KSpace >::operator= ( const SCellToOuterPoint< KSpace > &  other)
inline

Assignment.

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

Definition at line 436 of file SCellsFunctors.h.

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

437  {
438  if (this != &other)
439  {
440  myK = other.myK;
441  }
442  return *this;
443  }

Field Documentation

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

Aliasing pointer on the Khalimsky space.

Definition at line 410 of file SCellsFunctors.h.

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


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