Loading [MathJax]/extensions/TeX/AMSsymbols.js
DGtal 2.0.0
viewer3D-2-sets.cpp
Go to the documentation of this file.
1
16
29
30
37
38
40#include <iostream>
41
42#include "DGtal/base/Common.h"
43#include "DGtal/helpers/StdDefs.h"
44#include "DGtal/shapes/Shapes.h"
45
46#include "DGtal/io/viewers/PolyscopeViewer.h"
47
49
50using namespace std;
51using namespace DGtal;
52using namespace Z3i;
53
54
56// Standard services - public :
57
58int main( int argc, char** argv )
59{
62 Point p1( 0, 0, 0 );
63 Point p2( 10, 10 , 10 );
64 Domain domain( p1, p2 );
65
66 v << p1 << p2 << domain;
67
68 DigitalSet shape_set( domain );
69 Shapes<Domain>::addNorm1Ball( shape_set, Point( 5, 5, 5 ), 2 );
70 Shapes<Domain>::addNorm2Ball( shape_set, Point( 3, 3, 3 ), 2 );
71
72 shape_set.erase(Point(3,3,3));
73 shape_set.erase(Point(6,6,6));
74
75 v << shape_set;
76
77 v.show();
79 return 0;
80}
81// //
void show() override
Starts the event loop and display of elements.
static void addNorm1Ball(TDigitalSet &aSet, const Point &aCenter, UnsignedInteger aRadius)
static void addNorm2Ball(TDigitalSet &aSet, const Point &aCenter, UnsignedInteger aRadius)
Z3i this namespace gathers the standard of types for 3D imagery.
Space::Point Point
Definition StdDefs.h:168
DigitalSetSelector< Domain, BIG_DS+HIGH_BEL_DS >::Type DigitalSet
Definition StdDefs.h:173
DGtal is the top-level namespace which contains all DGtal functions and types.
STL namespace.
int main()
Definition testBits.cpp:56
Domain domain