43 #include "ConfigExamples.h"
44 #include "DGtal/helpers/StdDefs.h"
45 #include "DGtal/base/Common.h"
46 #include "DGtal/geometry/curves/AlphaThickSegmentComputer.h"
47 #include "DGtal/io/boards/Board2D.h"
48 #include "DGtal/io/readers/PointListReader.h"
52 using namespace DGtal;
66 std::string freemanChainFilename = examplesPath +
"samples/contourS.fc";
68 fst.open (freemanChainFilename.c_str(), ios::in);
74 AlphaThickSegmentComputer2D anAlphaSegment(15), anAlphaSegment2(5), anAlphaSegment3(2);
75 anAlphaSegment.init(fc.begin());
76 while (anAlphaSegment.end() != fc.end() &&
77 anAlphaSegment.extendFront()) {
79 aBoard << anAlphaSegment;
82 AlphaThickSegmentComputer2D anAlphaSegment2Eucl(5, functions::Hull2D::EuclideanThickness);
85 anAlphaSegment2Eucl.init(fc.begin());
86 while (anAlphaSegment2Eucl.end() != fc.end() &&
87 anAlphaSegment2Eucl.extendFront()) {
90 aBoard <<
CustomStyle( anAlphaSegment2Eucl.className(),
92 aBoard << anAlphaSegment2Eucl;
95 anAlphaSegment2.init(fc.begin());
96 while (anAlphaSegment2.end() != fc.end() && anAlphaSegment2.extendFront()) {
99 aBoard << anAlphaSegment2;
103 FCConstIterator fcIt = fc.begin();
104 while (anAlphaSegment3.extendFront(*fcIt)) {
110 aBoard << anAlphaSegment3;
114 aBoard.
saveEPS(
"exampleAlphaThickSegment.eps");