DGtal  0.9.2
testAlphaThickSegmentComputer.cpp
1 
30 #include <iostream>
32 #include "DGtal/base/Common.h"
33 #include "ConfigTest.h"
34 #include "DGtal/helpers/StdDefs.h"
35 #include "DGtal/geometry/curves/AlphaThickSegmentComputer.h"
36 #include "DGtal/io/readers/PointListReader.h"
37 #include "DGtal/io/boards/Board2D.h"
39 
40 using namespace std;
41 using namespace DGtal;
42 
44 // Functions for testing class AlphaThickSegmentComputer.
46 
50 bool testAlphaThickSegmentConvexHullAndBox()
51 {
52  unsigned int nbok = 0;
53  unsigned int nb = 0;
54 
55  Board2D aBoard;
56  typedef AlphaThickSegmentComputer< Z2i::Point > AlphaThickSegmentComputer2D;
57  trace.beginBlock ( "Testing convexhull and boxes of alpha-thick segment on noisy discrete contour." );
58  std::vector<Z2i::Point> aContour;
59  std::string fileContour = testPath + "samples/contourNoiseSample.sdp";
60  aContour = PointListReader<Z2i::Point>::getPointsFromFile(fileContour);
61  bool res = true;
62  AlphaThickSegmentComputer2D anAlphaThickSegmentComputer(5);
63  anAlphaThickSegmentComputer.init(aContour.begin());
64  AlphaThickSegmentComputer2D anAlphaThickSegmentComputer2(10);
65  anAlphaThickSegmentComputer2.init(aContour.begin());
66  AlphaThickSegmentComputer2D anAlphaThickSegmentComputer3(2);
67  anAlphaThickSegmentComputer3.init(aContour.begin());
68  AlphaThickSegmentComputer2D anAlphaThickSegmentComputer4(1);
69  anAlphaThickSegmentComputer4.init(aContour.begin());
70 
71 
72  while (anAlphaThickSegmentComputer.end() != aContour.end() &&
73  anAlphaThickSegmentComputer.extendFront()){}
74  while (anAlphaThickSegmentComputer2.end() != aContour.end() &&
75  anAlphaThickSegmentComputer2.extendFront() ){}
76  while (anAlphaThickSegmentComputer3.end() != aContour.end() &&
77  anAlphaThickSegmentComputer3.extendFront()){}
78  while (anAlphaThickSegmentComputer4.end() != aContour.end() &&
79  anAlphaThickSegmentComputer4.extendFront()){}
80 
81 
82  // Display convexhull
83  aBoard.setLineWidth(5);
85  for (AlphaThickSegmentComputer2D::ConvexhullConstIterator it = anAlphaThickSegmentComputer.convexhullBegin();
86  it != anAlphaThickSegmentComputer.convexhullEnd(); it++){
87  if ((it+1) != anAlphaThickSegmentComputer.convexhullEnd()){
88  aBoard.drawLine((*it)[0], (*it)[1],
89  (*(it+1))[0],
90  (*(it+1))[1]);
91  }else{
92  aBoard.drawLine((*it)[0], (*it)[1],
93  (*(anAlphaThickSegmentComputer.convexhullBegin()))[0],
94  (*(anAlphaThickSegmentComputer.convexhullBegin()))[1]);
95  }
96  }
97 
98 
99  // Display boundingbox
100  aBoard << SetMode((*anAlphaThickSegmentComputer.begin()).className(), "Grid");
101  aBoard << CustomStyle( anAlphaThickSegmentComputer2.className(),
103  aBoard << anAlphaThickSegmentComputer2;
104  aBoard << CustomStyle( anAlphaThickSegmentComputer.className(),
106  aBoard << anAlphaThickSegmentComputer;
107  aBoard << CustomStyle( anAlphaThickSegmentComputer3.className(),
109  aBoard << anAlphaThickSegmentComputer3;
110  aBoard << CustomStyle( anAlphaThickSegmentComputer4.className(),
112  aBoard << anAlphaThickSegmentComputer4;
113 
114 
115  // Display the input curve
116  aBoard << SetMode((*aContour.begin()).className(), "Grid");
117  for (std::vector<Z2i::Point>::const_iterator it = aContour.begin();
118  it != aContour.end(); it++){
119  aBoard << *it;
120  if (it+1 != aContour.end()){
121  Z2i::Point next = *(it+1);
123  aBoard.drawLine((*it)[0], (*it)[1], next[0], next[1]);
124  }
125  }
126 
127  aBoard.saveEPS("testAlphaThickSegmentComputer_Convexhull.eps");
128  trace.info() << " Alpha Thick with alpha 5, size (awaited be 41) = " << anAlphaThickSegmentComputer.getNumberSegmentPoints();
129  res = anAlphaThickSegmentComputer.getNumberSegmentPoints()==41;
130  nbok += res ? 1 : 0;
131  nb++;
132  trace.info() << "(" << nbok << "/" << nb << ") " << std::endl;
133  trace.endBlock();
134 
135  trace.beginBlock("Testing access to extremity points");
136  trace.info() << "First extremity point: " << anAlphaThickSegmentComputer.getExtremityPoints().first <<
137  " ( should be " << *(aContour.begin())<< ")" << std::endl;
138  trace.info() << "Second extremity point: " << anAlphaThickSegmentComputer.getExtremityPoints().second <<
139  " ( should be (80, 18) )" << std::endl;
140 
141  res = anAlphaThickSegmentComputer.getExtremityPoints().first == *(aContour.begin())&&
142  anAlphaThickSegmentComputer.getExtremityPoints().second == Z2i::Point(80,18);
143  nbok += res ? 1 : 0;
144  nb++;
145  trace.info() << "(" << nbok << "/" << nb << ") " << std::endl;
146  trace.endBlock();
147 
148 
149  trace.beginBlock("Testing access to anti podal points");
150  std::pair<std::pair<Z2i::Point, Z2i::Point>,
151  Z2i::Point> pairAntipodal = anAlphaThickSegmentComputer.getAntipodalLeaningPoints();
152 
153  Z2i::Point p = pairAntipodal.first.first;
154  Z2i::Point q = pairAntipodal.first.second;
155  Z2i::Point s = pairAntipodal.second;
157  aBoard.drawLine(p[0], p[1], q[0], q[1]);
158  aBoard.fillCircle(s[0], s[1], 0.2);
159  aBoard.saveEPS("testAlphaThickSegmentComputer_ConvexhullAntipodal.eps");
160 
161  trace.info() << "Antipodal pair: p " << p << ", q:" << q << ", s: "<< s << std::endl;
162  trace.info() << "Should be " << Z2i::Point(78,16) << " " << Z2i::Point(79,6) << Z2i::Point(83,13) <<std::endl;
163 
164  res = p==Z2i::Point(78,16) && q==Z2i::Point(79,6) && s == Z2i::Point(83,13);
165  nbok += res ? 1 : 0;
166  nb++;
167  trace.info() << "(" << nbok << "/" << nb << ") " << std::endl;
168 
169 
170  trace.beginBlock("Testing getter of segment parameters");
171  pairAntipodal = anAlphaThickSegmentComputer4.getAntipodalLeaningPoints();
172  p = pairAntipodal.first.first;
173  q = pairAntipodal.first.second;
174  s = pairAntipodal.second;
175 
176  Z2i::RealPoint vectDir = (p-q)[0]>0? p-q: q-p;
177 
178  trace.info() << "Segment4 params: vect Dir: " << vectDir << std::endl;
179  trace.info() << "Should be: " << Z2i::RealPoint(1,1) <<std::endl;
180 
181  res = vectDir == Z2i::RealPoint(1,1);
182  nbok += res ? 1 : 0;
183  nb++;
184  trace.info() << "(" << nbok << "/" << nb << ") " << std::endl;
185  trace.endBlock();
186  return nbok == nb;
187 }
188 
189 
190 
194 bool testAlphaThickSegmentComputerFloatingPointContour()
195 {
196  unsigned int nbok = 0;
197  unsigned int nb = 0;
198  Board2D aBoard;
199  typedef AlphaThickSegmentComputer< Z2i::RealPoint> AlphaThickSegmentComputer2D;
201 
202  trace.beginBlock ( "Testing alpha-thick segment on contour composed of floating coords ..." );
203  std::vector<Z2i::RealPoint> aContour;
204  std::string fileContour = testPath + "samples/contourNoiseSample2.sdp";
206 
207  AlphaThickSegmentComputer2D anAlphaThickSegmentComputer(2);
208  anAlphaThickSegmentComputer.init(aContour.begin()+10);
209 
210  while (anAlphaThickSegmentComputer.end()!= aContour.end() &&
211  anAlphaThickSegmentComputer.extendFront()){
212  }
213 
214 
215  // Display alpha thick segment
216  aBoard << SetMode((*anAlphaThickSegmentComputer.begin()).className(), "Grid");
217  aBoard << anAlphaThickSegmentComputer;
218 
219 
220  // Test primitive of parallelStrip and display the input curve
221  Primitive pStrip = anAlphaThickSegmentComputer.primitive();
222  unsigned int nbInStrip = 0;
223 
224  aBoard << SetMode((*aContour.begin()).className(), "Grid");
225  for (std::vector<Z2i::RealPoint>::const_iterator it = aContour.begin();
226  it != aContour.end(); it++){
227  if (it+1 != aContour.end()){
228  Z2i::RealPoint next = *(it+1);
229  aBoard.setLineWidth(2);
231  aBoard.drawLine((*it)[0], (*it)[1], next[0], next[1]);
232  }
233  if (pStrip(*it)){
234  nbInStrip++;
235  aBoard << *it;
236  }
237  }
238  trace.info() << "Nb contour points in the segment parallel strip (awaited 32) = " << nbInStrip << std::endl;
239 
240  nbok += nbInStrip==32;
241  nb++;
242 
243  nbok += anAlphaThickSegmentComputer.getNumberSegmentPoints()==31 ? 1 : 0;
244  nb++;
245 
246  trace.info() << "Segment size (awaited 31): " << anAlphaThickSegmentComputer.getNumberSegmentPoints() << std::endl;
247  aBoard.saveEPS("testAlphaThickSegmentComputer_FloatingPt.eps");
248 
249  trace.info() << "(" << nbok << "/" << nb << ") " << std::endl;
250  trace.endBlock();
251  return nbok == nb;
252 }
253 
254 
255 
256 
257 
261 bool testAlphaThickSegmentFreeman()
262 {
263  unsigned int nbok = 0;
264  unsigned int nb = 0;
265  typedef FreemanChain<Z2i::Space::Integer>::ConstIterator FCConstIterator;
266  typedef AlphaThickSegmentComputer< Z2i::Space::Point, FCConstIterator > AlphaThickSegmentComputer2D;
267 
268  Board2D aBoard;
269 
270 
271 
272  trace.beginBlock ( "Testing AlphaThickSegmentComputer2D on Freeman chain ..." );
273 
274  // Reading input contour
275  std::string freemanChainFilename = testPath + "samples/klokan.fc";
276  fstream fst;
277  fst.open (freemanChainFilename.c_str(), ios::in);
279  fst.close();
280  aBoard << fc;
281 
282 
283  AlphaThickSegmentComputer2D anAlphaThickSegmentComputer(70.0);
284  anAlphaThickSegmentComputer.init(fc.begin());
285  while (anAlphaThickSegmentComputer.end() != fc.end() &&
286  anAlphaThickSegmentComputer.extendFront()){
287  }
288 
289 
290  // Display segment
291  aBoard << SetMode((*anAlphaThickSegmentComputer.begin()).className(), "Grid");
292  aBoard << anAlphaThickSegmentComputer;
293  trace.info() << "Segment size (awaited 642): " << anAlphaThickSegmentComputer.getNumberSegmentPoints() << std::endl;
294  nbok += anAlphaThickSegmentComputer.getNumberSegmentPoints()==642 ? 1 : 0;
295  nb++;
296 
297  // Display points inside the parallel strip
298  unsigned int nbInStrip = 0;
299  AlphaThickSegmentComputer2D::Primitive parallelStrip = anAlphaThickSegmentComputer.primitive();
300 
301  for(FCConstIterator it = fc.begin(); it != fc.end(); it++){
302  if(parallelStrip(*it)){
304  aBoard.drawCircle( (*it)[0],(*it)[1], 1.0) ;
305  nbInStrip++;
306  }
307  }
309  aBoard.fillCircle( (*(fc.begin()))[0],(*(fc.begin()))[1], 1.0) ;
310 
311  trace.info() << "Nb contour points in the segment parallel strip (awaited 818) = " << nbInStrip << std::endl;
312 
313 
314  nbok += nbInStrip==818 ? 1 : 0;
315  nb++;
316 
317  trace.info() << "(" << nbok << "/" << nb << ") " << std::endl;
318  trace.endBlock();
319  aBoard.saveEPS("testAlphaThickSegmentComputer_Freeman.eps");
320 
321  return nbok == nb;
322 
323 }
324 
325 
329 bool testAlphaThickSpecialInit()
330 {
331  unsigned int nbok = 0;
332  unsigned int nb = 0;
333  Board2D aBoard, aBoard2;
334  typedef AlphaThickSegmentComputer< Z2i::RealPoint> AlphaThickSegmentComputer2D;
335  trace.beginBlock ( "Test special cases on various initialisations ..." );
336 
337  AlphaThickSegmentComputer2D segment(1.3);
338  std::vector<Z2i::RealPoint> aContour;
339  aContour.push_back(Z2i::RealPoint(29,20));
340  aContour.push_back(Z2i::RealPoint(30,20.01 ));
341  aContour.push_back(Z2i::RealPoint(31, 21));
342  aContour.push_back(Z2i::RealPoint(32,20));
343  segment.init(aContour.begin());
344  segment.extendFront();
345  while (segment.end()!= aContour.end() &&
346  segment.extendFront()){
347  }
348  nb++;
349  nbok = segment.getNumberSegmentPoints()==4;
350 
351  // Display alpha thick segment
352  for( std::vector<Z2i::RealPoint>::const_iterator it = aContour.begin(); it != aContour.end(); it++){
353  aBoard << *it;
354  }
355  // Display alpha thick segment
356  aBoard << SetMode((*segment.begin()).className(), "Grid");
357  aBoard << segment;
358 
359  Z2i::Point p = segment.getAntipodalLeaningPoints().first.first;
360  Z2i::Point q = segment.getAntipodalLeaningPoints().first.second;
361  Z2i::Point s = segment.getAntipodalLeaningPoints().second;
363  aBoard.drawLine(p[0], p[1], q[0], q[1]);
365  aBoard.fillCircle(s[0], s[1], 0.2);
366  aBoard.saveEPS("testSpecialInit.eps");
367 
368  trace.info() << "Segment size: " << segment.getNumberSegmentPoints() << "(awaited : " << 4 <<")"<< std::endl;
369  trace.info() << "(" << nbok << "/" << nb << ") " << std::endl;
370  trace.endBlock();
371  aBoard.saveEPS("testSpecialInit.eps");
372 
373  return nbok==nb;
374 }
375 
376 
377 
381 bool testMultiWidth()
382 {
383  Board2D aBoard;
384  typedef AlphaThickSegmentComputer< Z2i::RealPoint> AlphaThickSegmentComputer2D;
385  unsigned nb=0;
386  unsigned nbok =0;
387  trace.beginBlock ( "Testing alpha-thick segment with multi width ..." );
388  std::vector<Z2i::RealPoint> aContour;
389  std::string fileContour = testPath + "samples/contourNoiseSample2.sdp";
391  HueShadeColorMap<double> hueMap(0.0, 10);
392  unsigned int pos=0;
393  unsigned int nbTotalAdded=0;
394  for (double width=0.5; width<10; width+= 0.2, pos += 1) {
395  AlphaThickSegmentComputer2D anAlphaThickSegmentComputer(width);
396  anAlphaThickSegmentComputer.init(aContour.begin()+pos);
397  nbTotalAdded++;
398  while (anAlphaThickSegmentComputer.end()!= aContour.end() &&
399  anAlphaThickSegmentComputer.extendFront()){
400  nbTotalAdded++;
401  }
402  aBoard << SetMode((*anAlphaThickSegmentComputer.begin()).className(), "Grid");
403 
404  aBoard << CustomStyle( anAlphaThickSegmentComputer.className(),
405  new CustomColors( hueMap(width), DGtal::Color::None ) );
406  aBoard << anAlphaThickSegmentComputer;
407  }
408  trace.info() << "Nb total points added: " << nbTotalAdded << "(awaited: 2300) " << std::endl;
409  trace.endBlock();
410  aBoard.saveEPS("testMultiWidth.eps");
411  nb++;
412  nbok += nbTotalAdded == 2300;
413  return nb==nbok;
414 }
415 
416 
417 
418 
419 
423 bool
424 testThicknessDefinitions(){
425  Board2D aBoardHVthickness;
426  Board2D aBoardEuclthickness;
427  typedef AlphaThickSegmentComputer<Z2i::Point> AlphaThickSegmentComputer2D;
428  unsigned nb=0;
429  unsigned nbok =0;
430  trace.beginBlock ( "Testing alpha-thick segment with different thickness definitions:" );
431 
432  AlphaThickSegmentComputer2D anAlphaSegmentHV(1.35, functions::Hull2D::HorizontalVerticalThickness);
433  AlphaThickSegmentComputer2D anAlphaSegmentEucl(1.35, functions::Hull2D::EuclideanThickness);
434 
435  Z2i::Domain adom(Z2i::Point(99,45), Z2i::Point(106,55));
436  aBoardEuclthickness << adom;
437  aBoardHVthickness << adom;
438 
439  std::vector<Z2i::Point> aVect;
440  aVect.push_back(Z2i::Point(104, 54));
441  aVect.push_back(Z2i::Point(104, 53));
442  aVect.push_back(Z2i::Point(103, 53));
443  aVect.push_back(Z2i::Point(103, 52));
444  aVect.push_back(Z2i::Point(102, 52));
445  aVect.push_back(Z2i::Point(102, 51));
446  aVect.push_back(Z2i::Point(102, 50));
447  aVect.push_back(Z2i::Point(101, 50));
448  aVect.push_back(Z2i::Point(101, 49));
449  aVect.push_back(Z2i::Point(101, 48));
450  aVect.push_back(Z2i::Point(100, 48));
451  aVect.push_back(Z2i::Point(100, 47));
452  // Display the input curve
453  aBoardEuclthickness << SetMode((*aVect.begin()).className(), "Grid");
454  aBoardHVthickness << SetMode((*aVect.begin()).className(), "Grid");
455  for (std::vector<Z2i::Point>::const_iterator it = aVect.begin();
456  it != aVect.end(); it++){
457  aBoardHVthickness << *it;
458  aBoardEuclthickness << *it;
459  if (it+1 != aVect.end()){
460  Z2i::Point next = *(it+1);
461  aBoardEuclthickness.setPenColor(DGtal::Color::Gray);
462  aBoardHVthickness.setPenColor(DGtal::Color::Gray);
463  aBoardEuclthickness.drawLine((*it)[0], (*it)[1], next[0], next[1]);
464  aBoardHVthickness.drawLine((*it)[0], (*it)[1], next[0], next[1]);
465  }
466  }
467 
468  anAlphaSegmentEucl.init(aVect.begin());
469  while(anAlphaSegmentEucl.end() != aVect.end()
470  && anAlphaSegmentEucl.extendFront()){
471  }
472  anAlphaSegmentHV.init(aVect.begin());
473  while(anAlphaSegmentHV.end() != aVect.end()
474  && anAlphaSegmentHV.extendFront()){
475  }
476 
477 
478  trace.info() << "Euclidean thickness based segment, th= " << anAlphaSegmentEucl.getThickness() << std::endl;
479  trace.info() << "Horizontal/Vertical thickness based segment, th= " << anAlphaSegmentHV.getThickness() << std::endl;
480 
481 
482  aBoardHVthickness << CustomStyle( anAlphaSegmentEucl.className(), new CustomColors( DGtal::Color::Blue, DGtal::Color::None ) );
483  aBoardEuclthickness << CustomStyle( anAlphaSegmentHV.className(), new CustomColors( DGtal::Color::Blue, DGtal::Color::None ) );
484  aBoardHVthickness << anAlphaSegmentHV;
485  aBoardEuclthickness << anAlphaSegmentEucl;
486 
487  std::vector<Z2i::Point> hullHV = anAlphaSegmentHV.getConvexHull();
488  std::vector<Z2i::Point> hullEucl = anAlphaSegmentEucl.getConvexHull();
489  aBoardEuclthickness.setLineWidth(5);
490  aBoardHVthickness.setLineWidth(5);
491  aBoardEuclthickness.setPenColor(DGtal::Color::Purple);
492  aBoardHVthickness.setPenColor(DGtal::Color::Purple);
493  for (unsigned int i = 0; i < hullEucl.size(); i++){
494  aBoardEuclthickness.drawLine(hullEucl.at(i)[0], hullEucl.at(i)[1],
495  hullEucl.at((i+1)%hullEucl.size())[0],
496  hullEucl.at((i+1)%hullEucl.size())[1]);
497  }
498  for (unsigned int i = 0; i < hullHV.size(); i++){
499  aBoardHVthickness.drawLine(hullHV.at(i)[0], hullHV.at(i)[1],
500  hullHV.at((i+1)%hullHV.size())[0],
501  hullHV.at((i+1)%hullHV.size())[1]);
502  }
503 
504  Z2i::Point pEucl = anAlphaSegmentEucl.getAntipodalLeaningPoints().first.first;
505  Z2i::Point qEucl = anAlphaSegmentEucl.getAntipodalLeaningPoints().first.second;
506  Z2i::Point sEucl = anAlphaSegmentEucl.getAntipodalLeaningPoints().second;
507 
508  Z2i::Point pHV = anAlphaSegmentHV.getAntipodalLeaningPoints().first.first;
509  Z2i::Point qHV = anAlphaSegmentHV.getAntipodalLeaningPoints().first.second;
510  Z2i::Point sHV = anAlphaSegmentHV.getAntipodalLeaningPoints().second;
511  aBoardEuclthickness.setPenColor(DGtal::Color::Red);
512  aBoardHVthickness.setPenColor(DGtal::Color::Red);
513 
514  aBoardEuclthickness.drawCircle( pEucl[0], pEucl[1], 0.25);
515  aBoardHVthickness.drawCircle( pHV[0], pHV[1], 0.25);
516 
517  aBoardEuclthickness.drawCircle( qEucl[0], qEucl[1], 0.25);
518  aBoardHVthickness.drawCircle( qHV[0], qHV[1], 0.25);
519 
520  aBoardEuclthickness.setPenColor(DGtal::Color::Green);
521  aBoardHVthickness.setPenColor(DGtal::Color::Green);
522 
523  aBoardEuclthickness.drawCircle( sEucl[0], sEucl[1], 0.25);
524  aBoardHVthickness.drawCircle( sHV[0], sHV[1], 0.25);
525 
526  aBoardEuclthickness.saveEPS("testAlphaThickEucl.eps");
527  aBoardHVthickness.saveEPS("testAlphaThickHV.eps");
528 
529  trace.endBlock();
530  return nb==nbok;
531 }
532 
533 
534 
535 
537 // Standard services - public :
538 
539 int main( int argc, char** argv )
540 {
541  trace.beginBlock ( "Testing class AlphaThickSegmentComputer" );
542  trace.info() << "Args:";
543  for ( int i = 0; i < argc; ++i )
544  trace.info() << " " << argv[ i ];
545  trace.info() << endl;
546 
547  bool res = testAlphaThickSegmentConvexHullAndBox() && testAlphaThickSegmentComputerFloatingPointContour() &&
548  testAlphaThickSegmentFreeman() && testAlphaThickSpecialInit() && testMultiWidth() && testThicknessDefinitions();
549 
550  trace.emphase() << ( res ? "Passed." : "Error." ) << endl;
551 
552 
553  trace.endBlock();
554  return res ? 0 : 1;
555 }
556 // //
void beginBlock(const std::string &keyword="")
Board & setLineWidth(double width)
Definition: Board.cpp:329
Trace trace
Definition: Common.h:130
static const Color Magenta
Definition: Color.h:396
void drawLine(double x1, double y1, double x2, double y2, int depthValue=-1)
Definition: Board.cpp:368
Aim: A parallel strip in the space is the intersection of two parallel half-planes such that each hal...
Definition: ParallelStrip.h:90
STL namespace.
double endBlock()
Custom style class redefining the pen color and the fill color. You may use Board2D::Color::None for ...
Definition: Board2D.h:278
Aim: This class template may be used to (linearly) convert scalar values in a given range into a colo...
void drawCircle(double x, double y, double radius, int depthValue=-1)
Definition: Board.cpp:451
static const Color Yellow
Definition: Color.h:397
static const Color None
Definition: Color.h:387
void fillCircle(double x, double y, double radius, int depthValue=-1)
Definition: Board.cpp:471
static const Color Blue
Definition: Color.h:394
static const Color Gray
Definition: Color.h:389
std::ostream & emphase()
Aim: Implements method to read a set of points represented in each line of a file.
DGtal is the top-level namespace which contains all DGtal functions and types.
std::ostream & info()
void saveEPS(const char *filename, PageSize size=Board::BoundingBox, double margin=10.0) const
Definition: Board.cpp:805
Modifier class in a Board2D stream. Useful to choose your own mode for a given class. Realizes the concept CDrawableWithBoard2D.
Definition: Board2D.h:247
Board & setPenColor(const DGtal::Color &color)
Definition: Board.cpp:298
Aim: This class is devoted to the recognition of alpha thick segments as described in ...
static const Color Red
Definition: Color.h:391
static const Color Green
Definition: Color.h:392
static const Color Purple
Definition: Color.h:399
Aim: This class specializes a 'Board' class so as to display DGtal objects more naturally (with <<)...
Definition: Board2D.h:70