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/kernel/BasicPointPredicates.h"
44#include "DGtal/geometry/volumes/distance/LpMetric.h"
45#include "DGtal/geometry/volumes/distance/ExactPredicateLpSeparableMetric.h"
46#include "DGtal/geometry/volumes/distance/VoronoiMap.h"
47#include "DGtal/geometry/volumes/distance/DistanceTransformation.h"
48#include "DGtal/geometry/surfaces/estimation/TrueDigitalSurfaceLocalEstimator.h"
49#include "DGtal/geometry/surfaces/estimation/VoronoiCovarianceMeasureOnDigitalSurface.h"
50#include "DGtal/geometry/surfaces/estimation/VCMDigitalSurfaceLocalEstimator.h"
51#include "DGtal/geometry/surfaces/estimation/IIGeometricFunctors.h"
52#include "DGtal/geometry/surfaces/estimation/IntegralInvariantVolumeEstimator.h"
53#include "DGtal/geometry/surfaces/estimation/IntegralInvariantCovarianceEstimator.h"
54#include "DGtal/geometry/meshes/CorrectedNormalCurrentComputer.h"
56#include "DGtal/dec/DiscreteExteriorCalculusFactory.h"
57#include "DGtal/dec/ATSolver2D.h"
63 namespace sgf = ::DGtal::functors::ShapeGeometricFunctors;
77 template <
typename TKSpace >
98 typedef typename Space::Point
Point;
197 typedef ::DGtal::Mesh<RealPoint>
Mesh;
232 (
"projectionMaxIter", 20 )
233 (
"projectionAccuracy", 0.0001 )
234 (
"projectionGamma", 0.5 )
265 int maxIter = params[
"projectionMaxIter" ].as<
int>();
266 double accuracy = params[
"projectionAccuracy" ].as<
double>();
267 double gamma = params[
"projectionGamma" ].as<
double>();
269 true_estimator.
attach( *shape );
271 true_estimator.
init( gridstep, surfels.begin(), surfels.end() );
272 true_estimator.
eval( surfels.begin(), surfels.end(),
273 std::back_inserter( n_true_estimations ) );
274 return n_true_estimations;
297 int maxIter = params[
"projectionMaxIter" ].as<
int>();
298 double accuracy = params[
"projectionAccuracy" ].as<
double>();
299 double gamma = params[
"projectionGamma" ].as<
double>();
300 for (
unsigned int i = 0; i < points.size(); ++i )
301 proj_points[ i ] = shape->nearestPoint( points[ i ], accuracy,
333 int maxIter = params[
"projectionMaxIter" ].as<
int>();
334 double accuracy = params[
"projectionAccuracy" ].as<
double>();
335 double gamma = params[
"projectionGamma" ].as<
double>();
337 true_estimator.
attach( *shape );
339 true_estimator.
init( gridstep, surfels.begin(), surfels.end() );
340 true_estimator.
eval( surfels.begin(), surfels.end(),
341 std::back_inserter( n_true_estimations ) );
342 return n_true_estimations;
372 int maxIter = params[
"projectionMaxIter" ].as<
int>();
373 double accuracy = params[
"projectionAccuracy" ].as<
double>();
374 double gamma = params[
"projectionGamma" ].as<
double>();
376 true_estimator.
attach( *shape );
378 true_estimator.
init( gridstep, surfels.begin(), surfels.end() );
379 true_estimator.
eval( surfels.begin(), surfels.end(),
380 std::back_inserter( n_true_estimations ) );
381 return n_true_estimations;
401 const typename Base::SurfaceMesh::Faces faces,
404 bool unit_u = params[
"unit_u"].as<
int>();
405 double radius = params[
"r-radius"].as<
double>();
406 double alpha = params[
"alpha"].as<
double>();
407 double h = params[
"gridstep"].as<
double>();
408 if ( alpha != 1.0 ) radius *= pow( h, alpha-1.0 );
415 Scalars curvatures(faces.size());
416 for (
size_t i = 0; i < faces.size(); ++i)
418 const auto center = mesh->faceCentroid(faces[i]);
419 const auto area = mu0.measure(center, radius, faces[i]);
420 const auto lmu1 = mu1.measure(center, radius, faces[i]);
450 std::vector<typename Base::SurfaceMesh::Face> allFaces(mesh->nbFaces());
451 std::iota(allFaces.begin(), allFaces.end(), 0);
474 template <
typename T>
510 int maxIter = params[
"projectionMaxIter" ].as<
int>();
511 double accuracy = params[
"projectionAccuracy" ].as<
double>();
512 double gamma = params[
"projectionGamma" ].as<
double>();
514 true_estimator.
attach( *shape );
516 true_estimator.
init( gridstep, surfels.begin(), surfels.end() );
517 true_estimator.
eval( surfels.begin(), surfels.end(),
518 std::back_inserter( n_true_estimations ) );
519 return n_true_estimations;
542 const typename Base::SurfaceMesh::Faces & faces,
545 bool unit_u = params[
"unit_u"].as<
int>();
546 double radius = params[
"r-radius"].as<
double>();
547 double alpha = params[
"alpha"].as<
double>();
548 double h = params[
"gridstep"].as<
double>();
549 if ( alpha != 1.0 ) radius *= pow( h, alpha-1.0 );
556 Scalars curvatures(faces.size());
557 for (
size_t i = 0; i < faces.size(); ++i)
559 const auto center = mesh->faceCentroid(faces[i]);
560 const auto area = mu0.measure(center, radius, faces[i]);
561 const auto lmu2 = mu2.measure(center, radius, faces[i]);
591 std::vector<typename Base::SurfaceMesh::Face> allFaces(mesh->nbFaces());
592 std::iota(allFaces.begin(), allFaces.end(), 0);
615 template <
typename T>
650 int maxIter = params[
"projectionMaxIter" ].as<
int>();
651 double accuracy = params[
"projectionAccuracy" ].as<
double>();
652 double gamma = params[
"projectionGamma" ].as<
double>();
654 true_estimator.
attach( *shape );
656 maxIter, accuracy, gamma );
657 true_estimator.
init( gridstep, surfels.begin(), surfels.end() );
658 true_estimator.
eval( surfels.begin(), surfels.end(),
659 std::back_inserter( n_true_estimations ) );
660 return n_true_estimations;
692 int maxIter = params[
"projectionMaxIter" ].as<
int>();
693 double accuracy = params[
"projectionAccuracy" ].as<
double>();
694 double gamma = params[
"projectionGamma" ].as<
double>();
696 true_estimator.
attach( *shape );
698 maxIter, accuracy, gamma );
699 true_estimator.
init( gridstep, surfels.begin(), surfels.end() );
700 true_estimator.
eval( surfels.begin(), surfels.end(),
701 std::back_inserter( n_true_estimations ) );
702 return n_true_estimations;
734 int maxIter = params[
"projectionMaxIter" ].as<
int>();
735 double accuracy = params[
"projectionAccuracy" ].as<
double>();
736 double gamma = params[
"projectionGamma" ].as<
double>();
738 true_estimator.
attach( *shape );
740 maxIter, accuracy, gamma );
741 true_estimator.
init( gridstep, surfels.begin(), surfels.end() );
742 true_estimator.
eval( surfels.begin(), surfels.end(),
743 std::back_inserter( n_true_estimations ) );
744 return n_true_estimations;
776 int maxIter = params[
"projectionMaxIter" ].as<
int>();
777 double accuracy = params[
"projectionAccuracy" ].as<
double>();
778 double gamma = params[
"projectionGamma" ].as<
double>();
780 true_estimator.
attach( *shape );
782 maxIter, accuracy, gamma );
783 true_estimator.
init( gridstep, surfels.begin(), surfels.end() );
784 true_estimator.
eval( surfels.begin(), surfels.end(),
785 std::back_inserter( n_true_estimations ) );
786 return n_true_estimations;
819 int maxIter = params[
"projectionMaxIter" ].as<
int>();
820 double accuracy = params[
"projectionAccuracy" ].as<
double>();
821 double gamma = params[
"projectionGamma" ].as<
double>();
823 true_estimator.
attach( *shape );
825 maxIter, accuracy, gamma );
826 true_estimator.
init( gridstep, surfels.begin(), surfels.end() );
827 true_estimator.
eval( surfels.begin(), surfels.end(),
828 std::back_inserter( n_true_estimations ) );
829 return n_true_estimations;
856 static std::tuple<Scalars, Scalars, RealVectors, RealVectors>
859 const typename Base::SurfaceMesh::Faces& faces,
862 bool unit_u = params[
"unit_u"].as<
int>();
863 double radius = params[
"r-radius"].as<
double>();
864 double alpha = params[
"alpha"].as<
double>();
865 double h = params[
"gridstep"].as<
double>();
866 if ( alpha != 1.0 ) radius *= pow( h, alpha-1.0 );
873 if (mesh->faceNormals().size() == 0)
876 if (mesh->vertexNormals().size() == 0)
877 mesh->computeFaceNormalsFromPositions();
879 mesh->computeFaceNormalsFromVertexNormals();
882 const auto& normals = mesh->faceNormals();
884 Scalars k1(faces.size()), k2(faces.size());
887 for (
size_t i = 0; i < faces.size(); ++i)
889 const auto center = mesh->faceCentroid(faces[i]);
890 const auto area = mu0 .measure(center, radius, faces[i]);
891 const auto lmuxy = muxy.measure(center, radius, faces[i]);
892 std::tie(k1[i], k2[i], d1[i], d2[i]) =
896 return std::make_tuple(k1, k2, d1, d2);
924 static std::tuple<Scalars, Scalars, RealVectors, RealVectors>
929 std::vector<typename Base::SurfaceMesh::Face> allFaces(mesh->nbFaces());
930 std::iota(allFaces.begin(), allFaces.end(), 0);
954 template <
typename T>
955 static std::tuple<Scalars, Scalars, RealVectors, RealVectors>
989 (
"surfelEmbedding", 0 )
1006 std::vector< RealVector > result;
1007 for (
auto s : surfels )
1010 bool direct =
K.sDirect( s, k );
1012 t[ k ] = direct ? -1.0 : 1.0;
1013 result.push_back( t );
1033 template <
typename TAnyDigitalSurface>
1040 int verbose = params[
"verbose" ].as<
int>();
1041 Scalar t = params[
"t-ring" ].as<
double>();
1042 typedef typename TAnyDigitalSurface::DigitalSurfaceContainer SurfaceContainer;
1048 < SurfaceContainer, Metric, SurfelFunctor,
Functor> NormalEstimator;
1050 trace.
info() <<
"- CTrivial normal t-ring=" << t <<
" (discrete)" << std::endl;
1053 Metric aMetric( 2.0 );
1055 std::vector< RealVector > n_estimations;
1056 SurfelFunctor surfelFct( canonic_embedder, 1.0 );
1057 NormalEstimator estimator;
1059 estimator.setParams( aMetric, surfelFct, fct, t );
1060 estimator.init( 1.0, surfels.begin(), surfels.end());
1061 estimator.eval( surfels.begin(), surfels.end(),
1062 std::back_inserter( n_estimations ) );
1063 std::transform( n_estimations.cbegin(), n_estimations.cend(), n_estimations.begin(),
1065 return n_estimations;
1089 template <
typename TAnyDigitalSurface>
1097 typedef typename TAnyDigitalSurface::DigitalSurfaceContainer SurfaceContainer;
1099 int verbose = params[
"verbose" ].as<
int>();
1100 std::string kernel = params[
"kernel" ].as<std::string>();
1106 int embedding = params[
"embedding" ].as<
int>();
1108 if ( alpha != 1.0 )
R *= pow( h, alpha-1.0 );
1109 if ( alpha != 1.0 ) r *= pow( h, alpha-1.0 );
1114 trace.
info() <<
"- VCM normal kernel=" << kernel <<
" emb=" << embedding
1115 <<
" alpha=" << alpha << std::endl;
1116 trace.
info() <<
"- VCM normal r=" << (r*h) <<
" (continuous) "
1117 << r <<
" (discrete)" << std::endl;
1118 trace.
info() <<
"- VCM normal R=" << (
R*h) <<
" (continuous) "
1119 <<
R <<
" (discrete)" << std::endl;
1120 trace.
info() <<
"- VCM normal t=" << t <<
" (discrete)" << std::endl;
1122 if ( kernel ==
"hat" )
1126 < SurfaceContainer, Metric, KernelFunction > VCMOnSurface;
1129 < SurfaceContainer, Metric, KernelFunction, NormalVFunctor> VCMNormalEstimator;
1130 KernelFunction chi_r( 1.0, r );
1131 VCMNormalEstimator estimator;
1133 estimator.setParams( embType,
R, r, chi_r, t, Metric(), verbose > 0 );
1134 estimator.init( h, surfels.begin(), surfels.end() );
1135 estimator.eval( surfels.begin(), surfels.end(),
1136 std::back_inserter( n_estimations ) );
1138 else if ( kernel ==
"ball" )
1142 < SurfaceContainer, Metric, KernelFunction > VCMOnSurface;
1145 < SurfaceContainer, Metric, KernelFunction, NormalVFunctor> VCMNormalEstimator;
1146 KernelFunction chi_r( 1.0, r );
1147 VCMNormalEstimator estimator;
1149 estimator.setParams( embType,
R, r, chi_r, t, Metric(), verbose > 0 );
1150 estimator.init( h, surfels.begin(), surfels.end() );
1151 estimator.eval( surfels.begin(), surfels.end(),
1152 std::back_inserter( n_estimations ) );
1156 trace.
warning() <<
"[ShortcutsGeometry::getVCMNormalVectors] Unknown kernel: "
1157 << kernel << std::endl;
1159 return n_estimations;
1260 template <
typename TPo
intPredicate>
1271 <
KSpace, TPointPredicate, IINormalFunctor> IINormalEstimator;
1274 int verbose = params[
"verbose" ].as<
int>();
1278 if ( alpha != 1.0 ) r *= pow( h, alpha-1.0 );
1281 trace.
info() <<
"- II normal alpha=" << alpha << std::endl;
1282 trace.
info() <<
"- II normal r=" << (r*h) <<
" (continuous) "
1283 << r <<
" (discrete)" << std::endl;
1285 IINormalFunctor functor;
1286 functor.init( h, r*h );
1287 IINormalEstimator ii_estimator( functor );
1288 ii_estimator.attach(
K, shape );
1289 ii_estimator.setParams( r );
1290 ii_estimator.init( h, surfels.begin(), surfels.end() );
1291 ii_estimator.eval( surfels.begin(), surfels.end(),
1292 std::back_inserter( n_estimations ) );
1295 return n_estimations;
1387 template <
typename TPo
intPredicate>
1398 <
KSpace, TPointPredicate, IIMeanCurvFunctor> IIMeanCurvEstimator;
1401 int verbose = params[
"verbose" ].as<
int>();
1405 if ( alpha != 1.0 ) r *= pow( h, alpha-1.0 );
1408 trace.
info() <<
"- II mean curvature alpha=" << alpha << std::endl;
1409 trace.
info() <<
"- II mean curvature r=" << (r*h) <<
" (continuous) "
1410 << r <<
" (discrete)" << std::endl;
1412 IIMeanCurvFunctor functor;
1413 functor.init( h, r*h );
1414 IIMeanCurvEstimator ii_estimator( functor );
1415 ii_estimator.attach(
K, shape );
1416 ii_estimator.setParams( r );
1417 ii_estimator.init( h, surfels.begin(), surfels.end() );
1418 ii_estimator.eval( surfels.begin(), surfels.end(),
1419 std::back_inserter( mc_estimations ) );
1420 return mc_estimations;
1511 template <
typename TPo
intPredicate>
1522 <
KSpace, TPointPredicate, IIGaussianCurvFunctor> IIGaussianCurvEstimator;
1525 int verbose = params[
"verbose" ].as<
int>();
1529 if ( alpha != 1.0 ) r *= pow( h, alpha-1.0 );
1532 trace.
info() <<
"- II Gaussian curvature alpha=" << alpha << std::endl;
1533 trace.
info() <<
"- II Gaussian curvature r=" << (r*h) <<
" (continuous) "
1534 << r <<
" (discrete)" << std::endl;
1536 IIGaussianCurvFunctor functor;
1537 functor.init( h, r*h );
1538 IIGaussianCurvEstimator ii_estimator( functor );
1539 ii_estimator.attach(
K, shape );
1540 ii_estimator.setParams( r );
1541 ii_estimator.init( h, surfels.begin(), surfels.end() );
1542 ii_estimator.eval( surfels.begin(), surfels.end(),
1543 std::back_inserter( mc_estimations ) );
1544 return mc_estimations;
1637 template <
typename TPo
intPredicate>
1650 int verbose = params[
"verbose" ].as<
int>();
1654 if ( alpha != 1.0 ) r *= pow( h, alpha-1.0 );
1657 trace.
info() <<
"- II principal curvatures and directions alpha=" << alpha << std::endl;
1658 trace.
info() <<
"- II principal curvatures and directions r=" << (r*h) <<
" (continuous) "
1659 << r <<
" (discrete)" << std::endl;
1661 IICurvFunctor functor;
1662 functor.init( h, r*h );
1663 IICurvEstimator ii_estimator( functor );
1664 ii_estimator.attach(
K, shape );
1665 ii_estimator.setParams( r );
1666 ii_estimator.init( h, surfels.begin(), surfels.end() );
1667 ii_estimator.eval( surfels.begin(), surfels.end(),
1668 std::back_inserter( mc_estimations ) );
1669 return mc_estimations;
1696 (
"at-lambda", 0.025 )
1697 (
"at-epsilon", 0.25 )
1698 (
"at-epsilon-start", 2.0 )
1699 (
"at-epsilon-ratio", 2.0 )
1700 (
"at-max-iter", 10 )
1701 (
"at-diff-v-max", 0.0001 )
1702 (
"at-v-policy",
"Maximum" );
1727 template <
typename TAnyDigitalSurface,
1728 typename VectorFieldInput>
1733 const VectorFieldInput& input,
1739 int verbose = params[
"verbose" ].as<
int>();
1742 Scalar epsilon1 = params[
"at-epsilon-start" ].as<
Scalar>();
1744 Scalar epsilonr = params[
"at-epsilon-ratio" ].as<
Scalar>();
1745 int max_iter = params[
"at-max-iter" ].as<
int>();
1746 Scalar diff_v_max= params[
"at-diff-v-max" ].as<
Scalar>();
1748 const auto calculus = CalculusFactory::createFromNSCells<2>( surfels.cbegin(), surfels.cend() );
1751 at_solver.
setUp( alpha_at, lambda_at );
1753 auto output = input;
1788 template <
typename TAnyDigitalSurface,
1789 typename VectorFieldInput,
1790 typename CellRangeConstIterator>
1794 CellRangeConstIterator itB,
1795 CellRangeConstIterator itE,
1798 const VectorFieldInput& input,
1804 int verbose = params[
"verbose" ].as<
int>();
1807 Scalar epsilon1 = params[
"at-epsilon-start" ].as<
Scalar>();
1809 Scalar epsilonr = params[
"at-epsilon-ratio" ].as<
Scalar>();
1810 int max_iter = params[
"at-max-iter" ].as<
int>();
1811 Scalar diff_v_max= params[
"at-diff-v-max" ].as<
Scalar>();
1812 std::string policy = params[
"at-v-policy" ].as<std::string>();
1814 const auto calculus = CalculusFactory::createFromNSCells<2>( surfels.cbegin(), surfels.cend() );
1817 at_solver.
setUp( alpha_at, lambda_at );
1819 auto output = input;
1821 auto p = ( policy ==
"Average" ) ? at_solver.
Average
1822 : ( policy ==
"Minimum" ) ? at_solver.
Minimum
1851 template <
typename TAnyDigitalSurface>
1862 int verbose = params[
"verbose" ].as<
int>();
1865 Scalar epsilon1 = params[
"at-epsilon-start" ].as<
Scalar>();
1867 Scalar epsilonr = params[
"at-epsilon-ratio" ].as<
Scalar>();
1868 int max_iter = params[
"at-max-iter" ].as<
int>();
1869 Scalar diff_v_max= params[
"at-diff-v-max" ].as<
Scalar>();
1871 const auto calculus = CalculusFactory::createFromNSCells<2>( surfels.cbegin(), surfels.cend() );
1874 at_solver.
setUp( alpha_at, lambda_at );
1876 auto output = input;
1915 template <
typename TAnyDigitalSurface,
1916 typename CellRangeConstIterator>
1920 CellRangeConstIterator itB,
1921 CellRangeConstIterator itE,
1930 int verbose = params[
"verbose" ].as<
int>();
1933 Scalar epsilon1 = params[
"at-epsilon-start" ].as<
Scalar>();
1935 Scalar epsilonr = params[
"at-epsilon-ratio" ].as<
Scalar>();
1936 int max_iter = params[
"at-max-iter" ].as<
int>();
1937 Scalar diff_v_max= params[
"at-diff-v-max" ].as<
Scalar>();
1938 std::string policy = params[
"at-v-policy" ].as<std::string>();
1940 const auto calculus = CalculusFactory::createFromNSCells<2>( surfels.cbegin(), surfels.cend() );
1943 at_solver.
setUp( alpha_at, lambda_at );
1945 auto output = input;
1947 auto p = ( policy ==
"Average" ) ? at_solver.
Average
1948 : ( policy ==
"Minimum" ) ? at_solver.
Minimum
1970 std::transform( ref_v.cbegin(), ref_v.cend(), v.cbegin(), v.begin(),
1972 { return rw.dot( w ) >= 0.0 ? w : -w; } );
1999 if ( v1.size() == v2.size() )
2001 auto outIt = v.begin();
2002 for (
auto it1 = v1.cbegin(), it2 = v2.cbegin(), itE1 = v1.cend();
2003 it1 != itE1; ++it1, ++it2 )
2005 Scalar angle_error = acos( (*it1).dot( *it2 ) );
2006 *outIt++ = angle_error;
2011 trace.
warning() <<
"[ShortcutsGeometry::getVectorsAngleDeviation]"
2012 <<
" v1.size()=" << v1.size() <<
" should be equal to "
2013 <<
" v2.size()=" << v2.size() << std::endl;
2027 std::transform( v2.cbegin(), v2.cend(), v1.cbegin(), result.begin(),
2029 { return fabs( val1 - val2 ); } );
2044 for (
unsigned int i = 0; i < v1.size(); i++ )
2045 sum += ( v1[ i ] - v2[ i ] ) * ( v1[ i ] - v2[ i ] );
2046 return sqrt( sum / v1.size() );
2060 for (
unsigned int i = 0; i < v1.size(); i++ )
2061 sum += fabs( v1[ i ] - v2[ i ] );
2062 return sum / v1.size();
2076 for (
unsigned int i = 0; i < v1.size(); i++ )
2077 loo = std::max( loo, fabs( v1[ i ] - v2[ i ] ) );
2095 (
"toroidal-x" , false )
2096 (
"toroidal-y" ,
false )
2097 (
"toroidal-z" , false );
2115 template<u
int32_t p,
typename Po
intRange>
2127 typename Map::PeriodicitySpec specs = {
false,
false,
false};
2128 if (params[
"toroidal-x"].as<int>()) specs[0] =
true;
2129 if (params[
"toroidal-y"].as<int>()) specs[1] =
true;
2130 if (params[
"toroidal-z"].as<int>()) specs[2] =
true;
2136 return Map(
domain, predicate, metric, specs);
2152 template<u
int32_t p,
typename Po
intRange>
2164 typename Map::PeriodicitySpec specs = {
false,
false,
false};
2165 if (params[
"toroidal-x"].as<int>()) specs[0] =
true;
2166 if (params[
"toroidal-y"].as<int>()) specs[1] =
true;
2167 if (params[
"toroidal-z"].as<int>()) specs[2] =
true;
2172 return Map(*
domain, predicate, metric, specs);
2191 template<u
int32_t p,
typename Po
intRange>
2203 typename Map::PeriodicitySpec specs = {
false,
false,
false};
2204 if (params[
"toroidal-x"].as<int>()) specs[0] =
true;
2205 if (params[
"toroidal-y"].as<int>()) specs[1] =
true;
2206 if (params[
"toroidal-z"].as<int>()) specs[2] =
true;
2211 return Map(
domain, predicate, metric, specs);
2230 template<u
int32_t p,
typename Po
intRange>
2242 typename Map::PeriodicitySpec specs = {
false,
false,
false};
2243 if (params[
"toroidal-x"].as<int>()) specs[0] =
true;
2244 if (params[
"toroidal-y"].as<int>()) specs[1] =
true;
2245 if (params[
"toroidal-z"].as<int>()) specs[2] =
true;
2250 return Map(*
domain, predicate, metric, specs);
2267 template<u
int32_t p,
typename Po
intRangeSites,
typename Po
intRange>
2270 const PointRangeSites& sites,
2277 Point pmin = *points.begin();
2281 for (
auto it = points.begin(); it != points.end(); ++it)
2284 for (
size_t i = 0; i < Space::dimension; ++i)
2286 pmin[i] = std::min(pmin[i], (*it)[i] - 1);
2287 pmax[i] = std::max(pmax[i], (*it)[i] + 1);
2291 for (
auto it = sites.begin(); it != sites.end(); ++it)
2293 for (
size_t i = 0; i < Space::dimension; ++i)
2295 pmin[i] = std::min(pmin[i], (*it)[i] - 1);
2296 pmax[i] = std::max(pmax[i], (*it)[i] + 1);
2307 typename Map::PeriodicitySpec specs = {
false,
false,
false};
2308 if (params[
"toroidal-x"].as<int>()) specs[0] =
true;
2309 if (params[
"toroidal-y"].as<int>()) specs[1] =
true;
2310 if (params[
"toroidal-z"].as<int>()) specs[2] =
true;
2312 auto map =
Map(
domain, predicate, metric, specs);
2314 std::vector<Vector> directions(pCount);
2316 for (
auto it = points.begin(); it != points.end(); ++it)
2318 directions[i++] = map(*it);
2337 template<u
int32_t p,
typename Po
intRangeSites,
typename Po
intRange>
2340 const PointRangeSites& sites,
2347 Point pmin = *points.begin();
2351 for (
auto it = points.begin(); it != points.end(); ++it)
2354 for (
size_t i = 0; i < Space::dimension; ++i)
2356 pmin[i] = std::min(pmin[i], (*it)[i] - 1);
2357 pmax[i] = std::max(pmax[i], (*it)[i] + 1);
2361 for (
auto it = sites.begin(); it != sites.end(); ++it)
2363 for (
size_t i = 0; i < Space::dimension; ++i)
2365 pmin[i] = std::min(pmin[i], (*it)[i] - 1);
2366 pmax[i] = std::max(pmax[i], (*it)[i] + 1);
2376 typename Map::PeriodicitySpec specs = {
false,
false,
false};
2377 if (params[
"toroidal-x"].as<int>()) specs[0] =
true;
2378 if (params[
"toroidal-y"].as<int>()) specs[1] =
true;
2379 if (params[
"toroidal-z"].as<int>()) specs[2] =
true;
2381 auto map =
Map(
domain, predicate, metric, specs);
2383 std::vector<typename Metric::Value> directions(pCount);
2385 for (
auto it = points.begin(); it != points.end(); ++it)
2387 directions[i++] = map(*it);
2467#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.
Aim: A wrapper class around a STL associative container for storing sets of digital points within som...
void insert(const Point &p)
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.
static DistanceTransformation< Space, VoronoiPointPredicate, ExactPredicateLpSeparableMetric< Space, p > > getDistanceTransformation(CountedPtr< Domain > domain, const PointRange &sites, const Parameters ¶ms=parametersVoronoiMap())
Computes the VoronoiMap of a domain, where sites are given through a range.
static std::tuple< Scalars, Scalars, RealVectors, RealVectors > getCNCPrincipalCurvaturesAndDirections(CountedPtr< typename Base::SurfaceMesh > mesh, const Parameters ¶ms=parametersShapeGeometry())
::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()
CorrectedNormalCurrentComputer< RealPoint, RealVector > CNCComputer
KSpace::SurfelSet SurfelSet
defines a set of surfels
static CurvatureTensorQuantities getIIPrincipalCurvaturesAndDirections(CountedPtr< DigitizedImplicitShape3D > dshape, const SurfelRange &surfels, const Parameters ¶ms=parametersGeometryEstimation()|parametersKSpace()|parametersDigitizedImplicitShape3D())
static Scalars getCNCGaussianCurvatures(CountedPtr< typename Base::SurfaceMesh > mesh, const typename Base::SurfaceMesh::Faces &faces, const Parameters ¶ms=parametersShapeGeometry())
ShortcutsGeometry()=delete
DigitalSetByAssociativeContainer< Domain, std::unordered_set< typename Domain::Point > > DigitalSet
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)
static VoronoiMap< Space, VoronoiPointPredicate, ExactPredicateLpSeparableMetric< Space, p > > getVoronoiMap(CountedPtr< Domain > domain, const PointRange &sites, const Parameters ¶ms=parametersVoronoiMap())
Computes the VoronoiMap of a domain, where sites are given through a range.
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
static VoronoiMap< Space, VoronoiPointPredicate, ExactPredicateLpSeparableMetric< Space, p > > getVoronoiMap(Domain domain, const PointRange &sites, const Parameters ¶ms=parametersVoronoiMap())
Computes the VoronoiMap of a domain, where sites are given through a range.
TrueDigitalSurfaceLocalEstimator< KSpace, ImplicitShape3D, SecondPrincipalDirectionFunctor > TrueSecondPrincipalDirectionEstimator
static std::tuple< Scalars, Scalars, RealVectors, RealVectors > getCNCPrincipalCurvaturesAndDirections(CountedPtr< typename Base::SurfaceMesh > mesh, const typename Base::SurfaceMesh::Faces &faces, const Parameters ¶ms=parametersShapeGeometry())
TrueDigitalSurfaceLocalEstimator< KSpace, ImplicitShape3D, NormalFunctor > TrueNormalEstimator
LightDigitalSurface::Arc Arc
static RealVectors getFirstPrincipalDirections(CountedPtr< ImplicitShape3D > shape, const KSpace &K, const SurfelRange &surfels, const Parameters ¶ms=parametersShapeGeometry())
static Scalars getCNCGaussianCurvatures(T &digitalObject, const Parameters ¶ms=parametersShapeGeometry())
ImageContainerBySTLVector< Domain, GrayScale > GrayScaleImage
defines a grey-level image with (hyper-)rectangular domain.
static std::vector< Vector > getDirectionToClosestSite(const PointRange &points, const PointRangeSites &sites, const Parameters ¶ms=parametersVoronoiMap())
Computes the direction of the closest site of a range of points.
static std::vector< typename ExactPredicateLpSeparableMetric< Space, p >::Value > getDistanceToClosestSite(const PointRange &points, const PointRangeSites &sites, const Parameters ¶ms=parametersVoronoiMap())
Computes the distance of the closest site of a range of points.
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.
static DistanceTransformation< Space, VoronoiPointPredicate, ExactPredicateLpSeparableMetric< Space, p > > getDistanceTransformation(Domain domain, const PointRange &sites, const Parameters ¶ms=parametersVoronoiMap())
Computes the VoronoiMap of a domain, where sites are given through a range.
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
static Scalars getCNCMeanCurvatures(CountedPtr< typename Base::SurfaceMesh > mesh, const typename Base::SurfaceMesh::Faces faces, const Parameters ¶ms=parametersShapeGeometry())
~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.
functors::NotPointPredicate< DigitalSet > VoronoiPointPredicate
static std::tuple< Scalars, Scalars, RealVectors, RealVectors > getCNCPrincipalCurvaturesAndDirections(T &digitalObject, const Parameters ¶ms=parametersShapeGeometry())
std::set< IdxSurfel > IdxSurfelSet
TrueDigitalSurfaceLocalEstimator< KSpace, ImplicitShape3D, SecondPrincipalCurvatureFunctor > TrueSecondPrincipalCurvatureEstimator
Space::RealVector RealVector
Vector with floating-point coordinates.
static Parameters parametersVoronoiMap()
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()
static Scalars getCNCMeanCurvatures(T &digitalObject, const Parameters ¶ms=parametersShapeGeometry())
::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 Scalars getCNCGaussianCurvatures(CountedPtr< typename Base::SurfaceMesh > mesh, const Parameters ¶ms=parametersShapeGeometry())
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 getCNCMeanCurvatures(CountedPtr< typename Base::SurfaceMesh > mesh, const Parameters ¶ms=parametersShapeGeometry())
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()
static CountedPtr< SurfaceMesh > makePrimalSurfaceMesh(Cell2Index &c2i, CountedPtr< ::DGtal::DigitalSurface< TContainer > > aSurface)
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: Implementation of the linear in time Voronoi map construction.
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
std::vector< Point > PointRange
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: Utility class to compute curvature measures induced by (1) a corrected normal current defined by...
ScalarMeasure computeMu1() const
ScalarMeasure computeMu2() const
static std::tuple< Scalar, Scalar, RealVector, RealVector > principalCurvatures(Scalar mu0, RealTensor muXY, const RealVector &N)
static Scalar meanCurvature(Scalar mu0, Scalar mu1)
static Scalar GaussianCurvature(Scalar mu0, Scalar mu2)
TensorMeasure computeMuXY() const
ScalarMeasure computeMu0() const
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: The predicate returns true when the point predicate given at construction return false....
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.
std::unordered_map< Cell, CubicalCellData > Map