DGtal  1.5.beta
DGtal::functors::SCellToOuterPoint< KSpace > Class Template Reference

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

#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 KSpacemyK
 

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

◆ Input

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

Definition at line 404 of file SCellsFunctors.h.

◆ Output

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

Definition at line 403 of file SCellsFunctors.h.

Constructor & Destructor Documentation

◆ SCellToOuterPoint() [1/3]

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

Default constructor.

Definition at line 417 of file SCellsFunctors.h.

417 : myK(NULL) { }

◆ SCellToOuterPoint() [2/3]

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) { }

◆ SCellToOuterPoint() [3/3]

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

◆ operator()()

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  }
SCell sIndirectIncident(const SCell &p, Dimension k) const
Return the indirect incident cell of [p] along [k] (the incident cell along [k] whose sign is negativ...
Point sCoords(const SCell &c) const
Return its digital coordinates.
DirIterator sOrthDirs(const SCell &p) const
Given a signed cell [p], returns an iterator to iterate over each coordinate the cell does not span.

References DGtal::functors::SCellToOuterPoint< KSpace >::myK, DGtal::KhalimskySpaceND< dim, TInteger >::sCoords(), DGtal::KhalimskySpaceND< dim, TInteger >::sIndirectIncident(), and DGtal::KhalimskySpaceND< dim, TInteger >::sOrthDirs().

◆ operator=()

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.

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

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

Field Documentation

◆ myK

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()(), and DGtal::functors::SCellToOuterPoint< KSpace >::operator=().


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