File failed to load: https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.3/config/TeX-MML-AM_CHTML/MathJax.js
DGtal 2.0.0
DGtal::functors::SCellToArrow< KSpace > Class Template Reference

Aim: transforms a signed cell into an arrow, ie. a pair point-vector. More...

#include <DGtal/topology/SCellsFunctors.h>

Public Types

typedef KSpace::Point Point
typedef KSpace::Vector Vector
typedef std::pair< Point, VectorOutput
typedef KSpace::SCell Input

Public Member Functions

 SCellToArrow ()
 SCellToArrow (ConstAlias< KSpace > aK)
 SCellToArrow (const SCellToArrow &other)
SCellToArrowoperator= (const SCellToArrow &other)
Output operator() (const Input &s) const

Private Attributes

const KSpacemyK

Detailed Description

template<typename KSpace>
class DGtal::functors::SCellToArrow< KSpace >

Aim: transforms a signed cell into an arrow, ie. a pair point-vector.

Description of template class 'SCellToArrow'

Template Parameters
KSpacethe Khalimsky space
See also
SCellToPoint ConstIteratorAdapter KhalimskySpaceND PointVector

Definition at line 151 of file SCellsFunctors.h.

Member Typedef Documentation

◆ Input

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

Definition at line 159 of file SCellsFunctors.h.

◆ Output

template<typename KSpace>
typedef std::pair<Point,Vector> DGtal::functors::SCellToArrow< KSpace >::Output

Definition at line 158 of file SCellsFunctors.h.

◆ Point

Definition at line 156 of file SCellsFunctors.h.

◆ Vector

Definition at line 157 of file SCellsFunctors.h.

Constructor & Destructor Documentation

◆ SCellToArrow() [1/3]

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

Default constructor.

Definition at line 172 of file SCellsFunctors.h.

172: myK(NULL) { }
Aim: transforms a signed cell into an arrow, ie. a pair point-vector.

References myK.

Referenced by operator=(), and SCellToArrow().

◆ SCellToArrow() [2/3]

template<typename KSpace>
DGtal::functors::SCellToArrow< KSpace >::SCellToArrow ( ConstAlias< KSpace > aK)
inline

Constructor.

Parameters
aKa Khalimsky space

Definition at line 177 of file SCellsFunctors.h.

177: myK(&aK) { }

References myK.

◆ SCellToArrow() [3/3]

template<typename KSpace>
DGtal::functors::SCellToArrow< KSpace >::SCellToArrow ( const SCellToArrow< KSpace > & other)
inline

Copy constructor.

Parameters
otherany SCellToArrow modifier

Definition at line 183 of file SCellsFunctors.h.

184 : myK(other.myK) { }

References myK, and SCellToArrow().

Member Function Documentation

◆ operator()()

template<typename KSpace>
Output DGtal::functors::SCellToArrow< KSpace >::operator() ( const Input & s) const
inline

Get an arrow, ie a pair point-vector with integer coordinates from a scell in khalimsky coordinates

Parameters
sa scell
Returns
the corresponding point.

Definition at line 206 of file SCellsFunctors.h.

207 {
208 ASSERT( myK );
209 //starting point of the arrow
210 Input pointel( myK->sIndirectIncident( s, *myK->sDirs( s ) ) );
211 Point p( myK->sCoords( pointel ) ); //integer coordinates
212 //displacement vector
213 Vector v( myK->sKCoords( s ) - myK->sKCoords( pointel ) );
214 return Output(p,v);
215 }
std::pair< Point, Vector > Output

References myK.

◆ operator=()

template<typename KSpace>
SCellToArrow & DGtal::functors::SCellToArrow< KSpace >::operator= ( const SCellToArrow< KSpace > & other)
inline

Assignment.

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

Definition at line 191 of file SCellsFunctors.h.

192 {
193 if (this != &other)
194 {
195 myK = other.myK;
196 }
197 return *this;
198 }

References myK, and SCellToArrow().

Field Documentation

◆ myK

template<typename KSpace>
const KSpace* DGtal::functors::SCellToArrow< KSpace >::myK
private

Aliasing pointer on the Khalimsky space.

Definition at line 165 of file SCellsFunctors.h.

Referenced by operator()(), operator=(), SCellToArrow(), SCellToArrow(), and SCellToArrow().


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