43#include "ConfigExamples.h"
44#include "DGtal/helpers/StdDefs.h"
45#include "DGtal/base/Common.h"
47#include "DGtal/topology/CubicalComplex.h"
49#include "DGtal/shapes/GaussDigitizer.h"
50#include "DGtal/shapes/Shapes.h"
51#include "DGtal/shapes/EuclideanShapesDecorator.h"
52#include "DGtal/shapes/parametric/Flower2D.h"
54#include "DGtal/io/boards/Board2D.h"
55#include "DGtal/io/Color.h"
67 trace.beginBlock (
"Example digitalSetToCubicalComplexes2D" );
68 trace.beginBlock (
"Generate a 2D shape." );
70 MyEuclideanShape shape(
RealPoint( 0.0, 0.0 ), 16, 5, 5, M_PI_2/2. );
73 MyGaussDigitizer digShape;
75 digShape.init ( shape.getLowerBound(), shape.getUpperBound(), 1.0 );
76 Domain domainShape = digShape.getDomain();
81 board <<
SetMode( domainShape.className(),
"Paving" ) << domainShape;
82 Color dorange ( 255, 136, 0, 220 );
87 trace.beginBlock (
"Generate a 2D cubical representation." );
88 typedef map<Cell, CubicalCellData>
Map;
92 K.init ( domainShape.lowerBound(), domainShape.upperBound(),
true );
96 board <<
SetMode( domainShape.className(),
"Paving" ) << domainShape;
106 Color( 0, 0, 0 ) ) );
110 Color( 100, 255, 100 ) ) );
114 Color( 100, 255, 100 ) ) );
118 board.
saveEPS (
"cubicalComplexes.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.
CellMap::const_iterator CellMapConstIterator
std::string className() const
void attach(ConstAlias< EuclideanShape > shape)
static void digitalShaper(TDigitalSet &aSet, const TShapeFunctor &aFunctor)
void saveEPS(const char *filename, PageSize size=Board::BoundingBox, double margin=10.0) const
Z2i this namespace gathers the standard of types for 2D imagery.
KhalimskySpaceND< 2, Integer > KSpace
Space::RealPoint RealPoint
DigitalSetSelector< Domain, BIG_DS+HIGH_BEL_DS >::Type DigitalSet
functors namespace gathers all DGtal functors.
DGtal is the top-level namespace which contains all DGtal functions and types.
DGtal::uint32_t Dimension
Custom style class redefining the pen color and the fill color. You may use Board2D::Color::None for ...
Custom style class redefining the fill color. You may use Board2D::Color::None for transparent color.
Modifier class in a Board2D stream. Useful to choose your own mode for a given class....
std::unordered_map< Cell, CubicalCellData > Map
CubicalComplex< KSpace, Map > CC
CC::CellMapConstIterator CellMapConstIterator