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 );
74 bool space_ok =
K.init(
domain.lowerBound(),
domain.upperBound(),
true );
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);
52 int main(
int argc,
char** argv) {
…}
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...
void attach(ConstAlias< EuclideanShape > shape)
void init(const RealPoint &xLow, const RealPoint &xUp, typename RealVector::Component gridStep)
std::set< SCell > SurfelSet
void show() override
Starts the event loop and display of elements.
PointVector< dim, double > RealPoint
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
Z3i this namespace gathers the standard of types for 3D imagery.
KhalimskySpaceND< 3, Integer > KSpace
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...
Attach a property to an element.
GaussDigitizer< Space, ImplicitShape > DigitalShape