32#include "DGtal/base/Common.h"
33#include "DGtal/geometry/volumes/KanungoNoise.h"
34#include "DGtal/io/boards/Board2D.h"
35#include "DGtal/helpers/StdDefs.h"
36#include "DGtal/shapes/Shapes.h"
37#include "DGtal/kernel/CPointPredicate.h"
52 unsigned int nbok = 0;
55 trace.beginBlock (
"Testing 2DNoise ..." );
65 board.
saveSVG(
"input-set-kanungo.svg");
73 if (nosifiedObject( * it ))
75 board.
saveSVG(
"output-set-kanungo-0.5.svg");
83 if (nosifiedObject2( * it ))
85 board.
saveSVG(
"output-set-kanungo-0.1.svg");
89 trace.info() <<
"(" << nbok <<
"/" << nb <<
") "
90 <<
"true == true" << std::endl;
106int main(
int argc,
char** argv )
108 trace.beginBlock (
"Testing class Kanungo" );
109 trace.info() <<
"Args:";
110 for (
int i = 0; i < argc; ++i )
111 trace.info() <<
" " << argv[ i ];
112 trace.info() << endl;
115 trace.emphase() << ( res ?
"Passed." :
"Error." ) << endl;
106int main(
int argc,
char** argv ) {
…}
Aim: This class specializes a 'Board' class so as to display DGtal objects more naturally (with <<)....
Aim: From a point predicate (model of concepts::CPointPredicate), this class constructs another point...
static void addNorm2Ball(TDigitalSet &aSet, const Point &aCenter, UnsignedInteger aRadius)
void clear(const DGtal::Color &color=DGtal::Color::None)
void saveSVG(const char *filename, PageSize size=Board::BoundingBox, double margin=10.0) const
DigitalSetSelector< Domain, BIG_DS+HIGH_BEL_DS >::Type DigitalSet
HyperRectDomain< Space > Domain
DGtal is the top-level namespace which contains all DGtal functions and types.
Aim: Defines a predicate on a point.