41#include "DGtal/base/Common.h"
42#include "DGtal/helpers/StdDefs.h"
43#include "ConfigExamples.h"
45#include "DGtal/io/boards/Board2D.h"
48#include "DGtal/io/colormaps/HueShadeColorMap.h"
49#include "DGtal/io/colormaps/GrayscaleColorMap.h"
51#include "DGtal/images/ImageContainerBySTLVector.h"
52#include "DGtal/images/ConstImageAdapter.h"
63template <
typename Scalar>
64struct LogScaleFunctor {
67 double operator()(
const Scalar &a)
const
115 ConstImageAdapterForSubImage subImage(image, subDomain, df, df);
120 aBoard.
saveSVG(
"subImage.svg");
128 for(
unsigned int y=0; y < 17; y++)
129 for(
unsigned int x=0; x < 17; x++)
131 set.insertNew(
Point(x,y));
138 ConstImageAdapterForSpecificImage specificImage(image, specificDomain, df, df);
143 aBoard.
saveSVG(
"specificImage.svg");
152 ConstImageAdapterForThresholderImage thresholderImage(image,
domain, df, t);
157 aBoard.
saveSVG(
"thresholderImage.svg");
165 LogScaleFunctor<Image::Value> logScale;
166 ConstImageAdapterForLogScale logImage(image,
domain, df, logScale);
171 aBoard.
saveSVG(
"logImage.svg");
Aim: This class specializes a 'Board' class so as to display DGtal objects more naturally (with <<)....
Aim: implements a const image adapter with a given domain (i.e. a subdomain) and 2 functors : g for d...
Aim: A wrapper class around a STL associative container for storing sets of digital points within som...
Aim: Constructs a domain limited to the given 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...
std::vector< Value >::iterator Iterator
Aim: implements association bewteen points lying in a digital domain and values.
void beginBlock(const std::string &keyword="")
Aim: A small functor with an operator () that compares one value to a threshold value according to tw...
void clear(const DGtal::Color &color=DGtal::Color::None)
void saveSVG(const char *filename, PageSize size=Board::BoundingBox, double margin=10.0) const
int main()
[LogScaleFunctor]
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 traits class for all models of Cinteger.
Aim: Define a simple default functor that just returns its argument.
ImageContainerBySTLVector< Domain, Value > Image