DGtal  1.5.beta
exampleNaive3DDSSComputer.cpp File Reference
#include <iostream>
#include "DGtal/base/Common.h"
#include "DGtal/base/BasicTypes.h"
#include "DGtal/helpers/StdDefs.h"
#include "DGtal/geometry/curves/Naive3DDSSComputer.h"
Include dependency graph for exampleNaive3DDSSComputer.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 Naive3DDSSComputer.

This file is part of the DGtal library.

Definition in file exampleNaive3DDSSComputer.cpp.

Function Documentation

◆ main()

int main ( void  )

[Naive3DDSSComputerStandardCtor]

[Naive3DDSSComputerStandardCtor]

[Naive3DDSSComputerStandardExtension]

[Naive3DDSSComputerStandardExtension]

[Naive3DDSSComputerStandardPrimitiveValid]

[Naive3DDSSComputerStandardPrimitiveValid]

[Naive3DDSSComputerStandardPrimitive]

[Naive3DDSSComputerStandardPrimitive]

[Naive3DDSSComputerStandardParams]

[Naive3DDSSComputerStandardParams]

Definition at line 55 of file exampleNaive3DDSSComputer.cpp.

56 {
57  using namespace Z3i;
58 
60  // Container of digital points
61  typedef std::vector<Z3::Point> Container;
62  // Iterator on the container
63  typedef Container::const_iterator ConstIterator;
64  // Naive3DDSS computer
66  // Construction of the computer
67  DSSComputer theDSSComputer;
69 
70  // Input points
71  Container contour;
72  contour.push_back(Z3::Point(18,25,18));
73  contour.push_back(Z3::Point(17,25,19));
74  contour.push_back(Z3::Point(16,25,20));
75  contour.push_back(Z3::Point(15,25,21));
76  contour.push_back(Z3::Point(14,25,22));
77  contour.push_back(Z3::Point(13,25,23));
78  contour.push_back(Z3::Point(12,25,24));
79  contour.push_back(Z3::Point(11,25,25));
80  contour.push_back(Z3::Point(10,25,26));
81  contour.push_back(Z3::Point(9,25,27));
82  contour.push_back(Z3::Point(8,25,28));
83 
85  // Add points while it is possible
86  theDSSComputer.init( contour.begin() );
87  while ( ( theDSSComputer.end() != contour.end() ) &&
88  ( theDSSComputer.extendFront() ) ) {}
90 
91  // Trace to the standard output
92  theDSSComputer.selfDisplay( cout );
93 
95  theDSSComputer.validArithmeticalDSS2d( 0 );
97 
99  DSSComputer::ArithmeticalDSSComputer2d theDSS = theDSSComputer.arithmeticalDSS2d( 0 );
101 
102 
104  DSSComputer::Point3d directionZ3;
105  DSSComputer::PointR3d intercept;
106  DSSComputer::PointR3d thikness;
107  theDSSComputer.getParameters ( directionZ3, intercept, thikness );
109 
110  return 1;
111 }
Aim: Dynamic recognition of a 3d-digital straight segment (DSS)
void init(const ConstIterator &it)
MyDigitalSurface::ConstIterator ConstIterator
MyPointD Point
Definition: testClone2.cpp:383

References DGtal::Naive3DDSSComputer< TIterator, TInteger, connectivity >::init().