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::SCellToIncidentPoints< KSpace > Class Template Reference

#include <SCellsFunctors.h>

Public Types

typedef KSpace::Point Point
typedef std::pair< Point, PointOutput
typedef KSpace::SCell Input

Public Member Functions

 SCellToIncidentPoints ()
 SCellToIncidentPoints (const KSpace &aK)
 SCellToIncidentPoints (const SCellToIncidentPoints &other)
SCellToIncidentPointsoperator= (const SCellToIncidentPoints &other)
Output operator() (const Input &s) const

Private Attributes

const KSpace * myK

Detailed Description

template<typename KSpace>
class DGtal::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

Definition at line 462 of file SCellsFunctors.h.


Member Typedef Documentation

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

Definition at line 469 of file SCellsFunctors.h.

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

Definition at line 468 of file SCellsFunctors.h.

template<typename KSpace>
typedef KSpace::Point DGtal::SCellToIncidentPoints< KSpace >::Point

Definition at line 467 of file SCellsFunctors.h.


Constructor & Destructor Documentation

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

Default constructor.

Definition at line 482 of file SCellsFunctors.h.

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

Constructor.

Parameters:
aKa Khalimsky space

Definition at line 487 of file SCellsFunctors.h.

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

Copy constructor.

Parameters:
otherany SCellToIncidentPoints functor

Definition at line 493 of file SCellsFunctors.h.

: myK(other.myK) { }

Member Function Documentation

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

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

{
ASSERT( myK );
//inner point
Input innerPixel( myK->sIndirectIncident( s, *myK->sOrthDirs( s ) ) );
//outer point
Input outerPixel( myK->sDirectIncident( s, *myK->sOrthDirs( s ) ) );
return Output(myK->sCoords( innerPixel ),myK->sCoords( outerPixel ));
}
template<typename KSpace>
SCellToIncidentPoints& DGtal::SCellToIncidentPoints< KSpace >::operator= ( const SCellToIncidentPoints< KSpace > &  other)
inline

Assignment.

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

Definition at line 501 of file SCellsFunctors.h.

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

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

Field Documentation

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

Aliasing pointer on the Khalimsky space.

Definition at line 475 of file SCellsFunctors.h.

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


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