39 #if defined(FreemanChain_RECURSES)
40 #error Recursive header files inclusion detected in FreemanChain.h
41 #else // defined(FreemanChain_RECURSES)
43 #define FreemanChain_RECURSES
45 #if !defined FreemanChain_h
47 #define FreemanChain_h
56 #include "DGtal/kernel/PointVector.h"
57 #include "DGtal/base/OrderedAlphabet.h"
58 #include "DGtal/base/Circulator.h"
59 #include "DGtal/arithmetic/ModuloComputer.h"
61 #include "DGtal/base/CConstSinglePassRange.h"
109 template <
typename TInteger>
139 std::iterator<std::bidirectional_iterator_tag, Point, int, Point*, Point>
421 if (
this != &other )
436 std::string::size_type
size()
const
455 out <<
"[FreemanChainCodes]" << std::endl;
457 std::copy( this->
begin(), this->
end(), ostream_iterator<Value>(out,
"") );
469 object.selfDisplay( out );
539 return CodesRange(
chain);
560 FreemanChain(
const std::string & s =
"", TInteger x = 0, TInteger y = 0 );
600 && (
xn == other.
xn ) && (
yn == other.
yn );
610 return !( (*this) == other );
674 TInteger& max_x, TInteger& max_y )
const;
693 typename Self::ConstIterator
716 typename Self::ConstIterator
808 ConstIterator
begin()
const;
815 ConstIterator
end()
const;
848 out << c.
x0 <<
" " << c.
y0 <<
" " << c.
chain << endl;
866 template<
typename TConstIterator>
875 template<
typename TRange>
885 std::vector<Point> & aVContour );
922 static char movement(
char aCode1,
char aCode2,
944 static void displacement(
int & dx,
int & dy,
char aCode );
965 static char turnedCode(
char aCode,
bool ccw =
true );
990 std::vector<unsigned int> & aPl2pix,
991 std::vector<unsigned int> & aPix2pl,
994 innerContour( aPixChain, aPl2pix, aPix2pl, aPlChain,
true );
1025 std::vector<unsigned int> & aOuter2inner,
1026 std::vector<unsigned int> & aInner2outer,
1057 std::vector< std::pair<unsigned int, unsigned int> > & aC2clean,
1058 std::vector< std::vector<unsigned int> > & aClean2c,
1088 std::vector<unsigned int> & aC2clean,
1089 std::vector<unsigned int> & aClean2c,
1191 template<
typename TInteger>
1193 operator<< ( std::ostream & out, const FreemanChain<TInteger> & object );
1201 #include "DGtal/geometry/curves/FreemanChain.ih"
1206 #endif // !defined FreemanChain_h
1208 #undef FreemanChain_RECURSES
1209 #endif // else defined(FreemanChain_RECURSES)