47#include "DGtal/base/Common.h"
48#include "DGtal/io/viewers/PolyscopeViewer.h"
49#include "DGtal/io/Color.h"
50#include "DGtal/shapes/Shapes.h"
51#include "DGtal/helpers/StdDefs.h"
63int main(
int argc,
char** argv )
66 trace.beginBlock (
"Example simple example of 3DViewer" );
72 Point p1( -50, -50, -50 );
73 Point p2( 50, 50, 50 );
76 trace.warning() <<
"Constructing a ring DigitalSet ... ";
80 if ( ((*it - c ).norm() <= 25) && ((*it - c ).norm() >= 18)
81 && ( (((*it)[0] <= 3)&& ((*it)[0] >= -3))|| (((*it)[1] <= 3)&& ((*it)[1] >= -3)))){
85 trace.warning() <<
" [Done]" << std::endl;
87 trace.beginBlock (
"Thinning" );
94 std::queue<DigitalSet::Iterator> Q;
97#ifdef DGTAL_WITH_OPENMP
98 std::vector<DigitalSet::Iterator> v( S.
size() );
99 std::vector<uint8_t> b( v.size() );
100 for (
size_t i = 0; it != itE; ++it, ++i )
102#pragma omp parallel for schedule(dynamic)
103 for (
size_t i = 0; i < v.size(); ++i )
104 b[ i ] = shape.
isSimple( *(v[ i ]) );
106 for (
size_t i = 0; i < v.size(); ++i )
107 if ( b[ i ] ) Q.push( v[ i ] );
109 for ( ; it != itE; ++it )
114 while ( ! Q.empty() )
125 while ( nb_simple != 0 );
131 viewer <<
Color(25,25,255, 255);
134 viewer <<
Color(250, 0,0, 25);
63int main(
int argc,
char** argv ) {
…}
Structure representing an RGB triple with alpha component.
void insertNew(const Point &p)
ConstIterator end() const
Container::iterator Iterator
ConstIterator begin() const
Size erase(const Point &p)
const DigitalSet & pointSet() const
bool isSimple(const Point &v) const
void show() override
Starts the event loop and display of elements.
Z3i this namespace gathers the standard of types for 3D imagery.
static const DT18_6 dt18_6
Object< DT18_6, DigitalSet > Object18_6
DigitalSetSelector< Domain, BIG_DS+HIGH_BEL_DS >::Type DigitalSet
DGtal is the top-level namespace which contains all DGtal functions and types.