54 #include "DGtal/base/Common.h"
55 #include "DGtal/helpers/StdDefs.h"
56 #include "ConfigExamples.h"
57 #include "DGtal/io/viewers/Viewer3D.h"
58 #include "DGtal/geometry/curves/GridCurve.h"
60 #ifdef WITH_VISU3D_QGLVIEWER
61 #include "DGtal/io/DrawWithDisplay3DModifier.h"
67 using namespace DGtal;
73 int main(
int argc,
char** argv )
77 trace.
info() <<
"exampleGridCurve3d: the type of data to be displayed "
78 <<
"may be given as argument as follows: "
79 << argv[0] <<
" scells" << endl;
80 trace.
info() <<
"Available types are: gridcurve (default), scells, points, midpoints, arrows" << endl;
82 string type = (argc > 1) ?
string(argv[1]) :
"gridcurve";
83 trace.
info() <<
"Chosen type: " << type << endl;
86 string sinus = examplesPath +
"samples/sinus.dat";
89 Point lowerBound = Point::diagonal( -100 );
90 Point upperBound = Point::diagonal( 100 );
93 K3 ks; ks.
init( lowerBound, upperBound,
true );
99 inputStream.open (sinus.c_str(), ios::in);
107 #ifdef WITH_VISU3D_QGLVIEWER
108 QApplication application(argc,argv);
112 if (type ==
"gridcurve")
116 else if (type ==
"scells")
120 else if (type ==
"points")
124 else if (type ==
"midpoints")
128 else if (type ==
"arrows")
134 trace.
info() <<
"Display type not known." << std::endl;
136 viewer << Viewer3D<Space,K3>::updateDisplay;
137 flag = application.exec();
Aim: describes, in a cellular space of dimension n, a closed or open sequence of signed d-cells (or d...
SCellsRange getSCellsRange() const
MidPointsRange getMidPointsRange() const
bool initFromVectorStream(std::istream &in)
PointsRange getPointsRange() const
ArrowsRange getArrowsRange() const
Aim: This class is a model of CCellularGridSpaceND. It represents the cubical grid as a cell complex,...
bool init(const Point &lower, const Point &upper, bool isClosed)
Specifies the upper and lower bounds for the maximal cells in this space.
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.