31#include "DGtal/shapes/parametric/Ball3D.h"
32#include "DGtal/helpers/StdDefs.h"
33#include "DGtal/shapes/GaussDigitizer.h"
34#include "DGtal/io/Color.h"
35#include "DGtal/topology/SurfelAdjacency.h"
36#include "DGtal/topology/DigitalSurface.h"
37#include "DGtal/topology/helpers/BoundaryPredicate.h"
38#include "DGtal/topology/SetOfSurfels.h"
39#include "DGtal/io/colormaps/GradientColorMap.h"
40#include "DGtal/topology/SCellsFunctors.h"
41#include "DGtal/io/viewers/PolyscopeViewer.h"
45 using namespace DGtal;
52 int main(
int argc,
char** argv)
61 EuclideanShape ball1( c1, 12.2 );
65 dshape.attach( ball1 );
89 MySurfelAdjacency surfAdj(
true );
90 MySetOfSurfels theSetOfSurfels(
K, surfAdj );
103 for ( std::set<SCell>::iterator it = theSetOfSurfels.begin(), it_end = theSetOfSurfels.end();
109 double a =ball1.meanCurvature(Angles);
125 unsigned int nbSurfels = 0;
128 for ( std::set<SCell>::iterator it = theSetOfSurfels.begin(), it_end = theSetOfSurfels.end();
129it != it_end; ++it, ++nbSurfels )
134 double curvature =ball1.meanCurvature(Angles);
Aim: Model of the concept StarShaped3D represents any Sphere in the space.
Aim: A class for computing the Gauss digitization of some Euclidean shape, i.e. its intersection with...
const Point & lowerBound() const
const Point & upperBound() const
Aim: This class is a model of CCellularGridSpaceND. It represents the cubical grid as a cell complex,...
std::set< SCell > SurfelSet
Preferred type for defining a set of surfels (always signed cells).
bool init(const Point &lower, const Point &upper, bool isClosed)
Specifies the upper and lower bounds for the maximal cells in this space.
Aim: Implements basic operations that will be used in Point and Vector classes.
void show() override
Starts the event loop and display of elements.
Aim: A model of CDigitalSurfaceContainer which defines the digital surface as connected surfels....
std::pair< double, double > AngularCoordinates
static void trackBoundary(SCellSet &surface, const KSpace &K, const SurfelAdjacency< KSpace::dimension > &surfel_adj, const PointPredicate &pp, const SCell &start_surfel)
static SCell findABel(const KSpace &K, const PointPredicate &pp, unsigned int nbtries=1000)
Aim: Represent adjacencies between surfel elements, telling if it follows an interior to exterior ord...
MyDigitalSurface::SurfelSet SurfelSet
Space::RealPoint RealPoint
DGtal is the top-level namespace which contains all DGtal functions and types.
Aim: A trivial embedder for signed cell, which corresponds to the canonic injection of cell centroids...
Represents a signed cell in a cellular grid space by its Khalimsky coordinates and a boolean value.
Attach a property to an element.
GaussDigitizer< Space, ImplicitShape > DigitalShape