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/Naive3DDSSComputer.h" 40 #include "DGtal/geometry/curves/estimation/LambdaMST3D.h" 41 #include "DGtal/geometry/curves/SaturatedSegmentation.h" 46 using namespace DGtal;
57 typedef std::vector < Point >
Range;
58 typedef std::list < Point2D > Range2D;
60 typedef Range2D::const_iterator ConstIterator2D;
71 inputStream.open ( (testPath +
"samples/sinus3D.dat").c_str(), std::ios::in );
79 bool lambda64ByPoint ()
81 Segmentation segmenter ( curve.
begin(), curve.
end(), SegmentComputer() );
83 lmst64.
attach ( segmenter );
84 lmst64.init ( curve.
begin(), curve.
end() );
85 for ( ConstIterator it = curve.
begin(); it != curve.
end(); ++it )
93 Segmentation segmenter ( curve.
begin(), curve.
end(), SegmentComputer() );
95 lmst64.
attach ( segmenter );
96 lmst64.init ( curve.
begin(), curve.
end() );
97 vector < RealVector > tangent;
98 lmst64.eval < back_insert_iterator< vector < RealVector > > > ( curve.
begin(), curve.
end(), back_insert_iterator< vector < RealVector > > ( tangent ) );
110 testLambdaMST3D testLMST;
113 res &= testLMST.lambda64ByPoint();
116 res &= testLMST.lambda64();
119 trace.
emphase() << ( res ?
"Passed." :
"Error." ) << endl;
void beginBlock(const std::string &keyword="")
MyDigitalSurface::ConstIterator ConstIterator
Aim: Simplify creation of Lambda MST tangent estimator.
Aim: This class is a wrapper around ArithmeticalDSS that is devoted to the dynamic recognition of dig...
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.
Aim: Dynamic recognition of a 3d-digital straight segment (DSS)
Aim: Computes the saturated segmentation, that is the whole set of maximal segments within a range gi...
void attach(Alias< TSegmentation > segmentComputer)