DGtal 1.4.0
|
#include <DGtal/geometry/curves/estimation/LambdaMST3D.h>
Public Types | |
typedef TSegmentation | Segmentation |
Tangential cover algorithm. | |
typedef TSegmentation::SegmentComputer | SegmentComputer |
Curve segmentation algorithm. | |
typedef SegmentComputer::ConstIterator | ConstIterator |
Type of iterator, at least readable and forward. | |
typedef Functor::Value | Value |
Type returned by model of CLMSTTangentFrom2DSS. | |
typedef TSpace::RealVector | RealVector |
Type of 3d real vector. | |
typedef TSpace::Point | Point |
Type of 3d real point. | |
Public Member Functions | |
BOOST_CONCEPT_ASSERT ((concepts::CSpace< TSpace >)) | |
BOOST_STATIC_ASSERT ((TSpace::dimension==3)) | |
BOOST_CONCEPT_ASSERT ((concepts::CLMSTTangentFromDSS< Functor >)) | |
BOOST_CONCEPT_ASSERT ((concepts::CLMSTDSSFilter< DSSFilter >)) | |
BOOST_CONCEPT_ASSERT ((concepts::CForwardSegmentComputer< typename TSegmentation::SegmentComputer >)) | |
LambdaMST3DEstimator () | |
Default constructor. | |
void | init (ConstIterator itb, ConstIterator ite) |
void | attach (Alias< TSegmentation > segmentComputer) |
bool | isValid () const |
RealVector | eval (const Point &p) |
template<typename OutputIterator > | |
OutputIterator | eval (ConstIterator itb, ConstIterator ite, OutputIterator result) |
DSSFilter & | getDSSFilter () |
Protected Types | |
typedef std::vector< SegmentComputer >::const_iterator | OrphanDSSIterator |
Protected Member Functions | |
template<typename OutputIterator > | |
void | accumulate (std::multimap< Point, Value > &outValues, ConstIterator itb, ConstIterator ite, OutputIterator &result) |
Accumulate partial results obtained for each point. In 3D it can happen that DSSs' direction vectors over same point are opposite. To avoid this problem we measure angle between segments' direction vectors and if this angle is bigger than \(\pi/2\), then one of the vectors is reversed. Finally, tangent direction is estimated and stored. | |
Value | treatOrphan (OrphanDSSIterator begin, OrphanDSSIterator end, const Point &p) |
Use the DSS filter defined conditions to ensure estimation over not covered points - orphans. | |
template<typename DSSesIterator , typename OrphanIterator > | |
void | treatOrphans (DSSesIterator begin, DSSesIterator end, OrphanIterator obegin, OrphanIterator oend, std::multimap< Point, Value > &outValues) |
Private Attributes | |
ConstIterator | myBegin |
ConstIterator | myEnd |
TSegmentation * | dssSegments |
Functor | myFunctor |
DSSFilter | myDSSFilter |
Aim: Implement 3D Lambda MST tangent estimators. This class is a model of CCurveLocalGeometricEstimator.
TSpace | model of CSpace |
TSegmentation | tangential cover obtained by a segmentation of a 2D digital curve by maximal straight segments |
Functor | model of CLMSTTangentFrom2DSS |
DSSFilter | a functor used for filtering out DSSes which do not fullfil a given condition e.g., they are too short |
Definition at line 62 of file LambdaMST3D.h.
typedef SegmentComputer::ConstIterator DGtal::LambdaMST3DEstimator< TSpace, TSegmentation, Functor, DSSFilter >::ConstIterator |
Type of iterator, at least readable and forward.
Definition at line 78 of file LambdaMST3D.h.
|
protected |
Definition at line 140 of file LambdaMST3D.h.
typedef TSpace::Point DGtal::LambdaMST3DEstimator< TSpace, TSegmentation, Functor, DSSFilter >::Point |
Type of 3d real point.
Definition at line 84 of file LambdaMST3D.h.
typedef TSpace::RealVector DGtal::LambdaMST3DEstimator< TSpace, TSegmentation, Functor, DSSFilter >::RealVector |
Type of 3d real vector.
Definition at line 82 of file LambdaMST3D.h.
typedef TSegmentation DGtal::LambdaMST3DEstimator< TSpace, TSegmentation, Functor, DSSFilter >::Segmentation |
Tangential cover algorithm.
Definition at line 74 of file LambdaMST3D.h.
typedef TSegmentation::SegmentComputer DGtal::LambdaMST3DEstimator< TSpace, TSegmentation, Functor, DSSFilter >::SegmentComputer |
Curve segmentation algorithm.
Definition at line 76 of file LambdaMST3D.h.
typedef Functor::Value DGtal::LambdaMST3DEstimator< TSpace, TSegmentation, Functor, DSSFilter >::Value |
Type returned by model of CLMSTTangentFrom2DSS.
Definition at line 80 of file LambdaMST3D.h.
DGtal::LambdaMST3DEstimator< TSpace, TSegmentation, Functor, DSSFilter >::LambdaMST3DEstimator | ( | ) |
Default constructor.
|
protected |
Accumulate partial results obtained for each point. In 3D it can happen that DSSs' direction vectors over same point are opposite. To avoid this problem we measure angle between segments' direction vectors and if this angle is bigger than \(\pi/2\), then one of the vectors is reversed. Finally, tangent direction is estimated and stored.
OutputIterator | writable iterator. |
outValues | partial results for each point |
itb | begin iterator |
ite | end iterator |
result | writable iterator over a container which stores estimated tangent directions. |
void DGtal::LambdaMST3DEstimator< TSpace, TSegmentation, Functor, DSSFilter >::attach | ( | Alias< TSegmentation > | segmentComputer | ) |
segmentComputer | - DSS segmentation algorithm |
Referenced by main().
DGtal::LambdaMST3DEstimator< TSpace, TSegmentation, Functor, DSSFilter >::BOOST_CONCEPT_ASSERT | ( | (concepts::CForwardSegmentComputer< typename TSegmentation::SegmentComputer >) | ) |
DGtal::LambdaMST3DEstimator< TSpace, TSegmentation, Functor, DSSFilter >::BOOST_CONCEPT_ASSERT | ( | (concepts::CLMSTDSSFilter< DSSFilter >) | ) |
DGtal::LambdaMST3DEstimator< TSpace, TSegmentation, Functor, DSSFilter >::BOOST_CONCEPT_ASSERT | ( | (concepts::CLMSTTangentFromDSS< Functor >) | ) |
DGtal::LambdaMST3DEstimator< TSpace, TSegmentation, Functor, DSSFilter >::BOOST_CONCEPT_ASSERT | ( | (concepts::CSpace< TSpace >) | ) |
DGtal::LambdaMST3DEstimator< TSpace, TSegmentation, Functor, DSSFilter >::BOOST_STATIC_ASSERT | ( | (TSpace::dimension==3) | ) |
RealVector DGtal::LambdaMST3DEstimator< TSpace, TSegmentation, Functor, DSSFilter >::eval | ( | const Point & | p | ) |
For ranges of points the second version of this method is faster than iterating over this version.
NOTE THAT ONLY THIS VERSION ALLOWS FOR DSS FILTRATION!
p | a point of the underlying curve |
Referenced by main().
OutputIterator DGtal::LambdaMST3DEstimator< TSpace, TSegmentation, Functor, DSSFilter >::eval | ( | ConstIterator | itb, |
ConstIterator | ite, | ||
OutputIterator | result ) |
OutputIterator | writable iterator. More efficient way to compute tangent directions for all points of a curve. |
itb | begin iterator |
ite | end iterator |
result | writable iterator over a container which stores estimated tangent directions. |
DSSFilter & DGtal::LambdaMST3DEstimator< TSpace, TSegmentation, Functor, DSSFilter >::getDSSFilter | ( | ) |
Referenced by main().
void DGtal::LambdaMST3DEstimator< TSpace, TSegmentation, Functor, DSSFilter >::init | ( | ConstIterator | itb, |
ConstIterator | ite ) |
bool DGtal::LambdaMST3DEstimator< TSpace, TSegmentation, Functor, DSSFilter >::isValid | ( | ) | const |
Checks the validity/consistency of the object.
|
protected |
Use the DSS filter defined conditions to ensure estimation over not covered points - orphans.
begin | begin iterator |
end | end iterator |
p | a point of the underlying curve |
|
protected |
|
private |
Pointer to a curve segmentation algorithm.
Definition at line 186 of file LambdaMST3D.h.
|
private |
Iterator which corresponds to the beginning of a valid range - [myBegin, myEnd)
Definition at line 178 of file LambdaMST3D.h.
|
private |
Definition at line 194 of file LambdaMST3D.h.
|
private |
Iterator which corresponds to the end of a valid range - [myBegin, myEnd)
Definition at line 182 of file LambdaMST3D.h.
|
private |
Functor which takes: reference to digital straight segment - DSS, position of given point in DSS and length of DSS and returns DSS's direction and the eccentricity of the point in the DSS.
Definition at line 192 of file LambdaMST3D.h.