32#include "DGtal/base/Common.h"
33#include "DGtal/helpers/StdDefs.h"
34#include "DGtal/geometry/volumes/distance/ExactPredicateLpSeparableMetric.h"
35#include "DGtal/geometry/volumes/distance/InexactPredicateLpSeparableMetric.h"
36#include "DGtal/io/boards/Board2D.h"
37#include "DGtal/kernel/BasicPointPredicates.h"
38#include "DGtal/geometry/volumes/distance/DistanceTransformation.h"
39#include "DGtal/io/colormaps/HueShadeColorMap.h"
54 unsigned int nbok = 0;
64 NegPred predicate( set );
68 DT
dt( &
domain, &predicate, &metric);
78 std::string title =
"image-ball-" + boost::lexical_cast<string>( norm )+
".png" ;
80 board.
saveCairo(title.c_str(), Board2D::CairoPNG );
87 unsigned int nbok = 0;
97 NegPred predicate( set );
101 DT
dt( &
domain, &predicate, &metric);
111 std::string title =
"image-ball-" + boost::lexical_cast<string>( norm )+
".png" ;
113 board.
saveCairo(title.c_str(), Board2D::CairoPNG );
121int main(
int argc,
char** argv )
125 for (
int i = 0; i < argc; ++i )
137 trace.
emphase() << ( res ?
"Passed." :
"Error." ) << endl;
Aim: This class specializes a 'Board' class so as to display DGtal objects more naturally (with <<)....
Aim: A wrapper class around a STL associative container for storing sets of digital points within som...
Aim: implements separable l_p metrics with exact predicates.
Aim: This class template may be used to (linearly) convert scalar values in a given range into a colo...
Aim: implements separable l_p metrics with approximated predicates.
void beginBlock(const std::string &keyword="")
void saveCairo(const char *filename, CairoType type=CairoPNG, PageSize size=Board::BoundingBox, double margin=10.0) const
functors namespace gathers all DGtal functors.
DGtal is the top-level namespace which contains all DGtal functions and types.
static void drawImage(DGtal::Board2D &board, const Image &i, const typename Image::Value &minV, const typename Image::Value &maxV)
Aim: The predicate returns true when the point predicate given at construction return false....
bool testInexactMetricBalls(double norm)
bool testExactMetricBalls()