30 #include "DGtal/base/Common.h"
32 #include "DGtal/helpers/StdDefs.h"
33 #include "ConfigExamples.h"
37 #include "DGtal/io/readers/PGMReader.h"
38 #include "DGtal/images/imagesSetsUtils/SetFromImage.h"
42 #include "DGtal/topology/helpers/Surfaces.h"
43 #include "DGtal/geometry/curves/FreemanChain.h"
47 #include "DGtal/io/boards/Board2D.h"
48 #include "DGtal/io/colormaps/GradientColorMap.h"
49 #include "DGtal/io/Color.h"
51 using namespace DGtal;
59 std::string filename = examplesPath +
"samples/circleR10modif.pgm";
77 aBoard << image.domain();
85 std::vector< std::vector< Z2i::Point > > vectContoursBdryPointels;
93 cmap_grad.addColor(
Color( 255, 0, 0 ) );
94 cmap_grad.addColor(
Color( 255, 255, 10 ) );
95 cmap_grad.addColor(
Color( 25, 255, 255 ) );
96 cmap_grad.addColor(
Color( 255, 25, 255 ) );
97 cmap_grad.addColor(
Color( 25, 25, 25 ) );
100 for(
unsigned int i=0; i<vectContoursBdryPointels.size(); i++){
105 aBoard <<
SetMode( fc.className(),
"InterGrid" );
112 aBoard.saveEPS(
"freemanChainFromImage.eps");
Aim: This class template may be used to (linearly) convert scalar values in a given range into a colo...
Aim: implements association bewteen points lying in a digital domain and values.
static void extractAllPointContours4C(std::vector< std::vector< Point > > &aVectPointContour2D, const KSpace &aKSpace, const PointPredicate &pp, const SurfelAdjacency< 2 > &aSAdj)
void addColor(const Color &color)
Aim: Represent adjacencies between surfel elements, telling if it follows an interior to exterior ord...
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)
bool init(const Point &lower, const Point &upper, bool isClosed)
DGtal is the top-level namespace which contains all DGtal functions and types.
Aim: A wrapper class around a STL associative container for storing sets of digital points within som...
Aim: Define utilities to convert a digital set into an image.
Modifier class in a Board2D stream. Useful to choose your own mode for a given class. Realizes the concept CDrawableWithBoard2D.
Structure representing an RGB triple with alpha component.
const Domain & domain() const
Aim: This class is a model of CCellularGridSpaceND. It represents the cubical grid as a cell complex...
Aim: This class specializes a 'Board' class so as to display DGtal objects more naturally (with <<)...