30 #include <QtGui/QApplication>
31 #include "DGtal/shapes/parametric/Ball3D.h"
32 #include "DGtal/helpers/StdDefs.h"
34 #include "DGtal/shapes/GaussDigitizer.h"
35 #include "DGtal/io/Color.h"
36 #include "DGtal/kernel/sets/SetPredicate.h"
37 #include "DGtal/topology/SurfelAdjacency.h"
38 #include "DGtal/topology/DigitalSurface.h"
39 #include "DGtal/topology/helpers/BoundaryPredicate.h"
40 #include "DGtal/io/viewers/Viewer3D.h"
41 #include "DGtal/topology/SetOfSurfels.h"
42 #include "DGtal/io/colormaps/GradientColorMap.h"
43 #include "DGtal/topology/SCellsFunctors.h"
47 using namespace DGtal;
54 int main(
int argc,
char** argv)
68 RealPoint c1(0, 0, 0 );
69 EuclideanShape ball1( c1, 12.2 );
74 RealPoint p1 =RealPoint( -15.0, -15.0, -15.0 );
75 RealPoint p2 =RealPoint( 15.0, 15.0, 15.0 );
76 dshape.
init( RealPoint( p1 ), RealPoint( p2 ), 1.0);
98 MySurfelAdjacency surfAdj(
true );
99 MySetOfSurfels theSetOfSurfels( K, surfAdj );
105 QApplication application(argc,argv);
120 for ( std::set<SCell>::iterator it = theSetOfSurfels.begin(), it_end = theSetOfSurfels.end();
124 RealPoint A = midpoint( *it );
126 double a =ball1.meanCurvature(Angles);
143 cmap_grad.addColor(
Color( 50, 50, 255 ) );
144 cmap_grad.addColor(
Color( 255, 0, 0 ) );
145 cmap_grad.addColor(
Color( 255, 255, 10 ) );
152 unsigned int nbSurfels = 0;
155 for ( std::set<SCell>::iterator it = theSetOfSurfels.begin(), it_end = theSetOfSurfels.end();
156 it != it_end; ++it, ++nbSurfels )
158 RealPoint A = midpoint( *it );
161 double curvature =ball1.meanCurvature(Angles);
169 viewer << Viewer3D::updateDisplay;
171 return application.exec();