34#include <boost/algorithm/minmax_element.hpp>
38#include "DGtal/base/Common.h"
39#include "DGtal/helpers/StdDefs.h"
41#include "DGtal/base/BasicFunctors.h"
42#include "DGtal/kernel/BasicPointPredicates.h"
43#include "DGtal/kernel/sets/DigitalSetInserter.h"
45#include "DGtal/images/ImageContainerBySTLVector.h"
46#include "DGtal/images/ImageHelper.h"
47#include "DGtal/geometry/volumes/distance/DistanceTransformation.h"
48#include "DGtal/images/IntervalForegroundPredicate.h"
50#include "DGtal/io/boards/Board2D.h"
51#include "DGtal/io/readers/PGMReader.h"
52#include "DGtal/io/colormaps/HueShadeColorMap.h"
53#include "DGtal/io/colormaps/GrayscaleColorMap.h"
55#include "ConfigExamples.h"
71 std::string filename = examplesPath +
"samples/contourS.pgm";
79 aBoard << image.domain();
80 aBoard.
saveSVG(
"imageDomainTuto.svg");
82 Display2DFactory::drawImage<Gray>(aBoard, image, (
unsigned char)0, (
unsigned char)255);
83 aBoard.
saveEPS(
"imageDomainTuto2.eps");
93 aBoard.
saveEPS(
"imageDomainTuto2bis.eps");
98 Binarizer b(image,1, 135);
105 DTL2::Value maxDT = (*boost::first_max_element(dt.constRange().begin(),
106 dt.constRange().end(), std::less<DTL2::Value>() ));
110 Display2DFactory::drawImage<HueTwice>(aBoard, dt, (DTL2::Value)0,
112 aBoard.
saveEPS(
"imageDomainTuto3.eps");
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...
const Domain & domain() const
Aim: this output iterator class is designed to allow algorithms to insert points in the digital set....
Aim: This class template may be used to (linearly) convert scalar values in a given range into gray l...
Aim: This class template may be used to (linearly) convert scalar values in a given range into a colo...
Aim: implements association bewteen points lying in a digital domain and values.
Aim: Define a simple Foreground predicate thresholding image values between two constant values (the ...
void clear(const DGtal::Color &color=DGtal::Color::None)
void saveEPS(const char *filename, PageSize size=Board::BoundingBox, double margin=10.0) const
void saveSVG(const char *filename, PageSize size=Board::BoundingBox, double margin=10.0) const
static const L2Metric l2Metric
DGtal is the top-level namespace which contains all DGtal functions and types.
void setFromImage(const I &aImg, const O &ito, const typename I::Value &aThreshold=0)
static ImageContainer importPGM(const std::string &aFilename, const Functor &aFunctor=Functor(), bool topbotomOrder=true)