DGtal 2.1.0
Loading...
Searching...
No Matches
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 310 of file SCellsFunctors.h.

Member Typedef Documentation

◆ Input

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

Definition at line 315 of file SCellsFunctors.h.

◆ Output

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

Definition at line 314 of file SCellsFunctors.h.

Constructor & Destructor Documentation

◆ SCellToOuterPoint() [1/3]

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

Default constructor.

Definition at line 328 of file SCellsFunctors.h.

328: 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 333 of file SCellsFunctors.h.

333: 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 339 of file SCellsFunctors.h.

340 : 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 361 of file SCellsFunctors.h.

362 {
363 ASSERT( myK );
364 Input pixel( myK->sIndirectIncident( s, *myK->sOrthDirs( s ) ) );
365 return Output( myK->sCoords( pixel ) ); //integer coordinates
366 }
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 347 of file SCellsFunctors.h.

348 {
349 if (this != &other)
350 {
351 myK = other.myK;
352 }
353 return *this;
354 }

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 321 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: