DGtal
2.2.0
Toggle main menu visibility
Loading...
Searching...
No Matches
testLambdaMST3DBy2D.cpp
1
16
29
31
#include <iostream>
32
#include <fstream>
33
#include <vector>
34
#include <iterator>
35
#include "DGtalCatch.h"
36
#include "DGtal/base/Common.h"
37
#include "DGtal/helpers/StdDefs.h"
38
#include "DGtal/geometry/curves/estimation/LambdaMST3DBy2D.h"
39
41
42
using namespace
std
;
43
using namespace
DGtal
;
44
using namespace
Z3i
;
45
47
48
TEST_CASE
(
"LambdaMST3DBy2D test"
)
49
{
50
51
typedef
vector < Point > Container;
52
typedef
Container::const_iterator
ConstIterator
;
53
LambdaMST3DBy2D < ConstIterator > lmst;
54
55
// Input points
56
Container contour;
57
contour.push_back (
Point
( 18, 25, 18 ) );
58
contour.push_back (
Point
( 17, 25, 19 ) );
59
contour.push_back (
Point
( 16, 25, 20 ) );
60
contour.push_back (
Point
( 15, 25, 21 ) );
61
contour.push_back (
Point
( 14, 25, 22 ) );
62
contour.push_back (
Point
( 13, 25, 23 ) );
63
contour.push_back (
Point
( 12, 25, 24 ) );
64
contour.push_back (
Point
( 11, 25, 25 ) );
65
contour.push_back (
Point
( 10, 25, 26 ) );
66
contour.push_back (
Point
( 9, 25, 27 ) );
67
contour.push_back (
Point
( 8, 25, 28 ) );
68
69
lmst.
init
( contour.cbegin ( ), contour.cend ( ), LambdaMST3DBy2D < ConstIterator >::MAIN_AXIS::X ) ;
70
lmst.
eval
( contour.front ( ) );
71
72
lmst.
init
( contour.cbegin ( ), contour.cend ( ), LambdaMST3DBy2D < ConstIterator >::MAIN_AXIS::X );
73
vector < RealVector > tangent;
74
lmst.
eval
( contour.cbegin ( ), contour.cend ( ), back_insert_iterator < vector < RealVector > > ( tangent ) );
75
}
76
DGtal::ConstIterator
DGtal::LambdaMST3DBy2DEstimator::init
void init(Iterator3D itB, Iterator3D itE, MAIN_AXIS axis)
DGtal::LambdaMST3DBy2DEstimator::eval
RealVector3D eval(const Point3D &point)
DGtal::Point
DGtal::Z3i
Z3i this namespace gathers the standard of types for 3D imagery.
DGtal
DGtal is the top-level namespace which contains all DGtal functions and types.
Definition
ClosedIntegerHalfPlane.h:49
std
STL namespace.
TEST_CASE
TEST_CASE("int container traits", "[int][traits]")
Definition
testContainerTraits.cpp:53
tests
geometry
curves
estimation
testLambdaMST3DBy2D.cpp
Generated on
for DGtal by
1.18.0