DGtal 2.0.0
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 385 of file SCellsFunctors.h.

Member Typedef Documentation

◆ Input

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

Definition at line 392 of file SCellsFunctors.h.

◆ Output

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

Definition at line 391 of file SCellsFunctors.h.

◆ Point

Definition at line 390 of file SCellsFunctors.h.

Constructor & Destructor Documentation

◆ SCellToIncidentPoints() [1/3]

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

Default constructor.

Definition at line 405 of file SCellsFunctors.h.

405: myK(NULL) { }
Aim: transforms a signed cell c into a pair of points corresponding to the signed cells of greater di...

References myK.

Referenced by operator=(), and SCellToIncidentPoints().

◆ SCellToIncidentPoints() [2/3]

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

Constructor.

Parameters
aKa Khalimsky space

Definition at line 410 of file SCellsFunctors.h.

410: myK(&aK) { }

References myK.

◆ 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 416 of file SCellsFunctors.h.

417 : myK(other.myK) { }

References myK, and SCellToIncidentPoints().

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 438 of file SCellsFunctors.h.

439 {
440 ASSERT( myK );
441 //inner point
442 Input innerPixel( myK->sDirectIncident( s, *myK->sOrthDirs( s ) ) );
443 //outer point
444 Input outerPixel( myK->sIndirectIncident( s, *myK->sOrthDirs( s ) ) );
445
446 return Output(myK->sCoords( innerPixel ),myK->sCoords( outerPixel ));
447 }

References myK.

◆ 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 424 of file SCellsFunctors.h.

425 {
426 if (this != &other)
427 {
428 myK = other.myK;
429 }
430 return *this;
431 }

References myK, and SCellToIncidentPoints().

Field Documentation

◆ myK

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

Aliasing pointer on the Khalimsky space.

Definition at line 398 of file SCellsFunctors.h.

Referenced by operator()(), operator=(), SCellToIncidentPoints(), SCellToIncidentPoints(), and SCellToIncidentPoints().


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