32 #if defined(SCellsFunctors_RECURSES)
33 #error Recursive header files inclusion detected in SCellsFunctors.h
34 #else // defined(SCellsFunctors_RECURSES)
36 #define SCellsFunctors_RECURSES
38 #if !defined SCellsFunctors_h
40 #define SCellsFunctors_h
46 #include "DGtal/base/Common.h"
47 #include "DGtal/kernel/SpaceND.h"
48 #include "DGtal/base/BasicBoolFunctions.h"
70 template <
typename KSpace>
74 typedef typename KSpace::Point
Output;
75 typedef typename KSpace::SCell
Input;
127 while (
myK->sDim(s) > 0 )
129 Input tmp(
myK->sIndirectIncident( s, *
myK->sDirs( s ) ) );
130 ASSERT(
myK->sDim(tmp) <
myK->sDim(s) );
155 template <
typename KSpace>
161 typedef typename KSpace::Space::RealPoint
Output;
162 typedef typename KSpace::SCell
Input;
227 template <
typename KSpace>
233 typedef typename KSpace::Point
Point;
236 typedef typename KSpace::SCell
Input;
287 Input pointel(
myK->sIndirectIncident( s, *
myK->sDirs( s ) ) );
290 Vector v(
myK->sKCoords( s ) -
myK->sKCoords( pointel ) );
310 template <
typename KSpace>
317 typedef typename KSpace::SCell
Input;
366 Input pixel(
myK->sIndirectIncident( s, *
myK->sOrthDirs( s ) ) );
386 template <
typename KSpace>
392 typedef typename KSpace::SCell
Input;
441 Input pixel(
myK->sDirectIncident( s, *
myK->sOrthDirs( s ) ) );
461 template <
typename KSpace>
467 typedef typename KSpace::Point
Point;
469 typedef typename KSpace::SCell
Input;
519 Input innerPixel(
myK->sIndirectIncident( s, *
myK->sOrthDirs( s ) ) );
521 Input outerPixel(
myK->sDirectIncident( s, *
myK->sOrthDirs( s ) ) );
523 return Output(
myK->sCoords( innerPixel ),
myK->sCoords( outerPixel ));
537 template <
typename KSpace>
545 typedef typename KSpace::Point
Point;
549 typedef typename KSpace::SCell
Input;
599 Input pointel(
myK->sIndirectIncident( s, *
myK->sDirs( s ) ) );
602 Vector v(
myK->sKCoords( s ) -
myK->sKCoords( pointel ) );
603 if (v ==
Vector(1,0))
return '0';
604 else if (v ==
Vector(0,1))
return '1';
605 else if (v ==
Vector(-1,0))
return '2';
606 else if (v ==
Vector(0,-1))
return '3';
623 #endif // !defined SCellsFunctors_h
625 #undef SCellsFunctors_RECURSES
626 #endif // else defined(SCellsFunctors_RECURSES)