29#include "DGtal/helpers/StdDefs.h"
31#include "DGtal/math/linalg/EigenSupport.h"
33#include "DGtal/dec/DiscreteExteriorCalculus.h"
34#include "DGtal/dec/DiscreteExteriorCalculusFactory.h"
36#include "DGtal/shapes/parametric/Ball3D.h"
37#include "DGtal/shapes/GaussDigitizer.h"
39#include "DGtal/topology/DigitalSurface.h"
40#include "DGtal/topology/ImplicitDigitalSurface.h"
42#include "DGtal/geometry/surfaces/estimation/LocalEstimatorFromSurfelFunctorAdapter.h"
43#include "DGtal/geometry/surfaces/estimation/IIGeometricFunctors.h"
44#include "DGtal/geometry/surfaces/estimation/IntegralInvariantCovarianceEstimator.h"
46#include "DGtalCatch.h"
57 for(
int i = 0; i < M.rows(); i++ )
59 for(
int j = 0; j < M.cols(); j++ )
61 if( i == j && M(i, j) > 0 )
test =
false;
62 if( i != j && M(i, j) < 0 )
test =
false;
65 if( M.row(i).sum() >= 1e-10 )
test =
false;
96 MyImplicitDigitalSurface ImpSurf( kspace, digitizer, SAdj, bel );
102 MyIINormalFunctor normalFunctor;
103 normalFunctor.
init( h, 3.5 * pow( h, 1. / 3. ) );
105 MyIINormalEstimator normalEstimator( normalFunctor );
106 normalEstimator.attach( kspace, digitizer );
107 normalEstimator.setParams( 3.5 * pow( h, 1. / 3. ) / h );
108 normalEstimator.init( h, digSurf.
begin(), digSurf.
end() );
113 const Calculus calculus = CalculusFactory::createFromNSCells<2>( digSurf.
begin(), digSurf.
end(), normalEstimator, h );
115 const double t = 0.1 * pow( h, 2./3. );
116 const double cut_locus = 3.0;
117 const Calculus::PrimalIdentity0 laplace_primal = calculus.heatLaplace<
PRIMAL>( h, t, cut_locus );
118 const Calculus::DualIdentity0 laplace_dual = calculus.heatLaplace<
DUAL>( h, t, cut_locus );
Aim: Model of the concept StarShaped represents any circle in the plane.
RealPoint getUpperBound() const
RealPoint getLowerBound() const
Aim: Model of the concept StarShaped3D represents any Sphere in the space.
Aim: Represents a set of n-1-cells in a nD space, together with adjacency relation between these cell...
ConstIterator begin() const
ConstIterator end() const
Aim: This class provides static members to create DEC structures from various other DGtal structures.
Aim: DiscreteExteriorCalculus represents a calculus in the dec package. This is the main structure in...
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)
const Point & lowerBound() const
const Point & upperBound() const
Aim: A model of CDigitalSurfaceContainer which defines the digital surface as the boundary of an impl...
Aim: This class implement an Integral Invariant estimator which computes for each surfel the covarian...
void init(const double _h, SurfelConstIterator itb, SurfelConstIterator ite)
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.
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...
Aim: A functor Matrix -> RealVector that returns the normal direction by diagonalizing the given cova...
DigitalSurface< MyDigitalSurfaceContainer > MyDigitalSurface
DGtal is the top-level namespace which contains all DGtal functions and types.
Eigen::MatrixXd DenseMatrix
Eigen::SparseMatrix< DenseVector::Scalar, Eigen::ColMajor, DenseVector::Index > SparseMatrix
Represents a signed cell in a cellular grid space by its Khalimsky coordinates and a boolean value.
FreemanChain< int >::Vector Vector
TEST_CASE("Operator Test")
EigenLinearAlgebraBackend::SparseMatrix SparseMatrix
bool test_operator(const DenseMatrix &M)
bool laplace_sphere(const double &h)
EigenLinearAlgebraBackend::DenseMatrix DenseMatrix
bool test(const I &itb, const I &ite)
SECTION("Testing constant forward iterators")
HyperRectDomain< Space > Domain
REQUIRE(domain.isInside(aPoint))