#include <iostream>
#include "DGtal/base/Common.h"
#include "DGtal/shapes/GaussDigitizer.h"
#include "DGtal/topology/LightImplicitDigitalSurface.h"
#include "DGtal/topology/DigitalSurface.h"
#include "DGtal/io/boards/Board2D.h"
#include "DGtal/images/ImageHelper.h"
#include "DGtal/shapes/Shapes.h"
#include "DGtal/shapes/implicit/ImplicitBall.h"
#include "DGtal/shapes/EuclideanShapesDecorator.h"
#include "DGtal/io/boards/Board2D.h"
using namespace std;
int main(
int argc,
char** argv )
{
for ( int i = 0; i < argc; ++i )
double h = 1.0;
typedef ImplicitBall< Z2i::Space > MyEuclideanShapeA;
typedef ImplicitBall< Z2i::Space > MyEuclideanShapeB;
typedef EuclideanShapesCSG< MyEuclideanShapeA, MyEuclideanShapeB > Minus;
Minus s_minus ( shapeA );
s_minus.minus( shapeB );
s_minus.plus( shapeC );
typedef GaussDigitizer< Z2i::Space, Minus > MyGaussDigitizer;
MyGaussDigitizer digShape;
digShape.attach( s_minus );
digShape.init( s_minus.getLowerBound(), s_minus.getUpperBound(), h );
Shapes<Z2i::Domain>::digitalShaper( aSet, digShape );
Board2D board;
board << SetMode( domainShape.className(), "Paving" )
<< domainShape;
Color dorange ( 255, 136, 0, 220 );
board << CustomStyle( aSet.className(), new CustomFillColor( dorange ));
board << aSet;
board.saveSVG ( "example-EuclideanShapesDecorator.svg" );
return 0;
}
void beginBlock(const std::string &keyword="")
DGtal is the top-level namespace which contains all DGtal functions and types.
int main(int argc, char **argv)
HyperRectDomain< Space > Domain
PointVector< 3, double > RealPoint
Z2i::DigitalSet DigitalSet