DGtal  1.1.0
Public Types | Public Member Functions | Private Attributes
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>

Collaboration diagram for DGtal::functors::SCellToInnerPoint< KSpace >:

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

Definition at line 323 of file SCellsFunctors.h.

Member Typedef Documentation

◆ Input

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

Definition at line 329 of file SCellsFunctors.h.

◆ Output

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

Definition at line 328 of file SCellsFunctors.h.

Constructor & Destructor Documentation

◆ SCellToInnerPoint() [1/3]

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

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)


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)

Copy constructor.

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

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

sa linel
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  }

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)


otherthe object to copy.
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

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:
const KSpace * myK
Definition: SCellsFunctors.h:335
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.
KSpace::Point Output
Definition: SCellsFunctors.h:328
KSpace::SCell Input
Definition: SCellsFunctors.h:329