40#include "DGtal/base/Common.h"
41#include "DGtal/helpers/StdDefs.h"
42#include "ConfigExamples.h"
44#include "DGtal/io/boards/Board2D.h"
47#include "DGtal/io/colormaps/HueShadeColorMap.h"
49#include "DGtal/images/ImageContainerBySTLVector.h"
50#include "DGtal/images/ImageFactoryFromImage.h"
51#include "DGtal/images/TiledImage.h"
76 for (VImage::Iterator it = image.begin(); it != image.end(); ++it)
82 aBoard.
saveSVG(
"tiledImage-image.svg");
84 aBoard.
saveCairo(
"tiledImage-image.png", Board2D::CairoPNG);
87 trace.
info() <<
"ORIGINAL image: " << image << endl;
98 typedef MyImageFactoryFromImage::OutputImage OutputImage;
99 MyImageFactoryFromImage imageFactoryFromImage(image);
104 MyImageCacheReadPolicyFIFO imageCacheReadPolicyFIFO(imageFactoryFromImage, 2);
105 MyImageCacheWritePolicyWT imageCacheWritePolicyWT(imageFactoryFromImage);
110 MyTiledImage tiledImage(imageFactoryFromImage, imageCacheReadPolicyFIFO, imageCacheWritePolicyWT, 4);
113 trace.
info() <<
"tiledImage image: " << tiledImage << endl;
115 typedef MyTiledImage::OutputImage OutputImage;
116 OutputImage::Value aValue;
235 aValue = 1; tiledImage.setValue(
Z2i::Point(11,7), aValue);
236 trace.
info() <<
"Write value for Point 11,7: " << aValue << endl;
248 aValue = 128; tiledImage.setValue(
Z2i::Point(16,1), aValue);
249 trace.
info() <<
"Write value for Point 16,1: " << aValue << endl;
252 trace.
info() <<
" Point 16,1 on ORIGINAL image, value: " << image(
Z2i::Point(16,1)) << endl;
256 aBoard.
saveSVG(
"tiledImage-image2.svg");
258 aBoard.
saveCairo(
"tiledImage-image2.png", Board2D::CairoPNG);
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: implements a 'FIFO' read policy cache.
Aim: implements a 'WT (Write-through)' write policy cache.
Aim: implements a factory to produce images from a "bigger/original" one according to a given domain.
Aim: implements a tiled image from a "bigger/original" one from an ImageFactory.
void beginBlock(const std::string &keyword="")
void clear(const DGtal::Color &color=DGtal::Color::None)
void saveSVG(const char *filename, PageSize size=Board::BoundingBox, double margin=10.0) const
void saveCairo(const char *filename, CairoType type=CairoPNG, 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)
Aim: Defines the concept describing a read/write image, having an output iterator.