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,
406 bool unit_u = params[
"unit_u"].as<
int>();
407 double radius = params[
"r-radius"].as<
double>();
408 double alpha = params[
"alpha"].as<
double>();
409 double h = params[
"gridstep"].as<
double>();
410 if ( alpha != 1.0 ) radius *= pow( h, alpha-1.0 );
417 Scalars curvatures(faces.size());
418 for (
size_t i = 0; i < faces.size(); ++i)
420 const auto center = mesh->faceCentroid(faces[i]);
421 const auto area = mu0.measure(center, radius, faces[i]);
422 const auto lmu1 = mu1.measure(center, radius, faces[i]);
452 std::vector<typename Base::SurfaceMesh::Face> allFaces(mesh->nbFaces());
453 std::iota(allFaces.begin(), allFaces.end(), 0);
476 template <
typename T>
512 int maxIter = params[
"projectionMaxIter" ].as<
int>();
513 double accuracy = params[
"projectionAccuracy" ].as<
double>();
514 double gamma = params[
"projectionGamma" ].as<
double>();
516 true_estimator.
attach( *shape );
518 true_estimator.
init( gridstep, surfels.begin(), surfels.end() );
519 true_estimator.
eval( surfels.begin(), surfels.end(),
520 std::back_inserter( n_true_estimations ) );
521 return n_true_estimations;
544 const typename Base::SurfaceMesh::Faces & faces,
549 bool unit_u = params[
"unit_u"].as<
int>();
550 double radius = params[
"r-radius"].as<
double>();
551 double alpha = params[
"alpha"].as<
double>();
552 double h = params[
"gridstep"].as<
double>();
553 if ( alpha != 1.0 ) radius *= pow( h, alpha-1.0 );
560 Scalars curvatures(faces.size());
561 for (
size_t i = 0; i < faces.size(); ++i)
563 const auto center = mesh->faceCentroid(faces[i]);
564 const auto area = mu0.measure(center, radius, faces[i]);
565 const auto lmu2 = mu2.measure(center, radius, faces[i]);
595 std::vector<typename Base::SurfaceMesh::Face> allFaces(mesh->nbFaces());
596 std::iota(allFaces.begin(), allFaces.end(), 0);
619 template <
typename T>
654 int maxIter = params[
"projectionMaxIter" ].as<
int>();
655 double accuracy = params[
"projectionAccuracy" ].as<
double>();
656 double gamma = params[
"projectionGamma" ].as<
double>();
658 true_estimator.
attach( *shape );
660 maxIter, accuracy, gamma );
661 true_estimator.
init( gridstep, surfels.begin(), surfels.end() );
662 true_estimator.
eval( surfels.begin(), surfels.end(),
663 std::back_inserter( n_true_estimations ) );
664 return n_true_estimations;
696 int maxIter = params[
"projectionMaxIter" ].as<
int>();
697 double accuracy = params[
"projectionAccuracy" ].as<
double>();
698 double gamma = params[
"projectionGamma" ].as<
double>();
700 true_estimator.
attach( *shape );
702 maxIter, accuracy, gamma );
703 true_estimator.
init( gridstep, surfels.begin(), surfels.end() );
704 true_estimator.
eval( surfels.begin(), surfels.end(),
705 std::back_inserter( n_true_estimations ) );
706 return n_true_estimations;
738 int maxIter = params[
"projectionMaxIter" ].as<
int>();
739 double accuracy = params[
"projectionAccuracy" ].as<
double>();
740 double gamma = params[
"projectionGamma" ].as<
double>();
742 true_estimator.
attach( *shape );
744 maxIter, accuracy, gamma );
745 true_estimator.
init( gridstep, surfels.begin(), surfels.end() );
746 true_estimator.
eval( surfels.begin(), surfels.end(),
747 std::back_inserter( n_true_estimations ) );
748 return n_true_estimations;
780 int maxIter = params[
"projectionMaxIter" ].as<
int>();
781 double accuracy = params[
"projectionAccuracy" ].as<
double>();
782 double gamma = params[
"projectionGamma" ].as<
double>();
784 true_estimator.
attach( *shape );
786 maxIter, accuracy, gamma );
787 true_estimator.
init( gridstep, surfels.begin(), surfels.end() );
788 true_estimator.
eval( surfels.begin(), surfels.end(),
789 std::back_inserter( n_true_estimations ) );
790 return n_true_estimations;
823 int maxIter = params[
"projectionMaxIter" ].as<
int>();
824 double accuracy = params[
"projectionAccuracy" ].as<
double>();
825 double gamma = params[
"projectionGamma" ].as<
double>();
827 true_estimator.
attach( *shape );
829 maxIter, accuracy, gamma );
830 true_estimator.
init( gridstep, surfels.begin(), surfels.end() );
831 true_estimator.
eval( surfels.begin(), surfels.end(),
832 std::back_inserter( n_true_estimations ) );
833 return n_true_estimations;
860 static std::tuple<Scalars, Scalars, RealVectors, RealVectors>
863 const typename Base::SurfaceMesh::Faces& faces,
868 bool unit_u = params[
"unit_u"].as<
int>();
869 double radius = params[
"r-radius"].as<
double>();
870 double alpha = params[
"alpha"].as<
double>();
871 double h = params[
"gridstep"].as<
double>();
872 if ( alpha != 1.0 ) radius *= pow( h, alpha-1.0 );
879 if (mesh->faceNormals().size() == 0)
882 if (mesh->vertexNormals().size() == 0)
883 mesh->computeFaceNormalsFromPositions();
885 mesh->computeFaceNormalsFromVertexNormals();
888 const auto& normals = mesh->faceNormals();
890 Scalars k1(faces.size()), k2(faces.size());
893 for (
size_t i = 0; i < faces.size(); ++i)
895 const auto center = mesh->faceCentroid(faces[i]);
896 const auto area = mu0 .measure(center, radius, faces[i]);
897 const auto lmuxy = muxy.measure(center, radius, faces[i]);
898 std::tie(k1[i], k2[i], d1[i], d2[i]) =
902 return std::make_tuple(k1, k2, d1, d2);
930 static std::tuple<Scalars, Scalars, RealVectors, RealVectors>
935 std::vector<typename Base::SurfaceMesh::Face> allFaces(mesh->nbFaces());
936 std::iota(allFaces.begin(), allFaces.end(), 0);
960 template <
typename T>
961 static std::tuple<Scalars, Scalars, RealVectors, RealVectors>
995 (
"surfelEmbedding", 0 )
1012 std::vector< RealVector > result;
1013 for (
auto s : surfels )
1016 bool direct =
K.sDirect( s, k );
1018 t[ k ] = direct ? -1.0 : 1.0;
1019 result.push_back( t );
1039 template <
typename TAnyDigitalSurface>
1046 int verbose = params[
"verbose" ].as<
int>();
1047 Scalar t = params[
"t-ring" ].as<
double>();
1048 typedef typename TAnyDigitalSurface::DigitalSurfaceContainer SurfaceContainer;
1054 < SurfaceContainer, Metric, SurfelFunctor,
Functor> NormalEstimator;
1056 trace.
info() <<
"- CTrivial normal t-ring=" << t <<
" (discrete)" << std::endl;
1059 Metric aMetric( 2.0 );
1061 std::vector< RealVector > n_estimations;
1062 SurfelFunctor surfelFct( canonic_embedder, 1.0 );
1063 NormalEstimator estimator;
1065 estimator.setParams( aMetric, surfelFct, fct, t );
1066 estimator.init( 1.0, surfels.begin(), surfels.end());
1067 estimator.eval( surfels.begin(), surfels.end(),
1068 std::back_inserter( n_estimations ) );
1069 std::transform( n_estimations.cbegin(), n_estimations.cend(), n_estimations.begin(),
1071 return n_estimations;
1095 template <
typename TAnyDigitalSurface>
1103 typedef typename TAnyDigitalSurface::DigitalSurfaceContainer SurfaceContainer;
1105 int verbose = params[
"verbose" ].as<
int>();
1106 std::string kernel = params[
"kernel" ].as<std::string>();
1112 int embedding = params[
"embedding" ].as<
int>();
1114 if ( alpha != 1.0 )
R *= pow( h, alpha-1.0 );
1115 if ( alpha != 1.0 ) r *= pow( h, alpha-1.0 );
1120 trace.
info() <<
"- VCM normal kernel=" << kernel <<
" emb=" << embedding
1121 <<
" alpha=" << alpha << std::endl;
1122 trace.
info() <<
"- VCM normal r=" << (r*h) <<
" (continuous) "
1123 << r <<
" (discrete)" << std::endl;
1124 trace.
info() <<
"- VCM normal R=" << (
R*h) <<
" (continuous) "
1125 <<
R <<
" (discrete)" << std::endl;
1126 trace.
info() <<
"- VCM normal t=" << t <<
" (discrete)" << std::endl;
1128 if ( kernel ==
"hat" )
1132 < SurfaceContainer, Metric, KernelFunction > VCMOnSurface;
1135 < SurfaceContainer, Metric, KernelFunction, NormalVFunctor> VCMNormalEstimator;
1136 KernelFunction chi_r( 1.0, r );
1137 VCMNormalEstimator estimator;
1139 estimator.setParams( embType,
R, r, chi_r, t, Metric(), verbose > 0 );
1140 estimator.init( h, surfels.begin(), surfels.end() );
1141 estimator.eval( surfels.begin(), surfels.end(),
1142 std::back_inserter( n_estimations ) );
1144 else if ( kernel ==
"ball" )
1148 < SurfaceContainer, Metric, KernelFunction > VCMOnSurface;
1151 < SurfaceContainer, Metric, KernelFunction, NormalVFunctor> VCMNormalEstimator;
1152 KernelFunction chi_r( 1.0, r );
1153 VCMNormalEstimator estimator;
1155 estimator.setParams( embType,
R, r, chi_r, t, Metric(), verbose > 0 );
1156 estimator.init( h, surfels.begin(), surfels.end() );
1157 estimator.eval( surfels.begin(), surfels.end(),
1158 std::back_inserter( n_estimations ) );
1162 trace.
warning() <<
"[ShortcutsGeometry::getVCMNormalVectors] Unknown kernel: "
1163 << kernel << std::endl;
1165 return n_estimations;
1266 template <
typename TPo
intPredicate>
1277 <
KSpace, TPointPredicate, IINormalFunctor> IINormalEstimator;
1280 int verbose = params[
"verbose" ].as<
int>();
1284 if ( alpha != 1.0 ) r *= pow( h, alpha-1.0 );
1287 trace.
info() <<
"- II normal alpha=" << alpha << std::endl;
1288 trace.
info() <<
"- II normal r=" << (r*h) <<
" (continuous) "
1289 << r <<
" (discrete)" << std::endl;
1291 IINormalFunctor functor;
1292 functor.init( h, r*h );
1293 IINormalEstimator ii_estimator( functor );
1294 ii_estimator.attach(
K, shape );
1295 ii_estimator.setParams( r );
1296 ii_estimator.init( h, surfels.begin(), surfels.end() );
1297 ii_estimator.eval( surfels.begin(), surfels.end(),
1298 std::back_inserter( n_estimations ) );
1301 return n_estimations;
1393 template <
typename TPo
intPredicate>
1404 <
KSpace, TPointPredicate, IIMeanCurvFunctor> IIMeanCurvEstimator;
1407 int verbose = params[
"verbose" ].as<
int>();
1411 if ( alpha != 1.0 ) r *= pow( h, alpha-1.0 );
1414 trace.
info() <<
"- II mean curvature alpha=" << alpha << std::endl;
1415 trace.
info() <<
"- II mean curvature r=" << (r*h) <<
" (continuous) "
1416 << r <<
" (discrete)" << std::endl;
1418 IIMeanCurvFunctor functor;
1419 functor.init( h, r*h );
1420 IIMeanCurvEstimator ii_estimator( functor );
1421 ii_estimator.attach(
K, shape );
1422 ii_estimator.setParams( r );
1423 ii_estimator.init( h, surfels.begin(), surfels.end() );
1424 ii_estimator.eval( surfels.begin(), surfels.end(),
1425 std::back_inserter( mc_estimations ) );
1426 return mc_estimations;
1517 template <
typename TPo
intPredicate>
1528 <
KSpace, TPointPredicate, IIGaussianCurvFunctor> IIGaussianCurvEstimator;
1531 int verbose = params[
"verbose" ].as<
int>();
1535 if ( alpha != 1.0 ) r *= pow( h, alpha-1.0 );
1538 trace.
info() <<
"- II Gaussian curvature alpha=" << alpha << std::endl;
1539 trace.
info() <<
"- II Gaussian curvature r=" << (r*h) <<
" (continuous) "
1540 << r <<
" (discrete)" << std::endl;
1542 IIGaussianCurvFunctor functor;
1543 functor.init( h, r*h );
1544 IIGaussianCurvEstimator ii_estimator( functor );
1545 ii_estimator.attach(
K, shape );
1546 ii_estimator.setParams( r );
1547 ii_estimator.init( h, surfels.begin(), surfels.end() );
1548 ii_estimator.eval( surfels.begin(), surfels.end(),
1549 std::back_inserter( mc_estimations ) );
1550 return mc_estimations;
1643 template <
typename TPo
intPredicate>
1656 int verbose = params[
"verbose" ].as<
int>();
1660 if ( alpha != 1.0 ) r *= pow( h, alpha-1.0 );
1663 trace.
info() <<
"- II principal curvatures and directions alpha=" << alpha << std::endl;
1664 trace.
info() <<
"- II principal curvatures and directions r=" << (r*h) <<
" (continuous) "
1665 << r <<
" (discrete)" << std::endl;
1667 IICurvFunctor functor;
1668 functor.init( h, r*h );
1669 IICurvEstimator ii_estimator( functor );
1670 ii_estimator.attach(
K, shape );
1671 ii_estimator.setParams( r );
1672 ii_estimator.init( h, surfels.begin(), surfels.end() );
1673 ii_estimator.eval( surfels.begin(), surfels.end(),
1674 std::back_inserter( mc_estimations ) );
1675 return mc_estimations;
1702 (
"at-lambda", 0.025 )
1703 (
"at-epsilon", 0.25 )
1704 (
"at-epsilon-start", 2.0 )
1705 (
"at-epsilon-ratio", 2.0 )
1706 (
"at-max-iter", 10 )
1707 (
"at-diff-v-max", 0.0001 )
1708 (
"at-v-policy",
"Maximum" );
1733 template <
typename TAnyDigitalSurface,
1734 typename VectorFieldInput>
1739 const VectorFieldInput& input,
1745 int verbose = params[
"verbose" ].as<
int>();
1748 Scalar epsilon1 = params[
"at-epsilon-start" ].as<
Scalar>();
1750 Scalar epsilonr = params[
"at-epsilon-ratio" ].as<
Scalar>();
1751 int max_iter = params[
"at-max-iter" ].as<
int>();
1752 Scalar diff_v_max= params[
"at-diff-v-max" ].as<
Scalar>();
1754 const auto calculus = CalculusFactory::createFromNSCells<2>( surfels.cbegin(), surfels.cend() );
1757 at_solver.
setUp( alpha_at, lambda_at );
1759 auto output = input;
1794 template <
typename TAnyDigitalSurface,
1795 typename VectorFieldInput,
1796 typename CellRangeConstIterator>
1800 CellRangeConstIterator itB,
1801 CellRangeConstIterator itE,
1804 const VectorFieldInput& input,
1810 int verbose = params[
"verbose" ].as<
int>();
1813 Scalar epsilon1 = params[
"at-epsilon-start" ].as<
Scalar>();
1815 Scalar epsilonr = params[
"at-epsilon-ratio" ].as<
Scalar>();
1816 int max_iter = params[
"at-max-iter" ].as<
int>();
1817 Scalar diff_v_max= params[
"at-diff-v-max" ].as<
Scalar>();
1818 std::string policy = params[
"at-v-policy" ].as<std::string>();
1820 const auto calculus = CalculusFactory::createFromNSCells<2>( surfels.cbegin(), surfels.cend() );
1823 at_solver.
setUp( alpha_at, lambda_at );
1825 auto output = input;
1827 auto p = ( policy ==
"Average" ) ? at_solver.
Average
1828 : ( policy ==
"Minimum" ) ? at_solver.
Minimum
1857 template <
typename TAnyDigitalSurface>
1868 int verbose = params[
"verbose" ].as<
int>();
1871 Scalar epsilon1 = params[
"at-epsilon-start" ].as<
Scalar>();
1873 Scalar epsilonr = params[
"at-epsilon-ratio" ].as<
Scalar>();
1874 int max_iter = params[
"at-max-iter" ].as<
int>();
1875 Scalar diff_v_max= params[
"at-diff-v-max" ].as<
Scalar>();
1877 const auto calculus = CalculusFactory::createFromNSCells<2>( surfels.cbegin(), surfels.cend() );
1880 at_solver.
setUp( alpha_at, lambda_at );
1882 auto output = input;
1921 template <
typename TAnyDigitalSurface,
1922 typename CellRangeConstIterator>
1926 CellRangeConstIterator itB,
1927 CellRangeConstIterator itE,
1936 int verbose = params[
"verbose" ].as<
int>();
1939 Scalar epsilon1 = params[
"at-epsilon-start" ].as<
Scalar>();
1941 Scalar epsilonr = params[
"at-epsilon-ratio" ].as<
Scalar>();
1942 int max_iter = params[
"at-max-iter" ].as<
int>();
1943 Scalar diff_v_max= params[
"at-diff-v-max" ].as<
Scalar>();
1944 std::string policy = params[
"at-v-policy" ].as<std::string>();
1946 const auto calculus = CalculusFactory::createFromNSCells<2>( surfels.cbegin(), surfels.cend() );
1949 at_solver.
setUp( alpha_at, lambda_at );
1951 auto output = input;
1953 auto p = ( policy ==
"Average" ) ? at_solver.
Average
1954 : ( policy ==
"Minimum" ) ? at_solver.
Minimum
1976 std::transform( ref_v.cbegin(), ref_v.cend(), v.cbegin(), v.begin(),
1978 { return rw.dot( w ) >= 0.0 ? w : -w; } );
2005 if ( v1.size() == v2.size() )
2007 auto outIt = v.begin();
2008 for (
auto it1 = v1.cbegin(), it2 = v2.cbegin(), itE1 = v1.cend();
2009 it1 != itE1; ++it1, ++it2 )
2011 Scalar angle_error = acos( (*it1).dot( *it2 ) );
2012 *outIt++ = angle_error;
2017 trace.
warning() <<
"[ShortcutsGeometry::getVectorsAngleDeviation]"
2018 <<
" v1.size()=" << v1.size() <<
" should be equal to "
2019 <<
" v2.size()=" << v2.size() << std::endl;
2033 std::transform( v2.cbegin(), v2.cend(), v1.cbegin(), result.begin(),
2035 { return fabs( val1 - val2 ); } );
2050 for (
unsigned int i = 0; i < v1.size(); i++ )
2051 sum += ( v1[ i ] - v2[ i ] ) * ( v1[ i ] - v2[ i ] );
2052 return sqrt( sum / v1.size() );
2066 for (
unsigned int i = 0; i < v1.size(); i++ )
2067 sum += fabs( v1[ i ] - v2[ i ] );
2068 return sum / v1.size();
2082 for (
unsigned int i = 0; i < v1.size(); i++ )
2083 loo = std::max( loo, fabs( v1[ i ] - v2[ i ] ) );
2101 (
"toroidal-x" , false )
2102 (
"toroidal-y" ,
false )
2103 (
"toroidal-z" , false );
2121 template<u
int32_t p,
typename Po
intRange>
2133 typename Map::PeriodicitySpec specs = {
false,
false,
false};
2134 if (params[
"toroidal-x"].as<int>()) specs[0] =
true;
2135 if (params[
"toroidal-y"].as<int>()) specs[1] =
true;
2136 if (params[
"toroidal-z"].as<int>()) specs[2] =
true;
2142 return Map(
domain, predicate, metric, specs);
2158 template<u
int32_t p,
typename Po
intRange>
2170 typename Map::PeriodicitySpec specs = {
false,
false,
false};
2171 if (params[
"toroidal-x"].as<int>()) specs[0] =
true;
2172 if (params[
"toroidal-y"].as<int>()) specs[1] =
true;
2173 if (params[
"toroidal-z"].as<int>()) specs[2] =
true;
2178 return Map(*
domain, predicate, metric, specs);
2197 template<u
int32_t p,
typename Po
intRange>
2209 typename Map::PeriodicitySpec specs = {
false,
false,
false};
2210 if (params[
"toroidal-x"].as<int>()) specs[0] =
true;
2211 if (params[
"toroidal-y"].as<int>()) specs[1] =
true;
2212 if (params[
"toroidal-z"].as<int>()) specs[2] =
true;
2217 return Map(
domain, predicate, metric, specs);
2236 template<u
int32_t p,
typename Po
intRange>
2248 typename Map::PeriodicitySpec specs = {
false,
false,
false};
2249 if (params[
"toroidal-x"].as<int>()) specs[0] =
true;
2250 if (params[
"toroidal-y"].as<int>()) specs[1] =
true;
2251 if (params[
"toroidal-z"].as<int>()) specs[2] =
true;
2256 return Map(*
domain, predicate, metric, specs);
2273 template<u
int32_t p,
typename Po
intRangeSites,
typename Po
intRange>
2276 const PointRangeSites& sites,
2283 Point pmin = *points.begin();
2287 for (
auto it = points.begin(); it != points.end(); ++it)
2290 for (
size_t i = 0; i < Space::dimension; ++i)
2292 pmin[i] = std::min(pmin[i], (*it)[i] - 1);
2293 pmax[i] = std::max(pmax[i], (*it)[i] + 1);
2297 for (
auto it = sites.begin(); it != sites.end(); ++it)
2299 for (
size_t i = 0; i < Space::dimension; ++i)
2301 pmin[i] = std::min(pmin[i], (*it)[i] - 1);
2302 pmax[i] = std::max(pmax[i], (*it)[i] + 1);
2313 typename Map::PeriodicitySpec specs = {
false,
false,
false};
2314 if (params[
"toroidal-x"].as<int>()) specs[0] =
true;
2315 if (params[
"toroidal-y"].as<int>()) specs[1] =
true;
2316 if (params[
"toroidal-z"].as<int>()) specs[2] =
true;
2318 auto map =
Map(
domain, predicate, metric, specs);
2320 std::vector<Vector> directions(pCount);
2322 for (
auto it = points.begin(); it != points.end(); ++it)
2324 directions[i++] = map(*it);
2343 template<u
int32_t p,
typename Po
intRangeSites,
typename Po
intRange>
2346 const PointRangeSites& sites,
2353 Point pmin = *points.begin();
2357 for (
auto it = points.begin(); it != points.end(); ++it)
2360 for (
size_t i = 0; i < Space::dimension; ++i)
2362 pmin[i] = std::min(pmin[i], (*it)[i] - 1);
2363 pmax[i] = std::max(pmax[i], (*it)[i] + 1);
2367 for (
auto it = sites.begin(); it != sites.end(); ++it)
2369 for (
size_t i = 0; i < Space::dimension; ++i)
2371 pmin[i] = std::min(pmin[i], (*it)[i] - 1);
2372 pmax[i] = std::max(pmax[i], (*it)[i] + 1);
2382 typename Map::PeriodicitySpec specs = {
false,
false,
false};
2383 if (params[
"toroidal-x"].as<int>()) specs[0] =
true;
2384 if (params[
"toroidal-y"].as<int>()) specs[1] =
true;
2385 if (params[
"toroidal-z"].as<int>()) specs[2] =
true;
2387 auto map =
Map(
domain, predicate, metric, specs);
2389 std::vector<typename Metric::Value> directions(pCount);
2391 for (
auto it = points.begin(); it != points.end(); ++it)
2393 directions[i++] = map(*it);
2473#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())
LightDigitalSurface::Face Face
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