#include "DGtal/base/Common.h"
#include "DGtal/helpers/StdDefs.h"
#include "ConfigExamples.h"
#include "DGtal/io/readers/PGMReader.h"
#include "DGtal/images/imagesSetsUtils/SetFromImage.h"
#include "DGtal/topology/helpers/Surfaces.h"
#include "DGtal/geometry/curves/FreemanChain.h"
#include "DGtal/io/boards/Board2D.h"
#include "DGtal/io/colormaps/GradientColorMap.h"
#include "DGtal/io/Color.h"
{
std::string filename = examplesPath + "samples/circleR10modif.pgm";
ks.
init(
image.domain().lowerBound(),
image.domain().upperBound(),
true );
aBoard << set2d;
aBoard <<
image.domain();
std::vector< std::vector< Z2i::Point > > vectContoursBdryPointels;
ks, set2d, sAdj );
for(unsigned int i=0; i<vectContoursBdryPointels.size(); i++){
aBoard << fc;
}
aBoard.
saveEPS(
"freemanChainFromImage.eps");
return 0;
}
Aim: This class specializes a 'Board' class so as to display DGtal objects more naturally (with <<)....
Structure representing an RGB triple with alpha component.
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)
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
KhalimskySpaceND< 2, Integer > KSpace
DigitalSetSelector< Domain, BIG_DS+HIGH_BEL_DS >::Type DigitalSet
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