This example shows the basic usage of a naive 3D DSS recognition.
- See also
- Digital straight lines and segments
#include <iostream>
#include "DGtal/base/Common.h"
#include "DGtal/base/BasicTypes.h"
#include "DGtal/helpers/StdDefs.h"
#include "DGtal/geometry/curves/Naive3DDSSComputer.h"
using namespace std;
{
using namespace Z3i;
typedef std::vector<Z3::Point> Container;
DSSComputer theDSSComputer;
Container contour;
theDSSComputer.
init( contour.begin() );
while ( ( theDSSComputer.end() != contour.end() ) &&
( theDSSComputer.extendFront() ) ) {}
theDSSComputer.selfDisplay( cout );
theDSSComputer.validArithmeticalDSS2d( 0 );
DSSComputer::ArithmeticalDSSComputer2d theDSS = theDSSComputer.arithmeticalDSS2d( 0 );
DSSComputer::Point3d directionZ3;
DSSComputer::PointR3d intercept;
DSSComputer::PointR3d thikness;
theDSSComputer.getParameters ( directionZ3, intercept, thikness );
return 1;
}