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;
81 anAlphaSegment2.init(fc.begin());
82 while (anAlphaSegment2.end() != fc.end() && anAlphaSegment2.extendFront()) {
85 aBoard << anAlphaSegment2;
89 AlphaThickSegmentComputer2D anAlphaSegment2Eucl(5, functions::Hull2D::EuclideanThickness);
92 anAlphaSegment2Eucl.init(fc.begin());
93 while (anAlphaSegment2Eucl.end() != fc.end() &&
94 anAlphaSegment2Eucl.extendFront()) {
97 aBoard <<
CustomStyle( anAlphaSegment2Eucl.className(),
99 aBoard << anAlphaSegment2Eucl;
102 FCConstIterator fcIt = fc.begin();
103 while (anAlphaSegment3.extendFront(*fcIt)) {
109 aBoard << anAlphaSegment3;
113 aBoard.
saveEPS(
"exampleAlphaThickSegment.eps");
void beginBlock(const std::string &keyword="")
Custom style class redefining the pen color and the fill color. You may use Board2D::Color::None for ...
DGtal is the top-level namespace which contains all DGtal functions and types.
void saveEPS(const char *filename, PageSize size=Board::BoundingBox, double margin=10.0) const
Structure representing an RGB triple with alpha component.
Aim: This class is devoted to the recognition of alpha thick segments as described in ...
Aim: This class specializes a 'Board' class so as to display DGtal objects more naturally (with <<)...