31 #if defined(ShortcutsGeometry_RECURSES)
32 #error Recursive header files inclusion detected in ShortcutsGeometry.h
35 #define ShortcutsGeometry_RECURSES
37 #if !defined ShortcutsGeometry_h
39 #define ShortcutsGeometry_h
42 #include "DGtal/helpers/Shortcuts.h"
43 #include "DGtal/geometry/volumes/distance/LpMetric.h"
44 #include "DGtal/geometry/volumes/distance/ExactPredicateLpSeparableMetric.h"
45 #include "DGtal/geometry/surfaces/estimation/TrueDigitalSurfaceLocalEstimator.h"
46 #include "DGtal/geometry/surfaces/estimation/VoronoiCovarianceMeasureOnDigitalSurface.h"
47 #include "DGtal/geometry/surfaces/estimation/VCMDigitalSurfaceLocalEstimator.h"
48 #include "DGtal/geometry/surfaces/estimation/IIGeometricFunctors.h"
49 #include "DGtal/geometry/surfaces/estimation/IntegralInvariantVolumeEstimator.h"
50 #include "DGtal/geometry/surfaces/estimation/IntegralInvariantCovarianceEstimator.h"
52 #include "DGtal/dec/DiscreteExteriorCalculusFactory.h"
53 #include "DGtal/dec/ATSolver2D.h"
59 namespace sgf = ::DGtal::functors::ShapeGeometricFunctors;
73 template <
typename TKSpace >
192 typedef ::DGtal::Mesh<RealPoint>
Mesh;
223 (
"projectionMaxIter", 20 )
224 (
"projectionAccuracy", 0.0001 )
225 (
"projectionGamma", 0.5 )
256 int maxIter = params[
"projectionMaxIter" ].as<
int>();
257 double accuracy = params[
"projectionAccuracy" ].as<
double>();
258 double gamma = params[
"projectionGamma" ].as<
double>();
260 true_estimator.
attach( *shape );
262 true_estimator.
init( gridstep, surfels.begin(), surfels.end() );
263 true_estimator.
eval( surfels.begin(), surfels.end(),
264 std::back_inserter( n_true_estimations ) );
265 return n_true_estimations;
288 int maxIter = params[
"projectionMaxIter" ].as<
int>();
289 double accuracy = params[
"projectionAccuracy" ].as<
double>();
290 double gamma = params[
"projectionGamma" ].as<
double>();
291 for (
unsigned int i = 0; i < points.size(); ++i )
292 proj_points[ i ] = shape->nearestPoint( points[ i ], accuracy,
324 int maxIter = params[
"projectionMaxIter" ].as<
int>();
325 double accuracy = params[
"projectionAccuracy" ].as<
double>();
326 double gamma = params[
"projectionGamma" ].as<
double>();
328 true_estimator.
attach( *shape );
330 true_estimator.
init( gridstep, surfels.begin(), surfels.end() );
331 true_estimator.
eval( surfels.begin(), surfels.end(),
332 std::back_inserter( n_true_estimations ) );
333 return n_true_estimations;
363 int maxIter = params[
"projectionMaxIter" ].as<
int>();
364 double accuracy = params[
"projectionAccuracy" ].as<
double>();
365 double gamma = params[
"projectionGamma" ].as<
double>();
367 true_estimator.
attach( *shape );
369 true_estimator.
init( gridstep, surfels.begin(), surfels.end() );
370 true_estimator.
eval( surfels.begin(), surfels.end(),
371 std::back_inserter( n_true_estimations ) );
372 return n_true_estimations;
403 int maxIter = params[
"projectionMaxIter" ].as<
int>();
404 double accuracy = params[
"projectionAccuracy" ].as<
double>();
405 double gamma = params[
"projectionGamma" ].as<
double>();
407 true_estimator.
attach( *shape );
409 true_estimator.
init( gridstep, surfels.begin(), surfels.end() );
410 true_estimator.
eval( surfels.begin(), surfels.end(),
411 std::back_inserter( n_true_estimations ) );
412 return n_true_estimations;
444 int maxIter = params[
"projectionMaxIter" ].as<
int>();
445 double accuracy = params[
"projectionAccuracy" ].as<
double>();
446 double gamma = params[
"projectionGamma" ].as<
double>();
448 true_estimator.
attach( *shape );
450 maxIter, accuracy, gamma );
451 true_estimator.
init( gridstep, surfels.begin(), surfels.end() );
452 true_estimator.
eval( surfels.begin(), surfels.end(),
453 std::back_inserter( n_true_estimations ) );
454 return n_true_estimations;
486 int maxIter = params[
"projectionMaxIter" ].as<
int>();
487 double accuracy = params[
"projectionAccuracy" ].as<
double>();
488 double gamma = params[
"projectionGamma" ].as<
double>();
490 true_estimator.
attach( *shape );
492 maxIter, accuracy, gamma );
493 true_estimator.
init( gridstep, surfels.begin(), surfels.end() );
494 true_estimator.
eval( surfels.begin(), surfels.end(),
495 std::back_inserter( n_true_estimations ) );
496 return n_true_estimations;
528 int maxIter = params[
"projectionMaxIter" ].as<
int>();
529 double accuracy = params[
"projectionAccuracy" ].as<
double>();
530 double gamma = params[
"projectionGamma" ].as<
double>();
532 true_estimator.
attach( *shape );
534 maxIter, accuracy, gamma );
535 true_estimator.
init( gridstep, surfels.begin(), surfels.end() );
536 true_estimator.
eval( surfels.begin(), surfels.end(),
537 std::back_inserter( n_true_estimations ) );
538 return n_true_estimations;
570 int maxIter = params[
"projectionMaxIter" ].as<
int>();
571 double accuracy = params[
"projectionAccuracy" ].as<
double>();
572 double gamma = params[
"projectionGamma" ].as<
double>();
574 true_estimator.
attach( *shape );
576 maxIter, accuracy, gamma );
577 true_estimator.
init( gridstep, surfels.begin(), surfels.end() );
578 true_estimator.
eval( surfels.begin(), surfels.end(),
579 std::back_inserter( n_true_estimations ) );
580 return n_true_estimations;
613 int maxIter = params[
"projectionMaxIter" ].as<
int>();
614 double accuracy = params[
"projectionAccuracy" ].as<
double>();
615 double gamma = params[
"projectionGamma" ].as<
double>();
617 true_estimator.
attach( *shape );
619 maxIter, accuracy, gamma );
620 true_estimator.
init( gridstep, surfels.begin(), surfels.end() );
621 true_estimator.
eval( surfels.begin(), surfels.end(),
622 std::back_inserter( n_true_estimations ) );
623 return n_true_estimations;
651 (
"surfelEmbedding", 0 );
667 std::vector< RealVector > result;
668 for (
auto s : surfels )
671 bool direct =
K.sDirect( s, k );
673 t[ k ] = direct ? -1.0 : 1.0;
674 result.push_back( t );
694 template <
typename TAnyDigitalSurface>
701 int verbose = params[
"verbose" ].as<
int>();
702 Scalar t = params[
"t-ring" ].as<
double>();
703 typedef typename TAnyDigitalSurface::DigitalSurfaceContainer SurfaceContainer;
709 < SurfaceContainer, Metric, SurfelFunctor,
Functor> NormalEstimator;
711 trace.
info() <<
"- CTrivial normal t-ring=" << t <<
" (discrete)" << std::endl;
714 Metric aMetric( 2.0 );
716 std::vector< RealVector > n_estimations;
717 SurfelFunctor surfelFct( canonic_embedder, 1.0 );
718 NormalEstimator estimator;
720 estimator.setParams( aMetric, surfelFct, fct, t );
721 estimator.init( 1.0, surfels.begin(), surfels.end());
722 estimator.eval( surfels.begin(), surfels.end(),
723 std::back_inserter( n_estimations ) );
724 std::transform( n_estimations.cbegin(), n_estimations.cend(), n_estimations.begin(),
726 return n_estimations;
750 template <
typename TAnyDigitalSurface>
758 typedef typename TAnyDigitalSurface::DigitalSurfaceContainer SurfaceContainer;
760 int verbose = params[
"verbose" ].as<
int>();
761 std::string kernel = params[
"kernel" ].as<std::string>();
767 int embedding = params[
"embedding" ].as<
int>();
769 if ( alpha != 1.0 ) R *= pow( h, alpha-1.0 );
770 if ( alpha != 1.0 ) r *= pow( h, alpha-1.0 );
775 trace.
info() <<
"- VCM normal kernel=" << kernel <<
" emb=" << embedding
776 <<
" alpha=" << alpha << std::endl;
777 trace.
info() <<
"- VCM normal r=" << (r*h) <<
" (continuous) "
778 << r <<
" (discrete)" << std::endl;
779 trace.
info() <<
"- VCM normal R=" << (R*h) <<
" (continuous) "
780 << R <<
" (discrete)" << std::endl;
781 trace.
info() <<
"- VCM normal t=" << t <<
" (discrete)" << std::endl;
783 if ( kernel ==
"hat" )
787 < SurfaceContainer, Metric, KernelFunction > VCMOnSurface;
790 < SurfaceContainer, Metric, KernelFunction, NormalVFunctor> VCMNormalEstimator;
791 KernelFunction chi_r( 1.0, r );
792 VCMNormalEstimator estimator;
794 estimator.setParams( embType, R, r, chi_r, t, Metric(), verbose > 0 );
795 estimator.init( h, surfels.begin(), surfels.end() );
796 estimator.eval( surfels.begin(), surfels.end(),
797 std::back_inserter( n_estimations ) );
799 else if ( kernel ==
"ball" )
803 < SurfaceContainer, Metric, KernelFunction > VCMOnSurface;
806 < SurfaceContainer, Metric, KernelFunction, NormalVFunctor> VCMNormalEstimator;
807 KernelFunction chi_r( 1.0, r );
808 VCMNormalEstimator estimator;
810 estimator.setParams( embType, R, r, chi_r, t, Metric(), verbose > 0 );
811 estimator.init( h, surfels.begin(), surfels.end() );
812 estimator.eval( surfels.begin(), surfels.end(),
813 std::back_inserter( n_estimations ) );
817 trace.
warning() <<
"[ShortcutsGeometry::getVCMNormalVectors] Unknown kernel: "
818 << kernel << std::endl;
820 return n_estimations;
921 template <
typename TPo
intPredicate>
932 <
KSpace, TPointPredicate, IINormalFunctor> IINormalEstimator;
935 int verbose = params[
"verbose" ].as<
int>();
939 if ( alpha != 1.0 ) r *= pow( h, alpha-1.0 );
942 trace.
info() <<
"- II normal alpha=" << alpha << std::endl;
943 trace.
info() <<
"- II normal r=" << (r*h) <<
" (continuous) "
944 << r <<
" (discrete)" << std::endl;
946 IINormalFunctor functor;
947 functor.init( h, r*h );
948 IINormalEstimator ii_estimator( functor );
949 ii_estimator.attach(
K, shape );
950 ii_estimator.setParams( r );
951 ii_estimator.init( h, surfels.begin(), surfels.end() );
952 ii_estimator.eval( surfels.begin(), surfels.end(),
953 std::back_inserter( n_estimations ) );
956 return n_estimations;
1048 template <
typename TPo
intPredicate>
1059 <
KSpace, TPointPredicate, IIMeanCurvFunctor> IIMeanCurvEstimator;
1062 int verbose = params[
"verbose" ].as<
int>();
1066 if ( alpha != 1.0 ) r *= pow( h, alpha-1.0 );
1069 trace.
info() <<
"- II mean curvature alpha=" << alpha << std::endl;
1070 trace.
info() <<
"- II mean curvature r=" << (r*h) <<
" (continuous) "
1071 << r <<
" (discrete)" << std::endl;
1073 IIMeanCurvFunctor functor;
1074 functor.init( h, r*h );
1075 IIMeanCurvEstimator ii_estimator( functor );
1076 ii_estimator.attach(
K, shape );
1077 ii_estimator.setParams( r );
1078 ii_estimator.init( h, surfels.begin(), surfels.end() );
1079 ii_estimator.eval( surfels.begin(), surfels.end(),
1080 std::back_inserter( mc_estimations ) );
1081 return mc_estimations;
1172 template <
typename TPo
intPredicate>
1183 <
KSpace, TPointPredicate, IIGaussianCurvFunctor> IIGaussianCurvEstimator;
1186 int verbose = params[
"verbose" ].as<
int>();
1190 if ( alpha != 1.0 ) r *= pow( h, alpha-1.0 );
1193 trace.
info() <<
"- II Gaussian curvature alpha=" << alpha << std::endl;
1194 trace.
info() <<
"- II Gaussian curvature r=" << (r*h) <<
" (continuous) "
1195 << r <<
" (discrete)" << std::endl;
1197 IIGaussianCurvFunctor functor;
1198 functor.init( h, r*h );
1199 IIGaussianCurvEstimator ii_estimator( functor );
1200 ii_estimator.attach(
K, shape );
1201 ii_estimator.setParams( r );
1202 ii_estimator.init( h, surfels.begin(), surfels.end() );
1203 ii_estimator.eval( surfels.begin(), surfels.end(),
1204 std::back_inserter( mc_estimations ) );
1205 return mc_estimations;
1298 template <
typename TPo
intPredicate>
1311 int verbose = params[
"verbose" ].as<
int>();
1315 if ( alpha != 1.0 ) r *= pow( h, alpha-1.0 );
1318 trace.
info() <<
"- II principal curvatures and directions alpha=" << alpha << std::endl;
1319 trace.
info() <<
"- II principal curvatures and directions r=" << (r*h) <<
" (continuous) "
1320 << r <<
" (discrete)" << std::endl;
1322 IICurvFunctor functor;
1323 functor.init( h, r*h );
1324 IICurvEstimator ii_estimator( functor );
1325 ii_estimator.attach(
K, shape );
1326 ii_estimator.setParams( r );
1327 ii_estimator.init( h, surfels.begin(), surfels.end() );
1328 ii_estimator.eval( surfels.begin(), surfels.end(),
1329 std::back_inserter( mc_estimations ) );
1330 return mc_estimations;
1355 #if defined(WITH_EIGEN)
1359 (
"at-lambda", 0.025 )
1360 (
"at-epsilon", 0.25 )
1361 (
"at-epsilon-start", 2.0 )
1362 (
"at-epsilon-ratio", 2.0 )
1363 (
"at-max-iter", 10 )
1364 (
"at-diff-v-max", 0.0001 )
1365 (
"at-v-policy",
"Maximum" );
1371 #if defined(WITH_EIGEN)
1396 template <
typename TAnyDigitalSurface,
1397 typename VectorFieldInput>
1402 const VectorFieldInput& input,
1408 int verbose = params[
"verbose" ].as<
int>();
1411 Scalar epsilon1 = params[
"at-epsilon-start" ].as<
Scalar>();
1413 Scalar epsilonr = params[
"at-epsilon-ratio" ].as<
Scalar>();
1414 int max_iter = params[
"at-max-iter" ].as<
int>();
1415 Scalar diff_v_max= params[
"at-diff-v-max" ].as<
Scalar>();
1417 const auto calculus = CalculusFactory::createFromNSCells<2>( surfels.cbegin(), surfels.cend() );
1420 at_solver.
setUp( alpha_at, lambda_at );
1422 auto output = input;
1458 template <
typename TAnyDigitalSurface,
1459 typename VectorFieldInput,
1460 typename CellRangeConstIterator>
1464 CellRangeConstIterator itB,
1465 CellRangeConstIterator itE,
1468 const VectorFieldInput& input,
1474 int verbose = params[
"verbose" ].as<
int>();
1477 Scalar epsilon1 = params[
"at-epsilon-start" ].as<
Scalar>();
1479 Scalar epsilonr = params[
"at-epsilon-ratio" ].as<
Scalar>();
1480 int max_iter = params[
"at-max-iter" ].as<
int>();
1481 Scalar diff_v_max= params[
"at-diff-v-max" ].as<
Scalar>();
1482 std::string policy = params[
"at-v-policy" ].as<std::string>();
1484 const auto calculus = CalculusFactory::createFromNSCells<2>( surfels.cbegin(), surfels.cend() );
1487 at_solver.
setUp( alpha_at, lambda_at );
1489 auto output = input;
1491 auto p = ( policy ==
"Average" ) ? at_solver.
Average
1492 : ( policy ==
"Minimum" ) ? at_solver.
Minimum
1522 template <
typename TAnyDigitalSurface>
1533 int verbose = params[
"verbose" ].as<
int>();
1536 Scalar epsilon1 = params[
"at-epsilon-start" ].as<
Scalar>();
1538 Scalar epsilonr = params[
"at-epsilon-ratio" ].as<
Scalar>();
1539 int max_iter = params[
"at-max-iter" ].as<
int>();
1540 Scalar diff_v_max= params[
"at-diff-v-max" ].as<
Scalar>();
1542 const auto calculus = CalculusFactory::createFromNSCells<2>( surfels.cbegin(), surfels.cend() );
1545 at_solver.
setUp( alpha_at, lambda_at );
1547 auto output = input;
1587 template <
typename TAnyDigitalSurface,
1588 typename CellRangeConstIterator>
1592 CellRangeConstIterator itB,
1593 CellRangeConstIterator itE,
1602 int verbose = params[
"verbose" ].as<
int>();
1605 Scalar epsilon1 = params[
"at-epsilon-start" ].as<
Scalar>();
1607 Scalar epsilonr = params[
"at-epsilon-ratio" ].as<
Scalar>();
1608 int max_iter = params[
"at-max-iter" ].as<
int>();
1609 Scalar diff_v_max= params[
"at-diff-v-max" ].as<
Scalar>();
1610 std::string policy = params[
"at-v-policy" ].as<std::string>();
1612 const auto calculus = CalculusFactory::createFromNSCells<2>( surfels.cbegin(), surfels.cend() );
1615 at_solver.
setUp( alpha_at, lambda_at );
1617 auto output = input;
1619 auto p = ( policy ==
"Average" ) ? at_solver.
Average
1620 : ( policy ==
"Minimum" ) ? at_solver.
Minimum
1644 std::transform( ref_v.cbegin(), ref_v.cend(), v.cbegin(), v.begin(),
1646 { return rw.dot( w ) >= 0.0 ? w : -w; } );
1673 if ( v1.size() == v2.size() )
1675 auto outIt = v.begin();
1676 for (
auto it1 = v1.cbegin(), it2 = v2.cbegin(), itE1 = v1.cend();
1677 it1 != itE1; ++it1, ++it2 )
1679 Scalar angle_error = acos( (*it1).dot( *it2 ) );
1680 *outIt++ = angle_error;
1685 trace.
warning() <<
"[ShortcutsGeometry::getVectorsAngleDeviation]"
1686 <<
" v1.size()=" << v1.size() <<
" should be equal to "
1687 <<
" v2.size()=" << v2.size() << std::endl;
1701 std::transform( v2.cbegin(), v2.cend(), v1.cbegin(), result.begin(),
1703 { return fabs( val1 - val2 ); } );
1718 for (
unsigned int i = 0; i < v1.size(); i++ )
1719 sum += ( v1[ i ] - v2[ i ] ) * ( v1[ i ] - v2[ i ] );
1720 return sqrt( sum / v1.size() );
1734 for (
unsigned int i = 0; i < v1.size(); i++ )
1735 sum += fabs( v1[ i ] - v2[ i ] );
1736 return sum / v1.size();
1750 for (
unsigned int i = 0; i < v1.size(); i++ )
1751 loo =
std::max( loo, fabs( v1[ i ] - v2[ i ] ) );
1829 #undef ShortcutsGeometry_RECURSES
Aim: This class solves Ambrosio-Tortorelli functional on a two-dimensional digital space (a 2D grid o...
void getOutputScalarFieldU2(ScalarFieldOutput &output, SurfelRangeConstIterator itB, SurfelRangeConstIterator itE)
void getOutputScalarFieldV0(ScalarFieldOutput &output, CellRangeConstIterator itB, CellRangeConstIterator itE, CellOutputPolicy policy=CellOutputPolicy::Average)
void initInputScalarFieldU2(const ScalarFieldInput &input, SurfelRangeConstIterator itB, SurfelRangeConstIterator itE)
void setUp(double a, double l)
void initInputVectorFieldU2(const VectorFieldInput &input, SurfelRangeConstIterator itB, SurfelRangeConstIterator itE, bool normalize=false)
bool solveGammaConvergence(double eps1=2.0, double eps2=0.25, double epsr=2.0, bool compute_smallest_epsilon_map=false, double n_oo_max=1e-4, unsigned int iter_max=10)
void getOutputVectorFieldU2(VectorFieldOutput &output, SurfelRangeConstIterator itB, SurfelRangeConstIterator itE)
@ Maximum
compute maximum value at cell vertices
@ Average
compute average values at cell vertices
@ Minimum
compute minimum value at cell vertices,
Aim: Smart pointer based on reference counts.
DigitalSurfaceContainer::Surfel Surfel
DigitalSurfaceContainer::Cell Cell
Surfel Vertex
Defines the type for a vertex.
std::vector< Arc > ArcRange
The range of arcs is defined as a vector.
DigitalSurfaceContainer::SCell SCell
Aim: This class provides static members to create DEC structures from various other DGtal structures.
Aim: implements separable l_p metrics with exact predicates.
Aim: A class for computing the Gauss digitization of some Euclidean shape, i.e. its intersection with...
Aim: model of CEuclideanOrientedShape concepts to create a shape from a polynomial.
Aim: Represents a digital surface with the topology of its dual surface. Its aim is to mimick the sta...
std::vector< Arc > ArcRange
HalfEdgeDataStructure::HalfEdgeIndex Arc
Aim: This class implement an Integral Invariant estimator which computes for each surfel the covarian...
Aim: This class implement an Integral Invariant estimator which computes for each surfel the volume o...
std::set< SCell > SurfelSet
Preferred type for defining a set of surfels (always signed cells).
Aim: A model of CDigitalSurfaceContainer which defines the digital surface as the boundary of an impl...
Aim: this class adapts any local functor on digital surface element to define a local estimator....
Aim: implements l_p metrics.
Aim: Represents a multivariate polynomial, i.e. an element of , where K is some ring or field.
TEuclideanRing Component
Type for Vector elements.
static Self zero
Static const for zero PointVector.
Aim: A model of CDigitalSurfaceContainer which defines the digital surface as connected surfels....
Aim: This class is used to simplify shape and surface creation. With it, you can create new shapes an...
LightDigitalSurface::Vertex Vertex
BOOST_CONCEPT_ASSERT((concepts::CCellularGridSpaceND< TKSpace >))
static Scalars getIIGaussianCurvatures(CountedPtr< BinaryImage > bimage, const SurfelRange &surfels, const Parameters ¶ms=parametersGeometryEstimation()|parametersKSpace())
TKSpace KSpace
Digital cellular space.
static RealVectors getIINormalVectors(CountedPtr< DigitizedImplicitShape3D > dshape, const SurfelRange &surfels, const Parameters ¶ms=parametersGeometryEstimation()|parametersKSpace()|parametersDigitizedImplicitShape3D())
static Scalar getScalarsNormL1(const Scalars &v1, const Scalars &v2)
static RealVectors getTrivialNormalVectors(const KSpace &K, const SurfelRange &surfels)
LightImplicitDigitalSurface< KSpace, BinaryImage > LightSurfaceContainer
MPolynomial< Space::dimension, Scalar > ScalarPolynomial
defines a multi-variate polynomial : RealPoint -> Scalar
static Scalars getIIMeanCurvatures(CountedPtr< DigitizedImplicitShape3D > dshape, const SurfelRange &surfels, const Parameters ¶ms=parametersGeometryEstimation()|parametersKSpace()|parametersDigitizedImplicitShape3D())
std::vector< IdxSurfel > IdxSurfelRange
Space::Point Point
Point with integer coordinates.
static RealPoints getPositions(CountedPtr< ImplicitShape3D > shape, const RealPoints &points, const Parameters ¶ms=parametersShapeGeometry())
RealVector::Component Scalar
Floating-point numbers.
::DGtal::Statistic< Scalar > ScalarStatistic
ShortcutsGeometry(const ShortcutsGeometry &other)=delete
static Scalars getATScalarFieldApproximation(Scalars &features, CellRangeConstIterator itB, CellRangeConstIterator itE, CountedPtr< TAnyDigitalSurface > surface, const SurfelRange &surfels, const Scalars &input, const Parameters ¶ms=parametersATApproximation()|parametersGeometryEstimation())
Space::Integer Integer
Integer numbers.
static Parameters parametersGeometryEstimation()
static Scalars getMeanCurvatures(CountedPtr< ImplicitShape3D > shape, const KSpace &K, const SurfelRange &surfels, const Parameters ¶ms=parametersShapeGeometry())
static RealPoints getPositions(CountedPtr< ImplicitShape3D > shape, const KSpace &K, const SurfelRange &surfels, const Parameters ¶ms=parametersShapeGeometry())
std::map< Cell, IdxVertex > Cell2Index
static Parameters parametersKSpace()
functors::IIPrincipalCurvaturesAndDirectionsFunctor< Space >::Quantity CurvatureTensorQuantity
TrueDigitalSurfaceLocalEstimator< KSpace, ImplicitShape3D, GaussianCurvatureFunctor > TrueGaussianCurvatureEstimator
static CurvatureTensorQuantities getIIPrincipalCurvaturesAndDirections(const TPointPredicate &shape, const KSpace &K, const SurfelRange &surfels, const Parameters ¶ms=parametersGeometryEstimation()|parametersKSpace())
static KSpace getKSpace(const Point &low, const Point &up, Parameters params=parametersKSpace())
LightDigitalSurface::SCell SCell
LightDigitalSurface::ArcRange ArcRange
sgf::ShapeGaussianCurvatureFunctor< ImplicitShape3D > GaussianCurvatureFunctor
static Parameters parametersShapeGeometry()
KSpace::SurfelSet SurfelSet
defines a set of surfels
static CurvatureTensorQuantities getIIPrincipalCurvaturesAndDirections(CountedPtr< DigitizedImplicitShape3D > dshape, const SurfelRange &surfels, const Parameters ¶ms=parametersGeometryEstimation()|parametersKSpace()|parametersDigitizedImplicitShape3D())
ShortcutsGeometry()=delete
sgf::ShapeSecondPrincipalDirectionFunctor< ImplicitShape3D > SecondPrincipalDirectionFunctor
static CurvatureTensorQuantities getIIPrincipalCurvaturesAndDirections(CountedPtr< BinaryImage > bimage, const SurfelRange &surfels, const Parameters ¶ms=parametersGeometryEstimation()|parametersKSpace())
static Scalars getIIGaussianCurvatures(CountedPtr< DigitizedImplicitShape3D > dshape, const SurfelRange &surfels, const Parameters ¶ms=parametersGeometryEstimation()|parametersKSpace()|parametersDigitizedImplicitShape3D())
sgf::ShapePositionFunctor< ImplicitShape3D > PositionFunctor
sgf::ShapeMeanCurvatureFunctor< ImplicitShape3D > MeanCurvatureFunctor
sgf::ShapeSecondPrincipalCurvatureFunctor< ImplicitShape3D > SecondPrincipalCurvatureFunctor
static void orientVectors(RealVectors &v, const RealVectors &ref_v)
Shortcuts< TKSpace > Base
unsigned char GrayScale
The type for 8-bits gray-scale elements.
static RealVectors getIINormalVectors(CountedPtr< BinaryImage > bimage, const SurfelRange &surfels, const Parameters ¶ms=parametersGeometryEstimation()|parametersKSpace())
static Parameters parametersATApproximation()
ShortcutsGeometry(ShortcutsGeometry &&other)=delete
static Scalars getScalarsAbsoluteDifference(const Scalars &v1, const Scalars &v2)
std::vector< CurvatureTensorQuantity > CurvatureTensorQuantities
IdxDigitalSurface::Vertex IdxVertex
TrueDigitalSurfaceLocalEstimator< KSpace, ImplicitShape3D, PositionFunctor > TruePositionEstimator
static RealVectors getNormalVectors(CountedPtr< ImplicitShape3D > shape, const KSpace &K, const SurfelRange &surfels, const Parameters ¶ms=parametersShapeGeometry())
::DGtal::Mesh< RealPoint > Mesh
::DGtal::TriangulatedSurface< RealPoint > TriangulatedSurface
TrueDigitalSurfaceLocalEstimator< KSpace, ImplicitShape3D, SecondPrincipalDirectionFunctor > TrueSecondPrincipalDirectionEstimator
TrueDigitalSurfaceLocalEstimator< KSpace, ImplicitShape3D, NormalFunctor > TrueNormalEstimator
LightDigitalSurface::Arc Arc
static RealVectors getFirstPrincipalDirections(CountedPtr< ImplicitShape3D > shape, const KSpace &K, const SurfelRange &surfels, const Parameters ¶ms=parametersShapeGeometry())
ImageContainerBySTLVector< Domain, GrayScale > GrayScaleImage
defines a grey-level image with (hyper-)rectangular domain.
std::vector< Scalar > Scalars
::DGtal::PolygonalSurface< RealPoint > PolygonalSurface
static Scalars getIIMeanCurvatures(const TPointPredicate &shape, const KSpace &K, const SurfelRange &surfels, const Parameters ¶ms=parametersGeometryEstimation()|parametersKSpace())
static RealVectors getSecondPrincipalDirections(CountedPtr< ImplicitShape3D > shape, const KSpace &K, const SurfelRange &surfels, const Parameters ¶ms=parametersShapeGeometry())
ImplicitPolynomial3Shape< Space > ImplicitShape3D
::DGtal::DigitalSurface< ExplicitSurfaceContainer > DigitalSurface
defines an arbitrary digital surface over a binary image.
GaussDigitizer< Space, ImplicitShape3D > DigitizedImplicitShape3D
defines the digitization of an implicit shape.
KSpace::Space Space
Digital space.
std::vector< Cell > CellRange
IdxDigitalSurface::Arc IdxArc
ImageContainerBySTLVector< Domain, float > FloatImage
defines a float image with (hyper-)rectangular domain.
SetOfSurfels< KSpace, SurfelSet > ExplicitSurfaceContainer
defines a heavy container that represents any digital surface.
static RealVectors getCTrivialNormalVectors(CountedPtr< TAnyDigitalSurface > surface, const SurfelRange &surfels, const Parameters ¶ms=parametersGeometryEstimation())
LightDigitalSurface::Face Face
~ShortcutsGeometry()=delete
static Scalars getIIMeanCurvatures(CountedPtr< BinaryImage > bimage, const SurfelRange &surfels, const Parameters ¶ms=parametersGeometryEstimation()|parametersKSpace())
ImageContainerBySTLVector< Domain, double > DoubleImage
defines a double image with (hyper-)rectangular domain.
std::set< IdxSurfel > IdxSurfelSet
TrueDigitalSurfaceLocalEstimator< KSpace, ImplicitShape3D, SecondPrincipalCurvatureFunctor > TrueSecondPrincipalCurvatureEstimator
Space::RealVector RealVector
Vector with floating-point coordinates.
TrueDigitalSurfaceLocalEstimator< KSpace, ImplicitShape3D, FirstPrincipalCurvatureFunctor > TrueFirstPrincipalCurvatureEstimator
ShortcutsGeometry< TKSpace > Self
static CurvatureTensorQuantities getPrincipalCurvaturesAndDirections(CountedPtr< ImplicitShape3D > shape, const KSpace &K, const SurfelRange &surfels, const Parameters ¶ms=parametersShapeGeometry())
static Parameters defaultParameters()
::DGtal::DigitalSurface< LightSurfaceContainer > LightDigitalSurface
defines a connected digital surface over a binary image.
static Scalars getGaussianCurvatures(CountedPtr< ImplicitShape3D > shape, const KSpace &K, const SurfelRange &surfels, const Parameters ¶ms=parametersShapeGeometry())
TrueDigitalSurfaceLocalEstimator< KSpace, ImplicitShape3D, PrincipalCurvaturesAndDirectionsFunctor > TruePrincipalCurvaturesAndDirectionsEstimator
std::vector< Surfel > SurfelRange
static RealVectors getIINormalVectors(const TPointPredicate &shape, const KSpace &K, const SurfelRange &surfels, const Parameters ¶ms=parametersGeometryEstimation()|parametersKSpace())
static Scalars getVectorsAngleDeviation(const RealVectors &v1, const RealVectors &v2)
static Scalar getScalarsNormL2(const Scalars &v1, const Scalars &v2)
Space::RealPoint RealPoint
Point with floating-point coordinates.
IndexedDigitalSurface< ExplicitSurfaceContainer > IdxDigitalSurface
defines a connected or not indexed digital surface.
TrueDigitalSurfaceLocalEstimator< KSpace, ImplicitShape3D, MeanCurvatureFunctor > TrueMeanCurvatureEstimator
static Scalars getFirstPrincipalCurvatures(CountedPtr< ImplicitShape3D > shape, const KSpace &K, const SurfelRange &surfels, const Parameters ¶ms=parametersShapeGeometry())
sgf::ShapeNormalVectorFunctor< ImplicitShape3D > NormalFunctor
sgf::ShapeFirstPrincipalDirectionFunctor< ImplicitShape3D > FirstPrincipalDirectionFunctor
IdxDigitalSurface::Vertex IdxSurfel
static Scalar getScalarsNormLoo(const Scalars &v1, const Scalars &v2)
static Parameters parametersDigitizedImplicitShape3D()
static ScalarStatistic getStatistic(const Scalars &v)
static Scalars getATScalarFieldApproximation(CountedPtr< TAnyDigitalSurface > surface, const SurfelRange &surfels, const Scalars &input, const Parameters ¶ms=parametersATApproximation()|parametersGeometryEstimation())
LightDigitalSurface::Cell Cell
ShortcutsGeometry & operator=(const ShortcutsGeometry &other)=delete
LightDigitalSurface::Surfel Surfel
sgf::ShapeFirstPrincipalCurvatureFunctor< ImplicitShape3D > FirstPrincipalCurvatureFunctor
HyperRectDomain< Space > Domain
An (hyper-)rectangular domain.
Space::Vector Vector
Vector with integer coordinates.
static Scalars getIIGaussianCurvatures(const TPointPredicate &shape, const KSpace &K, const SurfelRange &surfels, const Parameters ¶ms=parametersGeometryEstimation()|parametersKSpace())
std::vector< RealPoint > RealPoints
TrueDigitalSurfaceLocalEstimator< KSpace, ImplicitShape3D, FirstPrincipalDirectionFunctor > TrueFirstPrincipalDirectionEstimator
sgf::ShapePrincipalCurvaturesAndDirectionsFunctor< ImplicitShape3D > PrincipalCurvaturesAndDirectionsFunctor
static VectorFieldInput getATVectorFieldApproximation(CountedPtr< TAnyDigitalSurface > surface, const SurfelRange &surfels, const VectorFieldInput &input, const Parameters ¶ms=parametersATApproximation()|parametersGeometryEstimation())
static Scalars getSecondPrincipalCurvatures(CountedPtr< ImplicitShape3D > shape, const KSpace &K, const SurfelRange &surfels, const Parameters ¶ms=parametersShapeGeometry())
static VectorFieldInput getATVectorFieldApproximation(Scalars &features, CellRangeConstIterator itB, CellRangeConstIterator itE, CountedPtr< TAnyDigitalSurface > surface, const SurfelRange &surfels, const VectorFieldInput &input, const Parameters ¶ms=parametersATApproximation()|parametersGeometryEstimation())
std::vector< RealVector > RealVectors
static RealVectors getVCMNormalVectors(CountedPtr< TAnyDigitalSurface > surface, const SurfelRange &surfels, const Parameters ¶ms=parametersGeometryEstimation())
std::map< Surfel, IdxSurfel > Surfel2Index
IdxDigitalSurface::ArcRange IdxArcRange
ImageContainerBySTLVector< Domain, bool > BinaryImage
defines a black and white image with (hyper-)rectangular domain.
Aim: This class is used to simplify shape and surface creation. With it, you can create new shapes an...
static Parameters parametersKSpace()
static KSpace getKSpace(const Point &low, const Point &up, Parameters params=parametersKSpace())
RealVector::Component Scalar
Floating-point numbers.
std::vector< RealPoint > RealPoints
std::vector< RealVector > RealVectors
std::vector< Scalar > Scalars
static Parameters parametersDigitizedImplicitShape3D()
TKSpace KSpace
Digital cellular space.
TInteger Integer
Arithmetic ring induced by (+,-,*) and Integer numbers.
Aim: This class processes a set of sample values for one variable and can then compute different stat...
void addValues(Iter b, Iter e)
Aim: An estimator on digital surfaces that returns the reference local geometric quantity....
void init(const Scalar _h, SurfelConstIterator itb, SurfelConstIterator ite)
Quantity eval(SurfelConstIterator it) const
void setParams(ConstAlias< KSpace > ks, Clone< GeometricFunctor > fct, const int maxIter=20, const Scalar accuracy=0.0001, const Scalar gamma=0.5)
void attach(ConstAlias< Shape > aShape)
Aim: This class adapts a VoronoiCovarianceMeasureOnDigitalSurface to be a model of CDigitalSurfaceLoc...
Aim: This class specializes the Voronoi covariance measure for digital surfaces. It adds notably the ...
Aim: Estimates normal vector by convolution of elementary normal vector to adjacent surfel.
Aim: A functor Matrix -> RealVector that returns the normal direction by diagonalizing the given cova...
Aim: A functor Matrix -> std::pair<RealVector,RealVector> that returns the first and the second princ...
std::tuple< double, double, RealVector, RealVector > Quantity
CountedPtr< SH3::DigitalSurface > surface
DGtal is the top-level namespace which contains all DGtal functions and types.
DGtal::uint32_t Dimension
Surfel2PointEmbedding
Possible embeddings for surfel as point(s)
Aim: This concept describes a cellular grid space in nD. In these spaces obtained by cartesian produc...
Aim: A functor Matrix -> Real that returns the Gaussian curvature by diagonalizing the given covarian...
Aim: A functor Real -> Real that returns the 3d mean curvature by transforming the given volume....
Aim: A functor RealPoint -> Quantity that returns the first principal curvature at given point (i....
Aim: A functor RealPoint -> RealVector that returns the first principal direction at given point (i....
Aim: A functor RealPoint -> Quantity that returns the gaussian curvature at given point.
Aim: A functor RealPoint -> Quantity that returns the mean curvature at given point.
Aim: A functor RealPoint -> Quantity that returns the normal vector at given point.
Aim: A functor RealPoint -> Quantity that returns the position of the point itself.
Aim: A functor RealPoint -> (Scalar,Scalar,RealVector,RealVector that returns the principal curvature...
Aim: A functor RealPoint -> Quantity that returns the second principal curvature at given point (i....
Aim: A functor RealPoint -> RealVector that returns the second principal direction at given point (i....
Aim: A functor Surfel -> Quantity that returns the outer normal vector at given surfel.
InHalfPlaneBySimple3x3Matrix< Point, double > Functor