44#include "ConfigExamples.h"
45#include "DGtal/base/Common.h"
47#include "DGtal/geometry/curves/AlphaThickSegmentComputer.h"
48#include "DGtal/helpers/StdDefs.h"
49#include "DGtal/io/readers/PointListReader.h"
51#include "DGtal/io/boards/Board2D.h"
68 std::string file = examplesPath +
"samples/contourSnoisy.sdp";
74 aBoard <<
SetMode(aContour[0].className(),
"Grid");
75 for (
unsigned int i = 0; i< aContour.size(); i++){
76 aBoard << aContour[i];
77 aBoard.
drawLine(aContour[i][0], aContour[i][1],
78 aContour[(i+1)%aContour.size()][0], aContour[(i+1)%aContour.size()][1]);
85 AlphaThickSegmentComputer2D anAlphaSegment(15);
88 std::vector<Z2i::RealPoint>::const_iterator it = aContour.begin();
89 while (anAlphaSegment.extendFront(*it)) {
96 aBoard << anAlphaSegment;
98 AlphaThickSegmentComputer2D anAlphaSegment2(9);
100 anAlphaSegment2.init(aContour.begin());
101 while (anAlphaSegment2.end() != aContour.end() &&
102 anAlphaSegment2.extendFront()) {
108 aBoard << anAlphaSegment2;
111 AlphaThickSegmentComputer2D anAlphaSegment3(2);
112 anAlphaSegment3.init(aContour.begin());
113 while (anAlphaSegment3.end() != aContour.end() &&
114 anAlphaSegment3.extendFront()) {
117 aBoard << anAlphaSegment3;
120 aBoard.
saveEPS(
"exampleAlphaThickSegmentNoisy.eps");
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 <<)....
void beginBlock(const std::string &keyword="")
void drawLine(double x1, double y1, double x2, double y2, int depthValue=-1)
void saveEPS(const char *filename, PageSize size=Board::BoundingBox, double margin=10.0) const
DGtal is the top-level namespace which contains all DGtal functions and types.
Custom style class redefining the pen color and the fill color. You may use Board2D::Color::None for ...
static std::vector< TPoint > getPointsFromFile(const std::string &filename, std::vector< unsigned int > aVectPosition=std::vector< unsigned int >())
Modifier class in a Board2D stream. Useful to choose your own mode for a given class....