69 trace.
beginBlock (
"Example of AlphaThickSegment tangential cover obtained from SaturatedSegmentation" );
72 typedef std::vector<Z2i::RealPoint>::const_iterator RAConstIterator;
80 std::string file = examplesPath +
"samples/contourSnoisy.sdp";
84 aBoard <<
SetMode(aContour[0].className(),
"Grid");
85 aBoard2 <<
SetMode(aContour[0].className(),
"Grid");
86 std::vector<LibBoard::Point> poly;
87 for (
unsigned int i = 0; i< aContour.size(); i++) poly.push_back(
LibBoard::Point(aContour[i][0], aContour[i][1]));
99 AlphaSegmentation segmentator(circulator, circulator, computer);
103 AlphaSegmentation::SegmentComputerIterator i = segmentator.begin();
104 AlphaSegmentation::SegmentComputerIterator end = segmentator.end();
106 for ( ; i != end; ++i) {
107 AlphaThickSegmentComputer2D current(*i);
108 aBoard <<
SetMode(current.className(),
"BoundingBox");
112 aBoard.
saveEPS(
"exampleAlphaThickSegmentTgtCover.eps");
115 trace.
beginBlock (
"Example of AlphaThickSegment tangential cover obtained for a single point" );
120 unsigned int index = 80;
122 AlphaThickSegmentComputer2D first (computer);
124 AlphaThickSegmentComputer2D last (computer);
128 aBoard2.
fillCircle((*(circulator+index))[0], (*(circulator+index))[1], 1.0);
130 while(first.end() != last.end()){
131 aBoard2 <<
SetMode(first.className(),
"BoundingBox");
139 name <<
"exampleAlphaThickSegmentTgtCoverPoint" << index<<
".eps";
140 aBoard2.
saveEPS(name.str().c_str());
void lastMaximalSegment(SC &s, const typename SC::ConstIterator &i, const typename SC::ConstIterator &begin, const typename SC::ConstIterator &end, DGtal::ForwardSegmentComputer)
void firstMaximalSegment(SC &s, const typename SC::ConstIterator &i, const typename SC::ConstIterator &begin, const typename SC::ConstIterator &end, DGtal::ForwardSegmentComputer)