DGtal 2.1.0
Loading...
Searching...
No Matches
testLambdaMST2D Class Reference

Public Member Functions

 testLambdaMST2D ()
 
bool lambda64ByPoint ()
 
bool lambda64 ()
 

Private Types

typedef vector< PointRange
 
typedef Range::const_iterator ConstIterator
 
typedef ArithmeticalDSSComputer< ConstIterator, int, 8 > SegmentComputer
 
typedef SaturatedSegmentation< SegmentComputerSegmentation
 

Private Attributes

Range curve
 

Detailed Description

Definition at line 53 of file testLambdaMST2D.cpp.

Member Typedef Documentation

◆ ConstIterator

typedef Range::const_iterator testLambdaMST2D::ConstIterator
private

Definition at line 56 of file testLambdaMST2D.cpp.

◆ Range

typedef vector< Point > testLambdaMST2D::Range
private

Definition at line 55 of file testLambdaMST2D.cpp.

◆ Segmentation

◆ SegmentComputer

Definition at line 57 of file testLambdaMST2D.cpp.

Constructor & Destructor Documentation

◆ testLambdaMST2D()

testLambdaMST2D::testLambdaMST2D ( )
inline

Definition at line 62 of file testLambdaMST2D.cpp.

63 {
64 fstream inputStream;
65 inputStream.open ( (testPath + "samples/sinus2D4.dat").c_str(), ios::in );
66 try {
68 if ( curve.size() == 0) throw IOException();
69 } catch (DGtal::IOException & ioe) {
70 trace.error() << "Size is null." << endl;
71 }
72 }
std::ostream & error()
Trace trace
static std::vector< TPoint > getPointsFromInputStream(std::istream &in, std::vector< unsigned int > aVectPosition=std::vector< unsigned int >())

References curve, DGtal::Trace::error(), DGtal::PointListReader< TPoint >::getPointsFromInputStream(), and DGtal::trace.

Member Function Documentation

◆ lambda64()

bool testLambdaMST2D::lambda64 ( )
inline

Definition at line 82 of file testLambdaMST2D.cpp.

83 {
84 Segmentation segmenter ( curve.begin(), curve.end(), SegmentComputer() );
85 LambdaMST2D < Segmentation > lmst64;
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 ) );
90 return true;
91 }
RealVector eval(const Point &p)
void init(ConstIterator itb, ConstIterator ite)
void attach(Alias< TSegmentation > SegmentComputer)
SaturatedSegmentation< SegmentComputer > Segmentation

References DGtal::LambdaMST2DEstimator< TSpace, TSegmentation, Functor >::attach(), curve, DGtal::LambdaMST2DEstimator< TSpace, TSegmentation, Functor >::eval(), and DGtal::LambdaMST2DEstimator< TSpace, TSegmentation, Functor >::init().

Referenced by main().

◆ lambda64ByPoint()

bool testLambdaMST2D::lambda64ByPoint ( )
inline

Definition at line 73 of file testLambdaMST2D.cpp.

74 {
75 Segmentation segmenter ( curve.begin(), curve.end(), SegmentComputer() );
76 LambdaMST2D < Segmentation > lmst64;
77 lmst64.attach ( segmenter );
78 for ( ConstIterator it = curve.begin(); it != curve.end(); ++it )
79 lmst64.eval ( *it );
80 return true;
81 }
MyDigitalSurface::ConstIterator ConstIterator

References DGtal::LambdaMST2DEstimator< TSpace, TSegmentation, Functor >::attach(), curve, and DGtal::LambdaMST2DEstimator< TSpace, TSegmentation, Functor >::eval().

Referenced by main().

Field Documentation

◆ curve

Range testLambdaMST2D::curve
private

Definition at line 60 of file testLambdaMST2D.cpp.

Referenced by lambda64(), lambda64ByPoint(), and testLambdaMST2D().


The documentation for this class was generated from the following file: