DGtal  0.9.3
Functions
exampleLMST3D.cpp File Reference
#include <iostream>
#include <iterator>
#include <vector>
#include "DGtal/base/Common.h"
#include "DGtal/base/BasicTypes.h"
#include "DGtal/helpers/StdDefs.h"
#include "DGtal/geometry/curves/Naive3DDSSComputer.h"
#include "DGtal/geometry/curves/SaturatedSegmentation.h"
#include "DGtal/geometry/curves/estimation/LambdaMST3D.h"
Include dependency graph for exampleLMST3D.cpp:

Go to the source code of this file.

Functions

int main ()
 

Detailed Description

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

Author
Kacper Pluta (kacpe.nosp@m.r.pl.nosp@m.uta@e.nosp@m.siee.nosp@m..fr ) Laboratoire d'Informatique Gaspard-Monge - LIGM, France
Date
2015/09/27

An example file named LambdaMST3D.

This file is part of the DGtal library.

Definition in file exampleLMST3D.cpp.

Function Documentation

◆ main()

int main ( )

[LambdaMST3DStandardCtor]

[LambdaMST3DStandardCtor]

[LambdaMST3DTangential]

[LambdaMST3DTangential]

[LambdaMST3DPoint]

[LambdaMST3DPoint]

[LambdaMST3DFast]

[LambdaMST3DFast]

Definition at line 63 of file exampleLMST3D.cpp.

References DGtal::LambdaMST3DEstimator< Z3i::Space, DSSSegmentationComputer, TangentFromDSS3DFunctor< DSSSegmentationComputer::SegmentComputer, LambdaFunction > >::attach(), DGtal::LambdaMST3DEstimator< Z3i::Space, DSSSegmentationComputer, TangentFromDSS3DFunctor< DSSSegmentationComputer::SegmentComputer, LambdaFunction > >::eval(), and DGtal::LambdaMST3DEstimator< Z3i::Space, DSSSegmentationComputer, TangentFromDSS3DFunctor< DSSSegmentationComputer::SegmentComputer, LambdaFunction > >::init().

64 {
66  typedef vector < Point > Container;
67  typedef Container::const_iterator ConstIterator;
68  typedef Naive3DDSSComputer < ConstIterator, int, 8 > SegmentComputer;
69  typedef SaturatedSegmentation < SegmentComputer > Segmentation;
72 
73  // Input points
74  Container contour;
75  contour.push_back(Point(18,25,18));
76  contour.push_back(Point(17,25,19));
77  contour.push_back(Point(16,25,20));
78  contour.push_back(Point(15,25,21));
79  contour.push_back(Point(14,25,22));
80  contour.push_back(Point(13,25,23));
81  contour.push_back(Point(12,25,24));
82  contour.push_back(Point(11,25,25));
83  contour.push_back(Point(10,25,26));
84  contour.push_back(Point(9,25,27));
85  contour.push_back(Point(8,25,28));
86 
88  // Initialization of tangential cover
89  Segmentation segmenter ( contour.begin(), contour.end(), SegmentComputer() );
90  lmst.attach ( segmenter );
92 
94  for ( ConstIterator it = contour.begin(); it != contour.end(); ++it )
95  lmst.eval ( it );
97 
99  lmst.init ( contour.begin(), contour.end() );
100  std::vector < RealVector > tangent;
101  lmst.eval < std::back_insert_iterator< std::vector < RealVector > > > ( contour.begin(), contour.end(), std::back_insert_iterator< vector < RealVector > > ( tangent ) );
103 
104  return 1;
105 }
MyDigitalSurface::ConstIterator ConstIterator
Aim: Simplify creation of Lambda MST tangent estimator.
Definition: LambdaMST3D.h:173
MyPointD Point
Definition: testClone2.cpp:383
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...