38 #include "DGtal/base/Common.h" 
   39 #include "DGtal/helpers/StdDefs.h" 
   40 #include "ConfigExamples.h" 
   45 #include "DGtal/shapes/Shapes.h" 
   46 #include "DGtal/shapes/ShapeFactory.h" 
   47 #include "DGtal/shapes/GaussDigitizer.h" 
   52 #include "DGtal/topology/helpers/Surfaces.h" 
   53 #include "DGtal/geometry/curves/GridCurve.h" 
   58 #include "DGtal/geometry/curves/estimation/TrueGlobalEstimatorOnPoints.h" 
   59 #include "DGtal/geometry/curves/estimation/ParametricShapeArcLengthFunctor.h" 
   61 #include "DGtal/geometry/curves/estimation/DSSLengthEstimator.h" 
   64 #include "DGtal/io/boards/Board2D.h" 
   96   vector<Z2i::Point> boundaryPoints;
 
  108   aBoard.
saveEPS(
"DisplayGridCurve1.eps");  
 
  113   Range r = c.getPointsRange(); 
 
  120   double length1 = DSSlength.
eval();
 
  121   trace.
info() << 
"Length (h=" << h << 
"): " << length1 << endl; 
 
  128     Range::ConstIterator, 
 
  130     Length  >  trueLengthEstimator;
 
  131   trueLengthEstimator.
init( h, r.
begin(), r.
end(), &flower, c.isClosed());
 
  132   double trueLength = trueLengthEstimator.eval(); 
 
  133   trace.
info() << 
"ground truth: " << trueLength << endl; 
 
  149   c.initFromVector( boundaryPoints );
 
  150   Range r2 = c.getPointsRange(); 
 
  152   DSSlength.
init( h, r2.
begin(), r2.
end(), c.isClosed() );
 
  153   double length2 = DSSlength.
eval();
 
  154   trace.
info() << 
"Length (h=" << h << 
"): " << length2 << endl;  
 
  159   aBoard.
saveEPS(
"DisplayGridCurve01.eps");