DGtal 1.3.0
Loading...
Searching...
No Matches
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"

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 ( void  )

[LambdaMST3DStandardCtor]

[LambdaMST3DStandardCtor]

[LambdaMST3DTangential]

[LambdaMST3DTangential]

[LambdaMST3DTSetupTheFilter]

[LambdaMST3DTSetupTheFilter]

[LambdaMST3DPoint]

[LambdaMST3DPoint]

[LambdaMST3DFast]

[LambdaMST3DFast]

Definition at line 64 of file exampleLMST3D.cpp.

65{
67 typedef vector < Point > Container;
68 typedef Container::const_iterator ConstIterator;
69 typedef Naive3DDSSComputer < ConstIterator, int, 8 > SegmentComputer;
70 typedef SaturatedSegmentation < SegmentComputer > Segmentation;
71 LambdaMST3D < Segmentation, Lambda64Function, DSSLengthLessEqualFilter < SegmentComputer > > lmst;
73
74 // Input points
75 Container contour;
76 contour.push_back(Point(18,25,18));
77 contour.push_back(Point(17,25,19));
78 contour.push_back(Point(16,25,20));
79 contour.push_back(Point(15,25,21));
80 contour.push_back(Point(14,25,22));
81 contour.push_back(Point(13,25,23));
82 contour.push_back(Point(12,25,24));
83 contour.push_back(Point(11,25,25));
84 contour.push_back(Point(10,25,26));
85 contour.push_back(Point(9,25,27));
86 contour.push_back(Point(8,25,28));
87
89 // Initialization of tangential cover
90 Segmentation segmenter ( contour.begin(), contour.end(), SegmentComputer() );
91 lmst.attach ( segmenter );
93
95 lmst.getDSSFilter ( ).init ( 7 );
97
99 for ( ConstIterator it = contour.begin(); it != contour.end(); ++it )
100 lmst.eval ( *it );
102
104 lmst.init ( contour.begin(), contour.end() );
105 std::vector < RealVector > tangent;
106 lmst.eval < std::back_insert_iterator< std::vector < RealVector > > > ( contour.begin(), contour.end(), std::back_insert_iterator< vector < RealVector > > ( tangent ) );
108
109 return 0;
110}
void attach(Alias< TSegmentation > segmentComputer)
RealVector eval(const Point &p)
void init(ConstIterator itb, ConstIterator ite)
Aim: Computes the saturated segmentation, that is the whole set of maximal segments within a range gi...
MyDigitalSurface::ConstIterator ConstIterator
Space::Point Point
Definition: StdDefs.h:168
ArithmeticalDSSComputer< std::vector< Z2i::Point >::const_iterator, int, 4 > SegmentComputer
SaturatedSegmentation< SegmentComputer > Segmentation

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