DGtal 1.3.0
Loading...
Searching...
No Matches
viewer3D-2-sets.cpp
1
40#include <iostream>
41
42#include "DGtal/base/Common.h"
43#include "DGtal/helpers/StdDefs.h"
44#include "DGtal/shapes/Shapes.h"
45#include "DGtal/io/viewers/Viewer3D.h"
46
48
49using namespace std;
50using namespace DGtal;
51using namespace Z3i;
52
53
55// Standard services - public :
56
57int main( int argc, char** argv )
58{
59
61 QApplication application(argc,argv);
62 typedef Viewer3D<> MyViewer;
63 MyViewer viewer;
64 viewer.show();
65
66 Point p1( 0, 0, 0 );
67 Point p2( 10, 10 , 10 );
68 Domain domain( p1, p2 );
69 viewer << domain;
70
71 DigitalSet shape_set( domain );
72 Shapes<Domain>::addNorm1Ball( shape_set, Point( 5, 5, 5 ), 2 );
73 Shapes<Domain>::addNorm2Ball( shape_set, Point( 3, 3, 3 ), 2 );
74
75 shape_set.erase(Point(3,3,3));
76 shape_set.erase(Point(6,6,6));
77 viewer << shape_set << MyViewer::updateDisplay;
79 return application.exec();
80}
81// //
Aim: A wrapper class around a STL associative container for storing sets of digital points within som...
static void addNorm1Ball(TDigitalSet &aSet, const Point &aCenter, UnsignedInteger aRadius)
static void addNorm2Ball(TDigitalSet &aSet, const Point &aCenter, UnsignedInteger aRadius)
virtual void show()
Overload QWidget method in order to add a call to updateList() method (to ensure that the lists are w...
Space::Point Point
Definition: StdDefs.h:168
DGtal is the top-level namespace which contains all DGtal functions and types.
STL namespace.
int main()
Definition: testBits.cpp:56
Domain domain