31#include "ConfigExamples.h"
32#include "DGtal/helpers/StdDefs.h"
34#include "DGtal/topology/CubicalComplex.h"
36#include "DGtal/topology/ParDirCollapse.h"
39#include "DGtal/shapes/GaussDigitizer.h"
40#include "DGtal/shapes/Shapes.h"
41#include "DGtal/shapes/EuclideanShapesDecorator.h"
42#include "DGtal/shapes/parametric/Flower2D.h"
44#include "DGtal/io/boards/Board2D.h"
53template <
typename CC,
typename KSpace>
57 MyEuclideanShape shape(
RealPoint( 0.0, 0.0 ), 16, 5, 5, M_PI_2/2. );
60 MyGaussDigitizer digShape;
62 digShape.init ( shape.getLowerBound(), shape.getUpperBound(), 1.0 );
63 Domain domainShape = digShape.getDomain();
69 complex.construct ( aSet );
88 Color( 100, 255, 100 ) ) );
92 Color( 100, 255, 100 ) ) );
103 typedef map<Cell, CubicalCellData>
Map;
109 ParDirCollapse < CC > thinning (
K );
114 board.
saveEPS (
"ComplexBeforeThinning.eps" );
116 thinning.
attach ( &complex );
123 board.
saveEPS (
"ParDirCollapse_2.eps" );
128 thinning.
attach ( &complex );
133 board.
saveEPS (
"ParDirCollapse_collapseSurface.eps" );
138 thinning.
attach ( &complex );
143 board.
saveEPS (
"ParDirCollapse_collapseIsthmus.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: This class represents an arbitrary cubical complex living in some Khalimsky space....
CellMap::const_iterator CellMapConstIterator
Const iterator for visiting type CellMap.
Aim: A wrapper class around a STL associative container for storing sets of digital points within som...
Aim: Model of the concept StarShaped represents any flower with k-petals in the plane.
void attach(ConstAlias< EuclideanShape > shape)
const Point & lowerBound() const
const Point & upperBound() const
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.
void attach(Alias< CC > pComplex)
unsigned int eval(unsigned int iterations)
static void digitalShaper(TDigitalSet &aSet, const TShapeFunctor &aFunctor)
void beginBlock(const std::string &keyword="")
void clear(const DGtal::Color &color=DGtal::Color::None)
void saveEPS(const char *filename, PageSize size=Board::BoundingBox, double margin=10.0) const
void getComplex(CC &complex, KSpace &K)
void drawComplex(Board2D &board, CC &complex)
Space::RealPoint RealPoint
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 ...
std::unordered_map< Cell, CubicalCellData > Map
CubicalComplex< KSpace, Map > CC
CC::CellMapConstIterator CellMapConstIterator