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) {
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();
Class for PDF, PNG, PS, EPS, SVG export drawings with Cairo with 3D->2D projection.
void saveCairo(const char *filename, CairoType type, int bWidth, int bHeight)
Aim: Computes the greedy segmentation of a range given by a pair of ConstIterators....
Aim: Implements basic operations that will be used in Point and Vector classes.
Aim: Dynamic recognition of a 3d-digital straight segment (DSS)
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.
CameraDirection class to set camera direction.
CameraPosition class to set camera position.
CameraUpVector class to set camera up-vector.
CameraZNearFar class to set near and far distance.
Aim: Implements method to read a set of points represented in each line of a file.
Modifier class in a Display3D stream. Useful to choose your own mode for a given class....
ArithmeticalDSSComputer< std::vector< Z2i::Point >::const_iterator, int, 4 > SegmentComputer