DGtal
2.2.0
Toggle main menu visibility
Loading...
Searching...
No Matches
LambdaMST2D.h
1
16
17
#pragma once
18
28
29
#if defined(LAMBDAMST2D_RECURSES)
30
#error Recursive header files inclusion detected in LambdaMST2D.h
31
#else
// defined(LAMBDAMST2D_RECURSES)
33
#define LAMBDAMST2D_RECURSES
34
35
#if !defined LAMBDAMST2D_h
37
#define LAMBDAMST2D_h
38
39
#include <algorithm>
40
#include <iterator>
41
#include <cmath>
42
#include "DGtal/helpers/StdDefs.h"
43
#include "DGtal/kernel/CSpace.h"
44
#include "DGtal/kernel/PointVector.h"
45
#include "DGtal/geometry/curves/estimation/FunctorsLambdaMST.h"
46
#include "DGtal/geometry/curves/CForwardSegmentComputer.h"
47
#include "DGtal/geometry/curves/estimation/CLMSTTangentFromDSS.h"
48
49
namespace
DGtal
{
56
template
<
typename
TSpace,
typename
TSegmentation,
typename
Functor >
57
class
LambdaMST2DEstimator
58
{
59
//Checking concepts
60
BOOST_STATIC_ASSERT
(( TSpace::dimension == 2 ));
61
BOOST_CONCEPT_ASSERT
((
concepts::CSpace<TSpace >
));
62
BOOST_CONCEPT_ASSERT
(( concepts::CLMSTTangentFromDSS < Functor > ));
63
BOOST_CONCEPT_ASSERT
(( concepts::CForwardSegmentComputer < typename TSegmentation::SegmentComputer > ));
64
// ----------------------- Types ------------------------------
65
public
:
67
typedef
TSegmentation
Segmentation
;
69
typedef
typename
TSegmentation::SegmentComputer
SegmentComputer
;
71
typedef
typename
SegmentComputer::ConstIterator
ConstIterator
;
73
typedef
typename
Functor::Value
Value
;
75
typedef
typename
TSpace::RealVector
RealVector
;
77
typedef
typename
TSpace::Point
Point
;
78
79
// ----------------------- Interface --------------------------------------
80
public
:
82
LambdaMST2DEstimator
( );
83
89
void
init
(
ConstIterator
itb,
ConstIterator
ite );
90
95
void
attach
(
Alias<TSegmentation>
SegmentComputer
);
96
101
RealVector
eval
(
const
Point
& p );
102
110
template
<
typename
OutputIterator>
111
OutputIterator
eval
(
ConstIterator
itb,
ConstIterator
ite, OutputIterator result );
112
113
// ----------------------- Standard services ------------------------------
114
public
:
115
120
bool
isValid
( )
const
;
121
// ------------------------- Internals ------------------------------------
122
protected
:
123
131
template
<
typename
OutputIterator>
132
void
accumulate
( std::vector < Value > & outValues, OutputIterator & result );
133
134
// ------------------------- Private Data --------------------------------
135
private
:
136
140
ConstIterator
myBegin
;
144
ConstIterator
myEnd
;
150
Functor
myFunctor
;
154
TSegmentation *
dssSegments
;
155
156
};
// end of class LambdaMST2DEstimator
157
158
//-------------------------------------------------------------------------------------------
159
160
// Template class LambdaMST2D
166
template
<
typename
DSSSegmentationComputer,
typename
LambdaFunction = functors::Lambda64Function >
167
class
LambdaMST2D
:
168
public
LambdaMST2DEstimator
< Z2i::Space, DSSSegmentationComputer,
169
TangentFromDSS2DFunctor < typename DSSSegmentationComputer::SegmentComputer, LambdaFunction > >
170
{
171
typedef
LambdaMST2DEstimator
<
Z2i::Space
, DSSSegmentationComputer,
172
TangentFromDSS2DFunctor < typename DSSSegmentationComputer::SegmentComputer, LambdaFunction> >
Super
;
173
174
public
:
178
LambdaMST2D
():
Super
() {}
179
};
180
}
// namespace DGtal
181
183
// Includes inline functions
184
#include "DGtal/geometry/curves/estimation/LambdaMST2D.ih"
185
186
// //
188
189
#endif
// !defined LAMBDAMST2D_h
190
191
#undef LAMBDAMST2D_RECURSES
192
#endif
// else defined(LAMBDAMST2D_RECURSES)
DGtal::Alias
Aim: This class encapsulates its parameter class so that to indicate to the user that the object/poin...
Definition
Alias.h:183
DGtal::ArithmeticalDSSComputer::ConstIterator
TIterator ConstIterator
Definition
ArithmeticalDSSComputer.h:95
DGtal::InHalfPlaneBySimple3x3Matrix< Point, double >::Value
Integer Value
Definition
InHalfPlaneBySimple3x3Matrix.h:131
DGtal::LambdaMST2DEstimator::BOOST_STATIC_ASSERT
BOOST_STATIC_ASSERT((TSpace::dimension==2))
DGtal::LambdaMST2DEstimator::BOOST_CONCEPT_ASSERT
BOOST_CONCEPT_ASSERT((concepts::CLMSTTangentFromDSS< Functor >))
DGtal::LambdaMST2DEstimator::ConstIterator
SegmentComputer::ConstIterator ConstIterator
Type of iterator, at least readable and forward.
Definition
LambdaMST2D.h:71
DGtal::LambdaMST2DEstimator::SegmentComputer
TSegmentation::SegmentComputer SegmentComputer
Curve segmentation algorithm.
Definition
LambdaMST2D.h:69
DGtal::LambdaMST2DEstimator::Value
Functor::Value Value
Type returned by model of CLMSTTangentFrom2DSS.
Definition
LambdaMST2D.h:73
DGtal::LambdaMST2DEstimator::eval
RealVector eval(const Point &p)
DGtal::LambdaMST2DEstimator::init
void init(ConstIterator itb, ConstIterator ite)
DGtal::LambdaMST2DEstimator< Z2i::Space, DSSSegmentationComputer, TangentFromDSS2DFunctor< typename DSSSegmentationComputer::SegmentComputer, LambdaFunction > >::myEnd
ConstIterator myEnd
Definition
LambdaMST2D.h:144
DGtal::LambdaMST2DEstimator< Z2i::Space, DSSSegmentationComputer, TangentFromDSS2DFunctor< typename DSSSegmentationComputer::SegmentComputer, LambdaFunction > >::myFunctor
TangentFromDSS2DFunctor< typename DSSSegmentationComputer::SegmentComputer, LambdaFunction > myFunctor
Definition
LambdaMST2D.h:150
DGtal::LambdaMST2DEstimator::isValid
bool isValid() const
DGtal::LambdaMST2DEstimator::Point
TSpace::Point Point
Type of 3d real point.
Definition
LambdaMST2D.h:77
DGtal::LambdaMST2DEstimator::eval
OutputIterator eval(ConstIterator itb, ConstIterator ite, OutputIterator result)
DGtal::LambdaMST2DEstimator::LambdaMST2DEstimator
LambdaMST2DEstimator()
Default constructor.
DGtal::LambdaMST2DEstimator< Z2i::Space, DSSSegmentationComputer, TangentFromDSS2DFunctor< typename DSSSegmentationComputer::SegmentComputer, LambdaFunction > >::myBegin
ConstIterator myBegin
Definition
LambdaMST2D.h:140
DGtal::LambdaMST2DEstimator::accumulate
void accumulate(std::vector< Value > &outValues, OutputIterator &result)
Accumulate partial results obtained for each point.
DGtal::LambdaMST2DEstimator::attach
void attach(Alias< TSegmentation > SegmentComputer)
DGtal::LambdaMST2DEstimator::RealVector
TSpace::RealVector RealVector
Type of 3d real vector.
Definition
LambdaMST2D.h:75
DGtal::LambdaMST2DEstimator::Segmentation
TSegmentation Segmentation
Tangential cover algorithm.
Definition
LambdaMST2D.h:67
DGtal::LambdaMST2DEstimator::BOOST_CONCEPT_ASSERT
BOOST_CONCEPT_ASSERT((concepts::CForwardSegmentComputer< typename TSegmentation::SegmentComputer >))
DGtal::LambdaMST2DEstimator< Z2i::Space, DSSSegmentationComputer, TangentFromDSS2DFunctor< typename DSSSegmentationComputer::SegmentComputer, LambdaFunction > >::dssSegments
DSSSegmentationComputer * dssSegments
Definition
LambdaMST2D.h:154
DGtal::LambdaMST2DEstimator::BOOST_CONCEPT_ASSERT
BOOST_CONCEPT_ASSERT((concepts::CSpace< TSpace >))
DGtal::LambdaMST2D::Super
LambdaMST2DEstimator< Z2i::Space, DSSSegmentationComputer, TangentFromDSS2DFunctor< typename DSSSegmentationComputer::SegmentComputer, LambdaFunction > > Super
Definition
LambdaMST2D.h:172
DGtal::LambdaMST2D::LambdaMST2D
LambdaMST2D()
Definition
LambdaMST2D.h:178
DGtal::Z2i::Space
SpaceND< 2, Integer > Space
Definition
StdDefs.h:75
DGtal
DGtal is the top-level namespace which contains all DGtal functions and types.
Definition
ClosedIntegerHalfPlane.h:49
DGtal::concepts::CSpace
Aim: Defines the concept describing a digital space, ie a cartesian product of integer lines.
Definition
CSpace.h:106
Functor
Definition
testFunctorHolder.cpp:45
src
DGtal
geometry
curves
estimation
LambdaMST2D.h
Generated on
for DGtal by
1.18.0