DGtal 1.4.2
Loading...
Searching...
No Matches
DGtal::functors::SCellToInnerPoint< KSpace > Class Template Reference

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

#include <DGtal/topology/SCellsFunctors.h>

Public Types

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

Public Member Functions

 SCellToInnerPoint ()
 
 SCellToInnerPoint (ConstAlias< KSpace > aK)
 
 SCellToInnerPoint (const SCellToInnerPoint &other)
 
SCellToInnerPointoperator= (const SCellToInnerPoint &other)
 
Output operator() (const Input &s) const
 

Private Attributes

const KSpacemyK
 

Detailed Description

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

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

Description of template class 'SCellToInnerPoint'

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

Template Parameters
KSpacethe Khalimsky space
See also
SCellToPoint SCellToOuterPoint ConstIteratorAdapter KhalimskySpaceND PointVector
Examples
tutorial-examples/FMMErosion.cpp.

Definition at line 323 of file SCellsFunctors.h.

Member Typedef Documentation

◆ Input

Definition at line 329 of file SCellsFunctors.h.

◆ Output

Definition at line 328 of file SCellsFunctors.h.

Constructor & Destructor Documentation

◆ SCellToInnerPoint() [1/3]

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

Default constructor.

Definition at line 342 of file SCellsFunctors.h.

342: myK(NULL) { }

◆ SCellToInnerPoint() [2/3]

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

Constructor.

Parameters
aKa Khalimsky space

Definition at line 347 of file SCellsFunctors.h.

347: myK(&aK) { }

◆ SCellToInnerPoint() [3/3]

template<typename KSpace >
DGtal::functors::SCellToInnerPoint< KSpace >::SCellToInnerPoint ( const SCellToInnerPoint< KSpace > & other)
inline

Copy constructor.

Parameters
otherany SCellToInnerPoint functor

Definition at line 353 of file SCellsFunctors.h.

354 : myK(other.myK) { }

Member Function Documentation

◆ operator()()

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

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

Parameters
sa linel
Returns
the inner pixel center

Definition at line 375 of file SCellsFunctors.h.

376 {
377 ASSERT( myK );
378 Input pixel( myK->sDirectIncident( s, *myK->sOrthDirs( s ) ) );
379 return Output( myK->sCoords( pixel ) ); //integer coordinates
380 }
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.

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

◆ operator=()

template<typename KSpace >
SCellToInnerPoint & DGtal::functors::SCellToInnerPoint< KSpace >::operator= ( const SCellToInnerPoint< KSpace > & other)
inline

Assignment.

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

Definition at line 361 of file SCellsFunctors.h.

362 {
363 if (this != &other)
364 {
365 myK = other.myK;
366 }
367 return *this;
368 }

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

Field Documentation

◆ myK

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

Aliasing pointer on the Khalimsky space.

Definition at line 335 of file SCellsFunctors.h.

Referenced by DGtal::functors::SCellToInnerPoint< KSpace >::operator()(), and DGtal::functors::SCellToInnerPoint< KSpace >::operator=().


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