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"
65 inputStream.open ( (testPath +
"samples/sinus2D4.dat").c_str(), ios::in );
70 trace.error() <<
"Size is null." << endl;
76 LambdaMST2D < Segmentation > lmst64;
77 lmst64.
attach ( segmenter );
85 LambdaMST2D < Segmentation > lmst64;
86 lmst64.
attach ( segmenter );
88 std::vector < RealVector > tangent;
89 lmst64.
eval < back_insert_iterator< vector < RealVector > > > (
curve.begin(),
curve.end(), back_inserter ( tangent ) );
102 trace.beginBlock (
"Testing LambdaMST2D" );
103 trace.beginBlock (
"Testing point only calculation" );
106 trace.beginBlock (
"Testing calculation for whole curve" );
109 trace.emphase() << ( res ?
"Passed." :
"Error." ) << endl;
RealVector eval(const Point &p)
void init(ConstIterator itb, ConstIterator ite)
void attach(Alias< TSegmentation > SegmentComputer)
Aim: Computes the saturated segmentation, that is the whole set of maximal segments within a range gi...
Range::const_iterator ConstIterator
SaturatedSegmentation< SegmentComputer > Segmentation
ArithmeticalDSSComputer< ConstIterator, int, 8 > SegmentComputer
Z2i this namespace gathers the standard of types for 2D imagery.
DGtal is the top-level namespace which contains all DGtal functions and types.
static std::vector< TPoint > getPointsFromInputStream(std::istream &in, std::vector< unsigned int > aVectPosition=std::vector< unsigned int >())