50 #include "DGtal/io/viewers/Viewer3D.h"
52 #include "DGtal/io/boards/Board3DTo2D.h"
55 #include "DGtal/io/DrawWithDisplay3DModifier.h"
56 #include "DGtal/io/readers/PointListReader.h"
57 #include "DGtal/io/CDrawableWithDisplay3D.h"
59 #include "DGtal/base/Common.h"
60 #include "DGtal/helpers/StdDefs.h"
61 #include "ConfigExamples.h"
63 #include "DGtal/geometry/curves/StandardDSS6Computer.h"
64 #include "DGtal/geometry/curves/GreedySegmentation.h"
68 using namespace DGtal;
74 int main(
int argc,
char** argv )
79 typedef std::vector<Point>::iterator Iterator;
83 string inputFilename = examplesPath +
"samples/sinus.dat";
88 Decomposition theDecomposition(sequence.begin(), sequence.end(), algo);
95 #ifdef WITH_VISU3D_QGLVIEWER
97 QApplication application(argc,argv);
100 viewer <<
SetMode3D(p.className(),
"Grid");
105 boardViewer <<
SetMode3D(p.className(),
"Grid");
115 Decomposition::SegmentComputerIterator i = theDecomposition.begin();
116 for ( ; i != theDecomposition.end(); ++i) {
117 SegmentComputer currentSegmentComputer(*i);
118 #ifdef WITH_VISU3D_QGLVIEWER
119 viewer <<
SetMode3D(currentSegmentComputer.className(),
"Points");
120 viewer << currentSegmentComputer;
121 viewer <<
SetMode3D(currentSegmentComputer.className(),
"BoundingBox");
122 viewer << currentSegmentComputer;
125 boardViewer <<
SetMode3D(currentSegmentComputer.className(),
"Points");
126 boardViewer << currentSegmentComputer;
127 boardViewer <<
SetMode3D(currentSegmentComputer.className(),
"BoundingBox");
128 boardViewer << currentSegmentComputer;
134 #ifdef WITH_VISU3D_QGLVIEWER
135 viewer << Viewer3D<>::updateDisplay;
136 flag = application.exec();