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

Public Member Functions

 testLambdaMST3D ()
 
bool lambda64ByPoint ()
 
bool lambda64 ()
 
bool lambda64Filtered ()
 
bool lambdaSinByPoint ()
 
bool lambdaSin ()
 
bool lambdaExpByPoint ()
 
bool lambdaExp ()
 

Private Types

typedef DGtal::Z3i::Point Point
 
typedef DGtal::Z2i::Point Point2D
 
typedef std::vector< PointRange
 
typedef std::list< Point2DRange2D
 
typedef Range::const_iterator ConstIterator
 
typedef Range2D::const_iterator ConstIterator2D
 
typedef Naive3DDSSComputer< ConstIterator, int, 8 > SegmentComputer
 
typedef SaturatedSegmentation< SegmentComputerSegmentation
 
typedef ArithmeticalDSSComputer< ConstIterator2D, int, 8 > SegmentComputer2D
 
typedef SaturatedSegmentation< SegmentComputer2DSegmentation2D
 

Private Attributes

Range curve
 

Detailed Description

Definition at line 55 of file testLambdaMST3D.cpp.

Member Typedef Documentation

◆ ConstIterator

typedef Range::const_iterator testLambdaMST3D::ConstIterator
private

Definition at line 61 of file testLambdaMST3D.cpp.

◆ ConstIterator2D

typedef Range2D::const_iterator testLambdaMST3D::ConstIterator2D
private

Definition at line 62 of file testLambdaMST3D.cpp.

◆ Point

Definition at line 57 of file testLambdaMST3D.cpp.

◆ Point2D

Definition at line 58 of file testLambdaMST3D.cpp.

◆ Range

typedef std::vector< Point > testLambdaMST3D::Range
private

Definition at line 59 of file testLambdaMST3D.cpp.

◆ Range2D

typedef std::list< Point2D > testLambdaMST3D::Range2D
private

Definition at line 60 of file testLambdaMST3D.cpp.

◆ Segmentation

◆ Segmentation2D

◆ SegmentComputer

Definition at line 63 of file testLambdaMST3D.cpp.

◆ SegmentComputer2D

Constructor & Destructor Documentation

◆ testLambdaMST3D()

testLambdaMST3D::testLambdaMST3D ( )
inline

Definition at line 70 of file testLambdaMST3D.cpp.

71 {
72 fstream inputStream;
73 inputStream.open ( (testPath + "samples/sinus3D.dat").c_str(), std::ios::in );
74 try {
76 if ( curve.size() == 0) throw IOException();
77 } catch (DGtal::IOException & ioe) {
78 trace.error() << "Size is null." << endl;
79 }
80 }
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 testLambdaMST3D::lambda64 ( )
inline

Definition at line 91 of file testLambdaMST3D.cpp.

92 {
93 Segmentation segmenter ( curve.begin(), curve.end(), SegmentComputer() );
94 LambdaMST3D < Segmentation > lmst64;
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 ) );
99 return true;
100 }
void attach(Alias< TSegmentation > segmentComputer)
RealVector eval(const Point &p)
void init(ConstIterator itb, ConstIterator ite)
SaturatedSegmentation< SegmentComputer > Segmentation

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

Referenced by main().

◆ lambda64ByPoint()

bool testLambdaMST3D::lambda64ByPoint ( )
inline

Definition at line 81 of file testLambdaMST3D.cpp.

82 {
83 Segmentation segmenter ( curve.begin(), curve.end(), SegmentComputer() );
84 LambdaMST3D < Segmentation > lmst64;
85 lmst64.attach ( segmenter );
86 lmst64.init ( curve.begin(), curve.end() );
87 for ( ConstIterator it = curve.begin(); it != curve.end(); ++it )
88 lmst64.eval ( *it );
89 return true;
90 }
MyDigitalSurface::ConstIterator ConstIterator

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

Referenced by main().

◆ lambda64Filtered()

bool testLambdaMST3D::lambda64Filtered ( )
inline

Definition at line 102 of file testLambdaMST3D.cpp.

103 {
104 Segmentation segmenter ( curve.begin(), curve.end(), SegmentComputer() );
105 LambdaMST3D < Segmentation, Lambda64Function, DSSLengthLessEqualFilter < SegmentComputer > > lmst64;
106 lmst64.attach ( segmenter );
107 lmst64.getDSSFilter ( ).init ( 1 );
108 lmst64.init ( curve.begin(), curve.end() );
109 for ( ConstIterator it = curve.begin(); it != curve.end(); ++it )
110 lmst64.eval ( *it );
111 return true;
112 }

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

Referenced by main().

◆ lambdaExp()

bool testLambdaMST3D::lambdaExp ( )
inline

Definition at line 147 of file testLambdaMST3D.cpp.

148 {
149 Segmentation segmenter ( curve.begin(), curve.end(), SegmentComputer() );
150 LambdaMST3D < Segmentation, LambdaExponentialFunction > lmst;
151 lmst.attach ( segmenter );
152 lmst.init ( curve.begin(), curve.end() );
153 vector < RealVector > tangent;
154 lmst.eval < back_insert_iterator< vector < RealVector > > > ( curve.begin(), curve.end(), back_insert_iterator< vector < RealVector > > ( tangent ) );
155 return true;
156 }

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

Referenced by main().

◆ lambdaExpByPoint()

bool testLambdaMST3D::lambdaExpByPoint ( )
inline

Definition at line 136 of file testLambdaMST3D.cpp.

137 {
138 Segmentation segmenter ( curve.begin(), curve.end(), SegmentComputer() );
139 LambdaMST3D < Segmentation, LambdaExponentialFunction > lmst;
140 lmst.attach ( segmenter );
141 lmst.init ( curve.begin(), curve.end() );
142 for ( ConstIterator it = curve.begin(); it != curve.end(); ++it )
143 lmst.eval ( *it );
144 return true;
145 }

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

Referenced by main().

◆ lambdaSin()

bool testLambdaMST3D::lambdaSin ( )
inline

Definition at line 125 of file testLambdaMST3D.cpp.

126 {
127 Segmentation segmenter ( curve.begin(), curve.end(), SegmentComputer() );
128 LambdaMST3D < Segmentation, LambdaSinFromPiFunction > lmst;
129 lmst.attach ( segmenter );
130 lmst.init ( curve.begin(), curve.end() );
131 vector < RealVector > tangent;
132 lmst.eval < back_insert_iterator< vector < RealVector > > > ( curve.begin(), curve.end(), back_insert_iterator< vector < RealVector > > ( tangent ) );
133 return true;
134 }

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

Referenced by main().

◆ lambdaSinByPoint()

bool testLambdaMST3D::lambdaSinByPoint ( )
inline

Definition at line 114 of file testLambdaMST3D.cpp.

115 {
116 Segmentation segmenter ( curve.begin(), curve.end(), SegmentComputer() );
117 LambdaMST3D < Segmentation, LambdaSinFromPiFunction > lmst;
118 lmst.attach ( segmenter );
119 lmst.init ( curve.begin(), curve.end() );
120 for ( ConstIterator it = curve.begin(); it != curve.end(); ++it )
121 lmst.eval ( *it );
122 return true;
123 }

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

Referenced by main().

Field Documentation

◆ curve


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