32#include "DGtal/base/Common.h"
33#include "DGtal/kernel/SpaceND.h"
34#include "DGtal/kernel/domains/HyperRectDomain.h"
35#include "DGtal/images/ImageSelector.h"
36#include "DGtal/io/colormaps/GrayscaleColorMap.h"
37#include "DGtal/io/colormaps/HueShadeColorMap.h"
38#include "DGtal/io/colormaps/GradientColorMap.h"
39#include "DGtal/io/colormaps/ColorBrightnessColorMap.h"
40#include "DGtal/io/colormaps/RandomColorMap.h"
41#include "DGtal/io/colormaps/BasicColorToScalarFunctors.h"
42#include "DGtal/base/BasicFunctors.h"
44#include "DGtal/io/writers/PGMWriter.h"
45#include "DGtal/io/writers/PPMWriter.h"
46#include "DGtal/io/readers/PGMReader.h"
47#include "DGtal/io/writers/RawWriter.h"
48#include "DGtal/io/boards/Board2D.h"
66 typedef TSpace::Point
Point;
74 const int BlackColor = DGTAL_RGB2INT(0,0,0);
75 const int RedColor = DGTAL_RGB2INT(255,0,0);
84 for(
unsigned int i=0 ; i < 256; i++)
99 RedFunctor redFunctor( jf, rf );
109 board.
saveSVG(
"export-hue-twice.svg");
122 typedef TSpace::Point
Point;
130 for(
unsigned int i=0 ; i < 256; i++)
145 itend = image.domain().end();
148 ok = (image(*it) == imageRead(*it));
157int main(
int argc,
char** argv )
161 for (
int i = 0; i < argc; ++i )
166 trace.
emphase() << ( res ?
"Passed." :
"Error." ) << std::endl;
Aim: This class specializes a 'Board' class so as to display DGtal objects more naturally (with <<)....
Aim: This class template may be used to (linearly) convert scalar values in a given range into a colo...
Aim: This class template may be used to (linearly) convert scalar values in a given range into a colo...
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: Parallelepidec region of a digital space, model of a 'CDomain'.
std::vector< Value >::const_iterator ConstIterator
Aim: implements association bewteen points lying in a digital domain and values.
void beginBlock(const std::string &keyword="")
Aim: Define a new Functor from the composition of two other functors.
void saveSVG(const char *filename, PageSize size=Board::BoundingBox, double margin=10.0) const
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)
static ImageContainer importPGM(const std::string &aFilename, const Functor &aFunctor=Functor(), bool topbotomOrder=true)
static bool exportPGM(const std::string &filename, const Image &aImage, const Functor &aFunctor=Functor(), bool saveASCII=false, bool topbotomOrder=true)
static bool exportPPM(const std::string &filename, const Image &aImage, const Functor &aFunctor=Functor(), bool topbottomOrder=true)
static bool exportRaw8(const std::string &filename, const Image &anImage, const Functor &aFunctor=Functor())
ImageContainerBySTLVector< Domain, Value > Image
HyperRectDomain< Space > Domain