40#include "DGtal/base/Common.h"
41#include "DGtal/helpers/StdDefs.h"
42#include "ConfigExamples.h"
46#include "DGtal/io/readers/PGMReader.h"
47#include "DGtal/images/imagesSetsUtils/SetFromImage.h"
51#include "DGtal/topology/helpers/Surfaces.h"
52#include "DGtal/geometry/curves/FreemanChain.h"
56#include "DGtal/io/boards/Board2D.h"
57#include "DGtal/io/colormaps/GradientColorMap.h"
58#include "DGtal/io/Color.h"
68 std::string filename = examplesPath +
"samples/circleR10modif.pgm";
74 ks.
init( image.domain().lowerBound(), image.domain().upperBound(),
true );
86 aBoard << image.domain();
94 std::vector< std::vector< Z2i::Point > > vectContoursBdryPointels;
109 for(
unsigned int i=0; i<vectContoursBdryPointels.size(); i++){
121 aBoard.
saveEPS(
"freemanChainFromImage.eps");
Aim: This class specializes a 'Board' class so as to display DGtal objects more naturally (with <<)....
Structure representing an RGB triple with alpha component.
Aim: A wrapper class around a STL associative container for storing sets of digital points within som...
std::string className() const
Aim: This class template may be used to (linearly) convert scalar values in a given range into a colo...
void addColor(const Color &color)
Aim: implements association bewteen points lying in a digital domain and values.
Aim: This class is a model of CCellularGridSpaceND. It represents the cubical grid as a cell complex,...
bool init(const Point &lower, const Point &upper, bool isClosed)
Specifies the upper and lower bounds for the maximal cells in this space.
static void extractAllPointContours4C(std::vector< std::vector< Point > > &aVectPointContour2D, const KSpace &aKSpace, const PointPredicate &pp, const SurfelAdjacency< 2 > &aSAdj)
Aim: Represent adjacencies between surfel elements, telling if it follows an interior to exterior ord...
void saveEPS(const char *filename, PageSize size=Board::BoundingBox, double margin=10.0) const
int main()
[freemanChainFromImage-displayIncludes]
DGtal is the top-level namespace which contains all DGtal functions and types.
Custom style class redefining the pen color and the fill color. You may use Board2D::Color::None for ...
static ImageContainer importPGM(const std::string &aFilename, const Functor &aFunctor=Functor(), bool topbotomOrder=true)
static void append(Set &aSet, const ForegroundPredicate &isForeground, typename Image::Domain::ConstIterator itBegin, typename Image::Domain::ConstIterator itEnd)
Modifier class in a Board2D stream. Useful to choose your own mode for a given class....
ImageContainerBySTLVector< Domain, Value > Image