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

#include <Modifier.h>

Public Types

typedef PointVector
< KSpace::dimension, double > 
Output
typedef KSpace::SCell Input

Public Member Functions

 SCellToMidPoint ()
 SCellToMidPoint (KSpace aK)
 SCellToMidPoint (const SCellToMidPoint &other)
SCellToMidPointoperator= (const SCellToMidPoint &other)
Output get (const Input &s) const

Private Attributes

KSpace myK

Detailed Description

template<typename KSpace>
class DGtal::deprecated::SCellToMidPoint< KSpace >

Aim: transforms a scell into a real point (the coordinates are divided by 2)

Description of template class 'SCellToMidPoint'

Template Parameters:
KSpace,theKhalimsky space
KSpace aKSpace;
KSpace::SCell aSCell;
PointVector<typename KSpace::dimension,double> aPoint;
SCellToMidPoint<KSpace> m(aKSpace);
...
aPoint = m.get(aSCell);
See also:
ConstIteratorAdapter KhalimskySpaceND PointVector

Definition at line 269 of file Modifier.h.


Member Typedef Documentation

template<typename KSpace >
typedef KSpace::SCell DGtal::deprecated::SCellToMidPoint< KSpace >::Input

Definition at line 275 of file Modifier.h.

template<typename KSpace >
typedef PointVector<KSpace::dimension,double> DGtal::deprecated::SCellToMidPoint< KSpace >::Output

Definition at line 274 of file Modifier.h.


Constructor & Destructor Documentation

template<typename KSpace >
DGtal::deprecated::SCellToMidPoint< KSpace >::SCellToMidPoint ( )
inline

Default constructor.

Definition at line 285 of file Modifier.h.

{ }
template<typename KSpace >
DGtal::deprecated::SCellToMidPoint< KSpace >::SCellToMidPoint ( KSpace  aK)
inline

Constructor.

Parameters:
aKa Khalimsky space

Definition at line 290 of file Modifier.h.

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

Copy constructor.

Parameters:
otherany SCellToMidPoint modifier

Definition at line 296 of file Modifier.h.

: myK(other.myK) { }

Member Function Documentation

template<typename KSpace >
Output DGtal::deprecated::SCellToMidPoint< KSpace >::get ( const Input s) const
inline

Get a real point (double coordinates) from a scell (khalimsky coordinates)

Parameters:
sa scell
Returns:
the corresponding point.

Definition at line 318 of file Modifier.h.

References DGtal::deprecated::SCellToMidPoint< KSpace >::myK.

{
Output o( myK.sKCoords(s) );
o /= 2;
return o;
}
template<typename KSpace >
SCellToMidPoint& DGtal::deprecated::SCellToMidPoint< KSpace >::operator= ( const SCellToMidPoint< KSpace > &  other)
inline

Assignment.

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

Definition at line 304 of file Modifier.h.

References DGtal::deprecated::SCellToMidPoint< KSpace >::myK.

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

Field Documentation

template<typename KSpace >
KSpace DGtal::deprecated::SCellToMidPoint< KSpace >::myK
private

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