33#include "DGtal/base/Common.h"
35#include "DGtal/kernel/domains/HyperRectDomain.h"
36#include "DGtal/images/ImageSelector.h"
37#include "DGtal/kernel/SpaceND.h"
38#include "DGtal/base/BasicTypes.h"
39#include "DGtal/geometry/curves/FreemanChain.h"
40#include "DGtal/io/readers/STBReader.h"
41#include "DGtal/io/boards/Board2D.h"
42#include "DGtal/helpers/StdDefs.h"
44#include "ConfigExamples.h"
61 std::string freemanChainFilename = examplesPath +
"samples/contourS.fc";
63 fst.open (freemanChainFilename.c_str(), ios::in);
69 std::string filenameImage = examplesPath +
"samples/contourS.png";
72 Point ptInf = img.domain().lowerBound();
73 Point ptSup = img.domain().upperBound();
74 unsigned int width = abs(ptSup[0]-ptInf[0]+1);
75 unsigned int height = abs(ptSup[1]-ptInf[1]+1);
80 dgBoard.
drawImage(filenameImage, 0,height-1, width, height );
83 dgBoard.
saveEPS(
"freemanChainDisplay.eps");
84 dgBoard.
saveSVG(
"freemanChainDisplay.svg");
85 dgBoard.
saveFIG(
"freemanChainDisplay.fig");
Aim: This class specializes a 'Board' class so as to display DGtal objects more naturally (with <<)....
Aim: Parallelepidec region of a digital space, model of a 'CDomain'.
Aim: implements association bewteen points lying in a digital domain and values.
Aim: Image reader using the stb_image.h header only code.
static ImageContainer import(const std::string &filename, const Functor &aFunctor=Functor())
void saveFIG(const char *filename, PageSize size=Board::BoundingBox, double margin=10.0, bool includeFIGHeader=true) const
void saveEPS(const char *filename, PageSize size=Board::BoundingBox, double margin=10.0) const
void drawImage(std::string filename, double x, double y, double width, double height, int depthValue=-1, double alpha=1.0)
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.