35 #include "DGtal/base/Common.h" 36 #include "ConfigTest.h" 37 #include "DGtal/helpers/StdDefs.h" 38 #include "DGtal/io/readers/PointListReader.h" 39 #include "DGtal/geometry/curves/ArithmeticalDSSComputer.h" 40 #include "DGtal/geometry/curves/estimation/LambdaMST2D.h" 41 #include "DGtal/geometry/curves/SaturatedSegmentation.h" 46 using namespace DGtal;
55 typedef vector < Point >
Range;
65 inputStream.open ( (testPath +
"samples/sinus2D4.dat").c_str(), ios::in );
73 bool lambda64ByPoint ()
75 Segmentation segmenter ( curve.
begin(), curve.
end(), SegmentComputer() );
77 lmst64.
attach ( segmenter );
84 Segmentation segmenter ( curve.
begin(), curve.
end(), SegmentComputer() );
86 lmst64.
attach ( segmenter );
87 lmst64.init ( curve.
begin(), curve.
end() );
88 std::vector < RealVector > tangent;
89 lmst64.eval < back_insert_iterator< vector < RealVector > > > ( curve.
begin(), curve.
end(), back_inserter ( tangent ) );
101 testLambdaMST2D testLMST;
104 res &= testLMST.lambda64ByPoint();
107 res &= testLMST.lambda64();
109 trace.
emphase() << ( res ?
"Passed." :
"Error." ) << endl;
void beginBlock(const std::string &keyword="")
MyDigitalSurface::ConstIterator ConstIterator
Aim: This class is a wrapper around ArithmeticalDSS that is devoted to the dynamic recognition of dig...
Aim: model of CBidirectionalRangeFromPoint that adapts any range of elements bounded by two iterators...
Aim: Implements method to read a set of points represented in each line of a file.
Aim: Simplify creation of Lambda MST tangent estimator.
DGtal is the top-level namespace which contains all DGtal functions and types.
void attach(Alias< TSegmentation > SegmentComputer)
Aim: Computes the saturated segmentation, that is the whole set of maximal segments within a range gi...