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#if defined(WITH_EIGEN)
53#include "DGtal/dec/DiscreteExteriorCalculusFactory.h"
54#include "DGtal/dec/ATSolver2D.h"
61 namespace sgf = ::DGtal::functors::ShapeGeometricFunctors;
75 template <
typename TKSpace >
194 typedef ::DGtal::Mesh<RealPoint>
Mesh;
225 (
"projectionMaxIter", 20 )
226 (
"projectionAccuracy", 0.0001 )
227 (
"projectionGamma", 0.5 )
258 int maxIter = params[
"projectionMaxIter" ].as<
int>();
259 double accuracy = params[
"projectionAccuracy" ].as<
double>();
260 double gamma = params[
"projectionGamma" ].as<
double>();
262 true_estimator.
attach( *shape );
264 true_estimator.
init( gridstep, surfels.begin(), surfels.end() );
265 true_estimator.
eval( surfels.begin(), surfels.end(),
266 std::back_inserter( n_true_estimations ) );
267 return n_true_estimations;
290 int maxIter = params[
"projectionMaxIter" ].as<
int>();
291 double accuracy = params[
"projectionAccuracy" ].as<
double>();
292 double gamma = params[
"projectionGamma" ].as<
double>();
293 for (
unsigned int i = 0; i < points.size(); ++i )
294 proj_points[ i ] = shape->nearestPoint( points[ i ], accuracy,
326 int maxIter = params[
"projectionMaxIter" ].as<
int>();
327 double accuracy = params[
"projectionAccuracy" ].as<
double>();
328 double gamma = params[
"projectionGamma" ].as<
double>();
330 true_estimator.
attach( *shape );
332 true_estimator.
init( gridstep, surfels.begin(), surfels.end() );
333 true_estimator.
eval( surfels.begin(), surfels.end(),
334 std::back_inserter( n_true_estimations ) );
335 return n_true_estimations;
365 int maxIter = params[
"projectionMaxIter" ].as<
int>();
366 double accuracy = params[
"projectionAccuracy" ].as<
double>();
367 double gamma = params[
"projectionGamma" ].as<
double>();
369 true_estimator.
attach( *shape );
371 true_estimator.
init( gridstep, surfels.begin(), surfels.end() );
372 true_estimator.
eval( surfels.begin(), surfels.end(),
373 std::back_inserter( n_true_estimations ) );
374 return n_true_estimations;
405 int maxIter = params[
"projectionMaxIter" ].as<
int>();
406 double accuracy = params[
"projectionAccuracy" ].as<
double>();
407 double gamma = params[
"projectionGamma" ].as<
double>();
409 true_estimator.
attach( *shape );
411 true_estimator.
init( gridstep, surfels.begin(), surfels.end() );
412 true_estimator.
eval( surfels.begin(), surfels.end(),
413 std::back_inserter( n_true_estimations ) );
414 return n_true_estimations;
446 int maxIter = params[
"projectionMaxIter" ].as<
int>();
447 double accuracy = params[
"projectionAccuracy" ].as<
double>();
448 double gamma = params[
"projectionGamma" ].as<
double>();
450 true_estimator.
attach( *shape );
452 maxIter, accuracy, gamma );
453 true_estimator.
init( gridstep, surfels.begin(), surfels.end() );
454 true_estimator.
eval( surfels.begin(), surfels.end(),
455 std::back_inserter( n_true_estimations ) );
456 return n_true_estimations;
488 int maxIter = params[
"projectionMaxIter" ].as<
int>();
489 double accuracy = params[
"projectionAccuracy" ].as<
double>();
490 double gamma = params[
"projectionGamma" ].as<
double>();
492 true_estimator.
attach( *shape );
494 maxIter, accuracy, gamma );
495 true_estimator.
init( gridstep, surfels.begin(), surfels.end() );
496 true_estimator.
eval( surfels.begin(), surfels.end(),
497 std::back_inserter( n_true_estimations ) );
498 return n_true_estimations;
530 int maxIter = params[
"projectionMaxIter" ].as<
int>();
531 double accuracy = params[
"projectionAccuracy" ].as<
double>();
532 double gamma = params[
"projectionGamma" ].as<
double>();
534 true_estimator.
attach( *shape );
536 maxIter, accuracy, gamma );
537 true_estimator.
init( gridstep, surfels.begin(), surfels.end() );
538 true_estimator.
eval( surfels.begin(), surfels.end(),
539 std::back_inserter( n_true_estimations ) );
540 return n_true_estimations;
572 int maxIter = params[
"projectionMaxIter" ].as<
int>();
573 double accuracy = params[
"projectionAccuracy" ].as<
double>();
574 double gamma = params[
"projectionGamma" ].as<
double>();
576 true_estimator.
attach( *shape );
578 maxIter, accuracy, gamma );
579 true_estimator.
init( gridstep, surfels.begin(), surfels.end() );
580 true_estimator.
eval( surfels.begin(), surfels.end(),
581 std::back_inserter( n_true_estimations ) );
582 return n_true_estimations;
615 int maxIter = params[
"projectionMaxIter" ].as<
int>();
616 double accuracy = params[
"projectionAccuracy" ].as<
double>();
617 double gamma = params[
"projectionGamma" ].as<
double>();
619 true_estimator.
attach( *shape );
621 maxIter, accuracy, gamma );
622 true_estimator.
init( gridstep, surfels.begin(), surfels.end() );
623 true_estimator.
eval( surfels.begin(), surfels.end(),
624 std::back_inserter( n_true_estimations ) );
625 return n_true_estimations;
653 (
"surfelEmbedding", 0 );
669 std::vector< RealVector > result;
670 for (
auto s : surfels )
673 bool direct =
K.sDirect( s, k );
675 t[ k ] = direct ? -1.0 : 1.0;
676 result.push_back( t );
696 template <
typename TAnyDigitalSurface>
703 int verbose = params[
"verbose" ].as<
int>();
704 Scalar t = params[
"t-ring" ].as<
double>();
705 typedef typename TAnyDigitalSurface::DigitalSurfaceContainer SurfaceContainer;
711 < SurfaceContainer, Metric, SurfelFunctor,
Functor> NormalEstimator;
713 trace.
info() <<
"- CTrivial normal t-ring=" << t <<
" (discrete)" << std::endl;
715 const KSpace &
K = surface->container().space();
716 Metric aMetric( 2.0 );
718 std::vector< RealVector > n_estimations;
719 SurfelFunctor surfelFct( canonic_embedder, 1.0 );
720 NormalEstimator estimator;
721 estimator.attach( *surface);
722 estimator.setParams( aMetric, surfelFct, fct, t );
723 estimator.init( 1.0, surfels.begin(), surfels.end());
724 estimator.eval( surfels.begin(), surfels.end(),
725 std::back_inserter( n_estimations ) );
726 std::transform( n_estimations.cbegin(), n_estimations.cend(), n_estimations.begin(),
728 return n_estimations;
752 template <
typename TAnyDigitalSurface>
760 typedef typename TAnyDigitalSurface::DigitalSurfaceContainer SurfaceContainer;
762 int verbose = params[
"verbose" ].as<
int>();
763 std::string kernel = params[
"kernel" ].as<std::string>();
769 int embedding = params[
"embedding" ].as<
int>();
771 if ( alpha != 1.0 )
R *= pow( h, alpha-1.0 );
772 if ( alpha != 1.0 ) r *= pow( h, alpha-1.0 );
777 trace.
info() <<
"- VCM normal kernel=" << kernel <<
" emb=" << embedding
778 <<
" alpha=" << alpha << std::endl;
779 trace.
info() <<
"- VCM normal r=" << (r*h) <<
" (continuous) "
780 << r <<
" (discrete)" << std::endl;
781 trace.
info() <<
"- VCM normal R=" << (
R*h) <<
" (continuous) "
782 <<
R <<
" (discrete)" << std::endl;
783 trace.
info() <<
"- VCM normal t=" << t <<
" (discrete)" << std::endl;
785 if ( kernel ==
"hat" )
789 < SurfaceContainer, Metric, KernelFunction > VCMOnSurface;
792 < SurfaceContainer, Metric, KernelFunction, NormalVFunctor> VCMNormalEstimator;
793 KernelFunction chi_r( 1.0, r );
794 VCMNormalEstimator estimator;
795 estimator.attach( *surface );
796 estimator.setParams( embType,
R, r, chi_r, t, Metric(), verbose > 0 );
797 estimator.init( h, surfels.begin(), surfels.end() );
798 estimator.eval( surfels.begin(), surfels.end(),
799 std::back_inserter( n_estimations ) );
801 else if ( kernel ==
"ball" )
805 < SurfaceContainer, Metric, KernelFunction > VCMOnSurface;
808 < SurfaceContainer, Metric, KernelFunction, NormalVFunctor> VCMNormalEstimator;
809 KernelFunction chi_r( 1.0, r );
810 VCMNormalEstimator estimator;
811 estimator.attach( *surface );
812 estimator.setParams( embType,
R, r, chi_r, t, Metric(), verbose > 0 );
813 estimator.init( h, surfels.begin(), surfels.end() );
814 estimator.eval( surfels.begin(), surfels.end(),
815 std::back_inserter( n_estimations ) );
819 trace.
warning() <<
"[ShortcutsGeometry::getVCMNormalVectors] Unknown kernel: "
820 << kernel << std::endl;
822 return n_estimations;
923 template <
typename TPo
intPredicate>
934 <
KSpace, TPointPredicate, IINormalFunctor> IINormalEstimator;
937 int verbose = params[
"verbose" ].as<
int>();
941 if ( alpha != 1.0 ) r *= pow( h, alpha-1.0 );
944 trace.
info() <<
"- II normal alpha=" << alpha << std::endl;
945 trace.
info() <<
"- II normal r=" << (r*h) <<
" (continuous) "
946 << r <<
" (discrete)" << std::endl;
948 IINormalFunctor functor;
949 functor.init( h, r*h );
950 IINormalEstimator ii_estimator( functor );
951 ii_estimator.attach(
K, shape );
952 ii_estimator.setParams( r );
953 ii_estimator.init( h, surfels.begin(), surfels.end() );
954 ii_estimator.eval( surfels.begin(), surfels.end(),
955 std::back_inserter( n_estimations ) );
958 return n_estimations;
1050 template <
typename TPo
intPredicate>
1061 <
KSpace, TPointPredicate, IIMeanCurvFunctor> IIMeanCurvEstimator;
1064 int verbose = params[
"verbose" ].as<
int>();
1068 if ( alpha != 1.0 ) r *= pow( h, alpha-1.0 );
1071 trace.
info() <<
"- II mean curvature alpha=" << alpha << std::endl;
1072 trace.
info() <<
"- II mean curvature r=" << (r*h) <<
" (continuous) "
1073 << r <<
" (discrete)" << std::endl;
1075 IIMeanCurvFunctor functor;
1076 functor.init( h, r*h );
1077 IIMeanCurvEstimator ii_estimator( functor );
1078 ii_estimator.attach(
K, shape );
1079 ii_estimator.setParams( r );
1080 ii_estimator.init( h, surfels.begin(), surfels.end() );
1081 ii_estimator.eval( surfels.begin(), surfels.end(),
1082 std::back_inserter( mc_estimations ) );
1083 return mc_estimations;
1174 template <
typename TPo
intPredicate>
1185 <
KSpace, TPointPredicate, IIGaussianCurvFunctor> IIGaussianCurvEstimator;
1188 int verbose = params[
"verbose" ].as<
int>();
1192 if ( alpha != 1.0 ) r *= pow( h, alpha-1.0 );
1195 trace.
info() <<
"- II Gaussian curvature alpha=" << alpha << std::endl;
1196 trace.
info() <<
"- II Gaussian curvature r=" << (r*h) <<
" (continuous) "
1197 << r <<
" (discrete)" << std::endl;
1199 IIGaussianCurvFunctor functor;
1200 functor.init( h, r*h );
1201 IIGaussianCurvEstimator ii_estimator( functor );
1202 ii_estimator.attach(
K, shape );
1203 ii_estimator.setParams( r );
1204 ii_estimator.init( h, surfels.begin(), surfels.end() );
1205 ii_estimator.eval( surfels.begin(), surfels.end(),
1206 std::back_inserter( mc_estimations ) );
1207 return mc_estimations;
1300 template <
typename TPo
intPredicate>
1313 int verbose = params[
"verbose" ].as<
int>();
1317 if ( alpha != 1.0 ) r *= pow( h, alpha-1.0 );
1320 trace.
info() <<
"- II principal curvatures and directions alpha=" << alpha << std::endl;
1321 trace.
info() <<
"- II principal curvatures and directions r=" << (r*h) <<
" (continuous) "
1322 << r <<
" (discrete)" << std::endl;
1324 IICurvFunctor functor;
1325 functor.init( h, r*h );
1326 IICurvEstimator ii_estimator( functor );
1327 ii_estimator.attach(
K, shape );
1328 ii_estimator.setParams( r );
1329 ii_estimator.init( h, surfels.begin(), surfels.end() );
1330 ii_estimator.eval( surfels.begin(), surfels.end(),
1331 std::back_inserter( mc_estimations ) );
1332 return mc_estimations;
1357#if defined(WITH_EIGEN)
1361 (
"at-lambda", 0.025 )
1362 (
"at-epsilon", 0.25 )
1363 (
"at-epsilon-start", 2.0 )
1364 (
"at-epsilon-ratio", 2.0 )
1365 (
"at-max-iter", 10 )
1366 (
"at-diff-v-max", 0.0001 )
1367 (
"at-v-policy",
"Maximum" );
1373#if defined(WITH_EIGEN)
1398 template <
typename TAnyDigitalSurface,
1399 typename VectorFieldInput>
1404 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,
1472 int verbose = params[
"verbose" ].as<
int>();
1475 Scalar epsilon1 = params[
"at-epsilon-start" ].as<
Scalar>();
1477 Scalar epsilonr = params[
"at-epsilon-ratio" ].as<
Scalar>();
1478 int max_iter = params[
"at-max-iter" ].as<
int>();
1479 Scalar diff_v_max= params[
"at-diff-v-max" ].as<
Scalar>();
1480 std::string policy = params[
"at-v-policy" ].as<std::string>();
1482 const auto calculus = CalculusFactory::createFromNSCells<2>( surfels.cbegin(), surfels.cend() );
1485 at_solver.
setUp( alpha_at, lambda_at );
1487 auto output = input;
1489 auto p = ( policy ==
"Average" ) ? at_solver.
Average
1490 : ( policy ==
"Minimum" ) ? at_solver.
Minimum
1520 template <
typename TAnyDigitalSurface>
1529 int verbose = params[
"verbose" ].as<
int>();
1532 Scalar epsilon1 = params[
"at-epsilon-start" ].as<
Scalar>();
1534 Scalar epsilonr = params[
"at-epsilon-ratio" ].as<
Scalar>();
1535 int max_iter = params[
"at-max-iter" ].as<
int>();
1536 Scalar diff_v_max= params[
"at-diff-v-max" ].as<
Scalar>();
1538 const auto calculus = CalculusFactory::createFromNSCells<2>( surfels.cbegin(), surfels.cend() );
1541 at_solver.
setUp( alpha_at, lambda_at );
1543 auto output = input;
1583 template <
typename TAnyDigitalSurface,
1584 typename CellRangeConstIterator>
1588 CellRangeConstIterator itB,
1589 CellRangeConstIterator itE,
1596 int verbose = params[
"verbose" ].as<
int>();
1599 Scalar epsilon1 = params[
"at-epsilon-start" ].as<
Scalar>();
1601 Scalar epsilonr = params[
"at-epsilon-ratio" ].as<
Scalar>();
1602 int max_iter = params[
"at-max-iter" ].as<
int>();
1603 Scalar diff_v_max= params[
"at-diff-v-max" ].as<
Scalar>();
1604 std::string policy = params[
"at-v-policy" ].as<std::string>();
1606 const auto calculus = CalculusFactory::createFromNSCells<2>( surfels.cbegin(), surfels.cend() );
1609 at_solver.
setUp( alpha_at, lambda_at );
1611 auto output = input;
1613 auto p = ( policy ==
"Average" ) ? at_solver.
Average
1614 : ( policy ==
"Minimum" ) ? at_solver.
Minimum
1638 std::transform( ref_v.cbegin(), ref_v.cend(), v.cbegin(), v.begin(),
1640 { return rw.dot( w ) >= 0.0 ? w : -w; } );
1667 if ( v1.size() == v2.size() )
1669 auto outIt = v.begin();
1670 for (
auto it1 = v1.cbegin(), it2 = v2.cbegin(), itE1 = v1.cend();
1671 it1 != itE1; ++it1, ++it2 )
1673 Scalar angle_error = acos( (*it1).dot( *it2 ) );
1674 *outIt++ = angle_error;
1679 trace.
warning() <<
"[ShortcutsGeometry::getVectorsAngleDeviation]"
1680 <<
" v1.size()=" << v1.size() <<
" should be equal to "
1681 <<
" v2.size()=" << v2.size() << std::endl;
1695 std::transform( v2.cbegin(), v2.cend(), v1.cbegin(), result.begin(),
1697 { return fabs( val1 - val2 ); } );
1712 for (
unsigned int i = 0; i < v1.size(); i++ )
1713 sum += ( v1[ i ] - v2[ i ] ) * ( v1[ i ] - v2[ i ] );
1714 return sqrt( sum / v1.size() );
1728 for (
unsigned int i = 0; i < v1.size(); i++ )
1729 sum += fabs( v1[ i ] - v2[ i ] );
1730 return sum / v1.size();
1744 for (
unsigned int i = 0; i < v1.size(); i++ )
1745 loo = std::max( loo, fabs( v1[ i ] - v2[ i ] ) );
1823#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: Parallelepidec region of a digital space, model of a 'CDomain'.
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).
SpaceND< dim, Integer > Space
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())
ShortcutsGeometry & operator=(const ShortcutsGeometry &other)=delete
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
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())
static Parameters parametersDigitizedImplicitShape3D()
TInteger Integer
Arithmetic ring induced by (+,-,*) and Integer numbers.
PointVector< dim, Integer > Point
Points in DGtal::SpaceND.
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
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: A trivial embedder for signed cell, which corresponds to the canonic injection of cell centroids...
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