DGtal  0.6.devel
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Types | Public Member Functions | Private Attributes
DGtal::SCellToInnerPoint< KSpace > Class Template Reference

#include <SCellsFunctors.h>

Public Types

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

Public Member Functions

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

Private Attributes

const KSpace * myK

Detailed Description

template<typename KSpace>
class DGtal::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 311 of file SCellsFunctors.h.


Member Typedef Documentation

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

Definition at line 317 of file SCellsFunctors.h.

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

Definition at line 316 of file SCellsFunctors.h.


Constructor & Destructor Documentation

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

Default constructor.

Definition at line 330 of file SCellsFunctors.h.

: myK(NULL) { }
template<typename KSpace>
DGtal::SCellToInnerPoint< KSpace >::SCellToInnerPoint ( const KSpace &  aK)
inline

Constructor.

Parameters:
aKa Khalimsky space

Definition at line 335 of file SCellsFunctors.h.

: myK(&aK) { }
template<typename KSpace>
DGtal::SCellToInnerPoint< KSpace >::SCellToInnerPoint ( const SCellToInnerPoint< KSpace > &  other)
inline

Copy constructor.

Parameters:
otherany SCellToInnerPoint functor

Definition at line 341 of file SCellsFunctors.h.

: myK(other.myK) { }

Member Function Documentation

template<typename KSpace>
Output DGtal::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 363 of file SCellsFunctors.h.

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

{
ASSERT( myK );
Input pixel( myK->sIndirectIncident( s, *myK->sOrthDirs( s ) ) );
return Output( myK->sCoords( pixel ) ); //integer coordinates
}
template<typename KSpace>
SCellToInnerPoint& DGtal::SCellToInnerPoint< KSpace >::operator= ( const SCellToInnerPoint< KSpace > &  other)
inline

Assignment.

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

Definition at line 349 of file SCellsFunctors.h.

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

{
if (this != &other)
{
myK = other.myK;
}
return *this;
}

Field Documentation

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

Aliasing pointer on the Khalimsky space.

Definition at line 323 of file SCellsFunctors.h.

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


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