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" ;
79#ifdef DGTAL_WITH_CAIRO
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" ;
112#ifdef DGTAL_WITH_CAIRO
121int main(
int argc,
char** argv )
123 trace.beginBlock (
"Testing class MetricBalls" );
124 trace.info() <<
"Args:";
125 for (
int i = 0; i < argc; ++i )
126 trace.info() <<
" " << argv[ i ];
127 trace.info() << endl;
137 trace.emphase() << ( res ?
"Passed." :
"Error." ) << endl;
121int main(
int argc,
char** argv ) {
…}
Aim: This class specializes a 'Board' class so as to display DGtal objects more naturally (with <<)....
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 saveCairo(const char *filename, CairoType type=CairoPNG, PageSize size=Board::BoundingBox, double margin=10.0) const
DigitalSetSelector< Domain, BIG_DS+HIGH_BEL_DS >::Type DigitalSet
HyperRectDomain< Space > Domain
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()