DGtal 1.3.0
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Private Attributes
DGtal::functors::SCellToIncidentPoints< KSpace > Class Template Reference

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. More...

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

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

◆ Input

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

Definition at line 481 of file SCellsFunctors.h.

◆ Output

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

Definition at line 480 of file SCellsFunctors.h.

◆ Point

Definition at line 479 of file SCellsFunctors.h.

Constructor & Destructor Documentation

◆ SCellToIncidentPoints() [1/3]

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

Default constructor.

Definition at line 494 of file SCellsFunctors.h.

494: myK(NULL) { }

◆ SCellToIncidentPoints() [2/3]

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

◆ SCellToIncidentPoints() [3/3]

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

◆ operator()()

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 }
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.
SCell sDirectIncident(const SCell &p, Dimension k) const
Return the direct incident cell of [p] along [k] (the incident cell along [k])
DirIterator sOrthDirs(const SCell &p) const
Given a signed cell [p], returns an iterator to iterate over each coordinate the cell does not span.
std::pair< Point, Point > Output

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

◆ operator=()

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.

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

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

Field Documentation

◆ myK

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

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