33 #include "DGtal/base/Common.h"
37 #include "DGtal/kernel/domains/HyperRectDomain.h"
38 #include "DGtal/images/ImageSelector.h"
39 #include "DGtal/kernel/SpaceND.h"
40 #include "DGtal/base/BasicTypes.h"
41 #include "DGtal/geometry/curves/FreemanChain.h"
42 #include "DGtal/io/readers/MagickReader.h"
43 #include "DGtal/io/boards/Board2D.h"
44 #include "DGtal/helpers/StdDefs.h"
48 #include "ConfigExamples.h"
52 using namespace DGtal;
64 typedef TDomain::Vector Vector;
71 std::string freemanChainFilename = examplesPath +
"samples/contourS.fc";
73 fst.open (freemanChainFilename.c_str(), ios::in);
80 std::string filenameImage = examplesPath +
"samples/contourS.gif";
85 unsigned int width =
abs(ptSup.at(0)-ptInf.at(0)+1);
86 unsigned int height =
abs(ptSup.at(1)-ptInf.at(1)+1);
91 dgBoard.
drawImage(filenameImage, 0,height-1, width, height );
94 dgBoard.saveEPS(
"freemanChainDisplay.eps");
95 dgBoard.saveSVG(
"freemanChainDisplay.svg");
96 dgBoard.saveFIG(
"freemanChainDisplay.fig");