47 #include "DGtal/base/Common.h"
48 #include "DGtal/io/viewers/Viewer3D.h"
49 #include "DGtal/io/DrawWithDisplay3DModifier.h"
50 #include "DGtal/io/Color.h"
51 #include "DGtal/shapes/Shapes.h"
52 #include "DGtal/helpers/StdDefs.h"
57 using namespace DGtal;
64 int main(
int argc,
char** argv )
69 QApplication application(argc,argv);
71 viewer.setWindowTitle(
"simpleExample3DViewer");
76 Point p1( -50, -50, -50 );
77 Point p2( 50, 50, 50 );
80 trace.
warning() <<
"Constructing a ring DigitalSet ... ";
84 if ( ((*it - c ).norm() <= 25) && ((*it - c ).norm() >= 18)
85 && ( (((*it)[0] <= 3)&& ((*it)[0] >= -3))|| (((*it)[1] <= 3)&& ((*it)[1] >= -3)))){
98 std::queue<DigitalSet::Iterator> Q;
102 std::vector<DigitalSet::Iterator> v( S.
size() );
103 std::vector<uint8_t> b( v.size() );
104 for (
size_t i = 0; it != itE; ++it, ++i )
106 #pragma omp parallel for schedule(dynamic)
107 for (
size_t i = 0; i < v.size(); ++i )
108 b[ i ] = shape.
isSimple( *(v[ i ]) );
110 for (
size_t i = 0; i < v.size(); ++i )
111 if ( b[ i ] ) Q.push( v[ i ] );
113 for ( ; it != itE; ++it )
118 while ( ! Q.empty() )
129 while ( nb_simple != 0 );
143 viewer<< Viewer3D<>::updateDisplay;
147 return application.exec();
Structure representing an RGB triple with alpha component.
Aim: A wrapper class around a STL associative container for storing sets of digital points within som...
std::string className() const
void insertNew(const Point &p)
ConstIterator end() const
Container::iterator Iterator
Iterator type of the container.
ConstIterator begin() const
Size erase(const Point &p)
Iterator for HyperRectDomain.
const ConstIterator & end() const
const ConstIterator & begin() const
Aim: An object (or digital object) represents a set in some digital space associated with a digital t...
const DigitalSet & pointSet() const
bool isSimple(const Point &v) const
void beginBlock(const std::string &keyword="")
virtual void show()
Overload QWidget method in order to add a call to updateList() method (to ensure that the lists are w...
int main(int argc, char **argv)
DGtal is the top-level namespace which contains all DGtal functions and types.
Modifier class in a Display3D stream. Useful to choose your own mode for a given class....