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

#include <DGtal/topology/SCellsFunctors.h>

Public Types

typedef KSpace::Point Point
 
typedef std::pair< Point, PointOutput
 
typedef KSpace::SCell Input
 

Public Member Functions

 SCellToIncidentPoints ()
 
 SCellToIncidentPoints (ConstAlias< KSpace > aK)
 
 SCellToIncidentPoints (const SCellToIncidentPoints &other)
 
SCellToIncidentPointsoperator= (const SCellToIncidentPoints &other)
 
Output operator() (const Input &s) const
 

Private Attributes

const KSpace * myK
 

Detailed Description

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

Aim: transforms a signed cell c into a pair of points corresponding to the signed cells of greater dimension that are indirectly and directly incident to c.

Description of template class 'SCellToIncidentPoints'

For instance, a linel is mapped into the pair of incident pixel centers and a surfel is mapped into the pair of incident voxel centers.

Template Parameters
KSpacethe Khalimsky space
See also
SCellToInnerPoint SCellToOuterPoint ConstIteratorAdapter KhalimskySpaceND PointVector
Examples:
geometry/volumes/distance/exampleFMM3D.cpp, and tutorial-examples/FMMErosion.cpp.

Definition at line 474 of file SCellsFunctors.h.

Member Typedef Documentation

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

Definition at line 481 of file SCellsFunctors.h.

template<typename KSpace>
typedef std::pair<Point,Point> DGtal::functors::SCellToIncidentPoints< KSpace >::Output

Definition at line 480 of file SCellsFunctors.h.

template<typename KSpace>
typedef KSpace::Point DGtal::functors::SCellToIncidentPoints< KSpace >::Point

Definition at line 479 of file SCellsFunctors.h.

Constructor & Destructor Documentation

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

Default constructor.

Definition at line 494 of file SCellsFunctors.h.

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

Constructor.

Parameters
aKa Khalimsky space

Definition at line 499 of file SCellsFunctors.h.

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

Copy constructor.

Parameters
otherany SCellToIncidentPoints functor

Definition at line 505 of file SCellsFunctors.h.

506  : myK(other.myK) { }

Member Function Documentation

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

Get a pair of point (integer coordinates) from a scell (khalimsky coordinates)

Parameters
sa linel
Returns
the pair of points

Definition at line 527 of file SCellsFunctors.h.

528  {
529  ASSERT( myK );
530  //inner point
531  Input innerPixel( myK->sDirectIncident( s, *myK->sOrthDirs( s ) ) );
532  //outer point
533  Input outerPixel( myK->sIndirectIncident( s, *myK->sOrthDirs( s ) ) );
534 
535  return Output(myK->sCoords( innerPixel ),myK->sCoords( outerPixel ));
536  }
std::pair< Point, Point > Output
template<typename KSpace>
SCellToIncidentPoints& DGtal::functors::SCellToIncidentPoints< KSpace >::operator= ( const SCellToIncidentPoints< KSpace > &  other)
inline

Assignment.

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

Definition at line 513 of file SCellsFunctors.h.

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

514  {
515  if (this != &other)
516  {
517  myK = other.myK;
518  }
519  return *this;
520  }

Field Documentation

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

Aliasing pointer on the Khalimsky space.

Definition at line 487 of file SCellsFunctors.h.

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


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