DGtal  1.3.beta
ShortcutsGeometry.h
1 
17 #pragma once
18 
31 #if defined(ShortcutsGeometry_RECURSES)
32 #error Recursive header files inclusion detected in ShortcutsGeometry.h
33 #else // defined(ShortcutsGeometry_RECURSES)
34 
35 #define ShortcutsGeometry_RECURSES
36 
37 #if !defined ShortcutsGeometry_h
38 
39 #define ShortcutsGeometry_h
40 
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"
51 
52 #if defined(WITH_EIGEN)
53 #include "DGtal/dec/DiscreteExteriorCalculusFactory.h"
54 #include "DGtal/dec/ATSolver2D.h"
55 #endif // defined(WITH_EIGEN)
56 
58 namespace DGtal
59 {
60 
61  namespace sgf = ::DGtal::functors::ShapeGeometricFunctors;
62 
64  // template class ShortcutsGeometry
75  template < typename TKSpace >
76  class ShortcutsGeometry : public Shortcuts< TKSpace >
77  {
79  public:
83  using Base::getKSpace;
85 
86  // ----------------------- Usual space types --------------------------------------
87  public:
88 
90  typedef TKSpace KSpace;
92  typedef typename KSpace::Space Space;
94  typedef typename Space::Integer Integer;
96  typedef typename Space::Point Point;
98  typedef typename Space::Vector Vector;
100  typedef typename Space::RealVector RealVector;
102  typedef typename Space::RealPoint RealPoint;
104  typedef typename RealVector::Component Scalar;
108  typedef unsigned char GrayScale;
109 
110  // ----------------------- Shortcut types --------------------------------------
111  public:
128  typedef typename KSpace::SurfelSet SurfelSet;
133  typedef ::DGtal::DigitalSurface< LightSurfaceContainer > LightDigitalSurface;
137  typedef ::DGtal::DigitalSurface< ExplicitSurfaceContainer > DigitalSurface;
141  typedef typename LightDigitalSurface::Cell Cell;
144  typedef typename LightDigitalSurface::Arc Arc;
145  typedef typename LightDigitalSurface::Face Face;
149  typedef typename IdxDigitalSurface::Arc IdxArc;
151  typedef std::set< IdxSurfel > IdxSurfelSet;
152  typedef std::vector< Surfel > SurfelRange;
153  typedef std::vector< Cell > CellRange;
154  typedef std::vector< IdxSurfel > IdxSurfelRange;
155  typedef std::vector< Scalar > Scalars;
156  typedef std::vector< RealVector > RealVectors;
157  typedef std::vector< RealPoint > RealPoints;
158 
159  typedef ::DGtal::Statistic<Scalar> ScalarStatistic;
160 
170 
172  typedef std::vector< CurvatureTensorQuantity > CurvatureTensorQuantities;
173 
174 
193 
194  typedef ::DGtal::Mesh<RealPoint> Mesh;
195  typedef ::DGtal::TriangulatedSurface<RealPoint> TriangulatedSurface;
196  typedef ::DGtal::PolygonalSurface<RealPoint> PolygonalSurface;
197  typedef std::map<Surfel, IdxSurfel> Surfel2Index;
198  typedef std::map<Cell, IdxVertex> Cell2Index;
199 
200  // ----------------------- Static services --------------------------------------
201  public:
202 
203  // ----------------------- Exact geometry services ------------------------------
206  public:
207 
210  {
211  return parametersShapeGeometry()
214  }
215 
223  {
224  return Parameters
225  ( "projectionMaxIter", 20 )
226  ( "projectionAccuracy", 0.0001 )
227  ( "projectionGamma", 0.5 )
228  ( "gridstep", 1.0 );
229  }
230 
249  static RealPoints
252  const KSpace& K,
253  const SurfelRange& surfels,
254  const Parameters& params = parametersShapeGeometry() )
255  {
256  RealVectors n_true_estimations;
257  TruePositionEstimator true_estimator;
258  int maxIter = params[ "projectionMaxIter" ].as<int>();
259  double accuracy = params[ "projectionAccuracy" ].as<double>();
260  double gamma = params[ "projectionGamma" ].as<double>();
261  Scalar gridstep = params[ "gridstep" ].as<Scalar>();
262  true_estimator.attach( *shape );
263  true_estimator.setParams( K, PositionFunctor(), maxIter, accuracy, gamma );
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;
268  }
269 
283  static RealPoints
286  const RealPoints& points,
287  const Parameters& params = parametersShapeGeometry() )
288  {
289  RealPoints proj_points( points.size() );
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,
295  maxIter, gamma );
296  return proj_points;
297  }
298 
317  static RealVectors
320  const KSpace& K,
321  const SurfelRange& surfels,
322  const Parameters& params = parametersShapeGeometry() )
323  {
324  RealVectors n_true_estimations;
325  TrueNormalEstimator true_estimator;
326  int maxIter = params[ "projectionMaxIter" ].as<int>();
327  double accuracy = params[ "projectionAccuracy" ].as<double>();
328  double gamma = params[ "projectionGamma" ].as<double>();
329  Scalar gridstep = params[ "gridstep" ].as<Scalar>();
330  true_estimator.attach( *shape );
331  true_estimator.setParams( K, NormalFunctor(), maxIter, accuracy, gamma );
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;
336  }
337 
356  static Scalars
359  const KSpace& K,
360  const SurfelRange& surfels,
361  const Parameters& params = parametersShapeGeometry() )
362  {
363  Scalars n_true_estimations;
364  TrueMeanCurvatureEstimator true_estimator;
365  int maxIter = params[ "projectionMaxIter" ].as<int>();
366  double accuracy = params[ "projectionAccuracy" ].as<double>();
367  double gamma = params[ "projectionGamma" ].as<double>();
368  Scalar gridstep = params[ "gridstep" ].as<Scalar>();
369  true_estimator.attach( *shape );
370  true_estimator.setParams( K, MeanCurvatureFunctor(), maxIter, accuracy, gamma );
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;
375  }
376 
396  static Scalars
399  const KSpace& K,
400  const SurfelRange& surfels,
401  const Parameters& params = parametersShapeGeometry() )
402  {
403  Scalars n_true_estimations;
404  TrueGaussianCurvatureEstimator true_estimator;
405  int maxIter = params[ "projectionMaxIter" ].as<int>();
406  double accuracy = params[ "projectionAccuracy" ].as<double>();
407  double gamma = params[ "projectionGamma" ].as<double>();
408  Scalar gridstep = params[ "gridstep" ].as<Scalar>();
409  true_estimator.attach( *shape );
410  true_estimator.setParams( K, GaussianCurvatureFunctor(), maxIter, accuracy, gamma );
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;
415  }
416 
437  static Scalars
440  const KSpace& K,
441  const SurfelRange& surfels,
442  const Parameters& params = parametersShapeGeometry() )
443  {
444  Scalars n_true_estimations;
446  int maxIter = params[ "projectionMaxIter" ].as<int>();
447  double accuracy = params[ "projectionAccuracy" ].as<double>();
448  double gamma = params[ "projectionGamma" ].as<double>();
449  Scalar gridstep = params[ "gridstep" ].as<Scalar>();
450  true_estimator.attach( *shape );
451  true_estimator.setParams( K, FirstPrincipalCurvatureFunctor(),
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;
457  }
458 
479  static Scalars
482  const KSpace& K,
483  const SurfelRange& surfels,
484  const Parameters& params = parametersShapeGeometry() )
485  {
486  Scalars n_true_estimations;
488  int maxIter = params[ "projectionMaxIter" ].as<int>();
489  double accuracy = params[ "projectionAccuracy" ].as<double>();
490  double gamma = params[ "projectionGamma" ].as<double>();
491  Scalar gridstep = params[ "gridstep" ].as<Scalar>();
492  true_estimator.attach( *shape );
493  true_estimator.setParams( K, SecondPrincipalCurvatureFunctor(),
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;
499  }
500 
521  static RealVectors
524  const KSpace& K,
525  const SurfelRange& surfels,
526  const Parameters& params = parametersShapeGeometry() )
527  {
528  RealVectors n_true_estimations;
530  int maxIter = params[ "projectionMaxIter" ].as<int>();
531  double accuracy = params[ "projectionAccuracy" ].as<double>();
532  double gamma = params[ "projectionGamma" ].as<double>();
533  Scalar gridstep = params[ "gridstep" ].as<Scalar>();
534  true_estimator.attach( *shape );
535  true_estimator.setParams( K, FirstPrincipalDirectionFunctor(),
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;
541  }
542 
563  static RealVectors
566  const KSpace& K,
567  const SurfelRange& surfels,
568  const Parameters& params = parametersShapeGeometry() )
569  {
570  RealVectors n_true_estimations;
572  int maxIter = params[ "projectionMaxIter" ].as<int>();
573  double accuracy = params[ "projectionAccuracy" ].as<double>();
574  double gamma = params[ "projectionGamma" ].as<double>();
575  Scalar gridstep = params[ "gridstep" ].as<Scalar>();
576  true_estimator.attach( *shape );
577  true_estimator.setParams( K, SecondPrincipalDirectionFunctor(),
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;
583  }
584 
609  const KSpace& K,
610  const SurfelRange& surfels,
611  const Parameters& params = parametersShapeGeometry() )
612  {
613  CurvatureTensorQuantities n_true_estimations;
615  int maxIter = params[ "projectionMaxIter" ].as<int>();
616  double accuracy = params[ "projectionAccuracy" ].as<double>();
617  double gamma = params[ "projectionGamma" ].as<double>();
618  Scalar gridstep = params[ "gridstep" ].as<Scalar>();
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;
626  }
627 
629 
630  // --------------------------- geometry estimation ------------------------------
633  public:
634 
645  {
646  return Parameters
647  ( "verbose", 1 )
648  ( "t-ring", 3.0 )
649  ( "kernel", "hat" )
650  ( "R-radius", 10.0 )
651  ( "r-radius", 3.0 )
652  ( "alpha", 0.33 )
653  ( "surfelEmbedding", 0 );
654  }
655 
665  static RealVectors
667  const SurfelRange& surfels )
668  {
669  std::vector< RealVector > result;
670  for ( auto s : surfels )
671  {
672  Dimension k = K.sOrthDir( s );
673  bool direct = K.sDirect( s, k );
675  t[ k ] = direct ? -1.0 : 1.0;
676  result.push_back( t );
677  }
678  return result;
679  }
680 
696  template <typename TAnyDigitalSurface>
697  static RealVectors
700  const SurfelRange& surfels,
701  const Parameters& params = parametersGeometryEstimation() )
702  {
703  int verbose = params[ "verbose" ].as<int>();
704  Scalar t = params[ "t-ring" ].as<double>();
705  typedef typename TAnyDigitalSurface::DigitalSurfaceContainer SurfaceContainer;
706  typedef LpMetric<Space> Metric;
709  < Surfel, CanonicSCellEmbedder<KSpace> > SurfelFunctor;
711  < SurfaceContainer, Metric, SurfelFunctor, Functor> NormalEstimator;
712  if ( verbose > 0 )
713  trace.info() << "- CTrivial normal t-ring=" << t << " (discrete)" << std::endl;
714  const Functor fct( 1.0, t );
715  const KSpace & K = surface->container().space();
716  Metric aMetric( 2.0 );
717  CanonicSCellEmbedder<KSpace> canonic_embedder( K );
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(),
727  [] ( RealVector v ) { return -v; } );
728  return n_estimations;
729  }
730 
752  template <typename TAnyDigitalSurface>
753  static RealVectors
756  const SurfelRange& surfels,
757  const Parameters& params = parametersGeometryEstimation() )
758  {
760  typedef typename TAnyDigitalSurface::DigitalSurfaceContainer SurfaceContainer;
761  RealVectors n_estimations;
762  int verbose = params[ "verbose" ].as<int>();
763  std::string kernel = params[ "kernel" ].as<std::string>();
764  Scalar h = params[ "gridstep" ].as<Scalar>();
765  Scalar R = params[ "R-radius" ].as<Scalar>();
766  Scalar r = params[ "r-radius" ].as<Scalar>();
767  Scalar t = params[ "t-ring" ].as<Scalar>();
768  Scalar alpha = params[ "alpha" ].as<Scalar>();
769  int embedding = params[ "embedding" ].as<int>();
770  // Adjust parameters according to gridstep if specified.
771  if ( alpha != 1.0 ) R *= pow( h, alpha-1.0 );
772  if ( alpha != 1.0 ) r *= pow( h, alpha-1.0 );
773  Surfel2PointEmbedding embType = embedding == 0 ? Pointels :
774  embedding == 1 ? InnerSpel : OuterSpel;
775  if ( verbose > 0 )
776  {
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;
784  }
785  if ( kernel == "hat" )
786  {
787  typedef functors::HatPointFunction<Point,Scalar> KernelFunction;
789  < SurfaceContainer, Metric, KernelFunction > VCMOnSurface;
790  typedef functors::VCMNormalVectorFunctor<VCMOnSurface> NormalVFunctor;
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 ) );
800  }
801  else if ( kernel == "ball" )
802  {
805  < SurfaceContainer, Metric, KernelFunction > VCMOnSurface;
806  typedef functors::VCMNormalVectorFunctor<VCMOnSurface> NormalVFunctor;
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 ) );
816  }
817  else
818  {
819  trace.warning() << "[ShortcutsGeometry::getVCMNormalVectors] Unknown kernel: "
820  << kernel << std::endl;
821  }
822  return n_estimations;
823  }
824 
847  static RealVectors
849  const SurfelRange& surfels,
850  const Parameters& params
852  | parametersKSpace() )
853  {
854  auto K = getKSpace( bimage, params );
855  return getIINormalVectors( *bimage, K, surfels, params );
856  }
857 
887  static RealVectors
889  const SurfelRange& surfels,
890  const Parameters& params
892  | parametersKSpace()
894  {
895  auto K = getKSpace( params );
896  return getIINormalVectors( *dshape, K, surfels, params );
897  }
898 
923  template <typename TPointPredicate>
924  static RealVectors
925  getIINormalVectors( const TPointPredicate& shape,
926  const KSpace& K,
927  const SurfelRange& surfels,
928  const Parameters& params
930  | parametersKSpace() )
931  {
932  typedef functors::IINormalDirectionFunctor<Space> IINormalFunctor;
934  <KSpace, TPointPredicate, IINormalFunctor> IINormalEstimator;
935 
936  RealVectors n_estimations;
937  int verbose = params[ "verbose" ].as<int>();
938  Scalar h = params[ "gridstep" ].as<Scalar>();
939  Scalar r = params[ "r-radius" ].as<Scalar>();
940  Scalar alpha = params[ "alpha" ].as<Scalar>();
941  if ( alpha != 1.0 ) r *= pow( h, alpha-1.0 );
942  if ( verbose > 0 )
943  {
944  trace.info() << "- II normal alpha=" << alpha << std::endl;
945  trace.info() << "- II normal r=" << (r*h) << " (continuous) "
946  << r << " (discrete)" << std::endl;
947  }
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 ) );
956  const RealVectors n_trivial = getTrivialNormalVectors( K, surfels );
957  orientVectors( n_estimations, n_trivial );
958  return n_estimations;
959  }
960 
961 
980  static Scalars
982  const SurfelRange& surfels,
983  const Parameters& params
985  | parametersKSpace() )
986  {
987  auto K = getKSpace( bimage, params );
988  return getIIMeanCurvatures( *bimage, K, surfels, params );
989  }
990 
1016  static Scalars
1018  const SurfelRange& surfels,
1019  const Parameters& params
1021  | parametersKSpace()
1023  {
1024  auto K = getKSpace( params );
1025  return getIIMeanCurvatures( *dshape, K, surfels, params );
1026  }
1027 
1028 
1050  template <typename TPointPredicate>
1051  static Scalars
1052  getIIMeanCurvatures( const TPointPredicate& shape,
1053  const KSpace& K,
1054  const SurfelRange& surfels,
1055  const Parameters& params
1057  | parametersKSpace() )
1058  {
1059  typedef functors::IIMeanCurvature3DFunctor<Space> IIMeanCurvFunctor;
1061  <KSpace, TPointPredicate, IIMeanCurvFunctor> IIMeanCurvEstimator;
1062 
1063  Scalars mc_estimations;
1064  int verbose = params[ "verbose" ].as<int>();
1065  Scalar h = params[ "gridstep" ].as<Scalar>();
1066  Scalar r = params[ "r-radius" ].as<Scalar>();
1067  Scalar alpha = params[ "alpha" ].as<Scalar>();
1068  if ( alpha != 1.0 ) r *= pow( h, alpha-1.0 );
1069  if ( verbose > 0 )
1070  {
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;
1074  }
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;
1084  }
1085 
1104  static Scalars
1106  const SurfelRange& surfels,
1107  const Parameters& params
1109  | parametersKSpace() )
1110  {
1111  auto K = getKSpace( bimage, params );
1112  return getIIGaussianCurvatures( *bimage, K, surfels, params );
1113  }
1114 
1140  static Scalars
1142  const SurfelRange& surfels,
1143  const Parameters& params
1145  | parametersKSpace()
1147  {
1148  auto K = getKSpace( params );
1149  return getIIGaussianCurvatures( *dshape, K, surfels, params );
1150  }
1151 
1152 
1174  template <typename TPointPredicate>
1175  static Scalars
1176  getIIGaussianCurvatures( const TPointPredicate& shape,
1177  const KSpace& K,
1178  const SurfelRange& surfels,
1179  const Parameters& params
1181  | parametersKSpace() )
1182  {
1183  typedef functors::IIGaussianCurvature3DFunctor<Space> IIGaussianCurvFunctor;
1185  <KSpace, TPointPredicate, IIGaussianCurvFunctor> IIGaussianCurvEstimator;
1186 
1187  Scalars mc_estimations;
1188  int verbose = params[ "verbose" ].as<int>();
1189  Scalar h = params[ "gridstep" ].as<Scalar>();
1190  Scalar r = params[ "r-radius" ].as<Scalar>();
1191  Scalar alpha = params[ "alpha" ].as<Scalar>();
1192  if ( alpha != 1.0 ) r *= pow( h, alpha-1.0 );
1193  if ( verbose > 0 )
1194  {
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;
1198  }
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;
1208  }
1209 
1231  const SurfelRange& surfels,
1232  const Parameters& params
1234  | parametersKSpace() )
1235  {
1236  auto K = getKSpace( bimage, params );
1237  return getIIPrincipalCurvaturesAndDirections( *bimage, K, surfels, params );
1238  }
1239 
1268  const SurfelRange& surfels,
1269  const Parameters& params
1271  | parametersKSpace()
1273  {
1274  auto K = getKSpace( params );
1275  return getIIPrincipalCurvaturesAndDirections( *dshape, K, surfels, params );
1276  }
1277 
1278 
1300  template <typename TPointPredicate>
1302  getIIPrincipalCurvaturesAndDirections( const TPointPredicate& shape,
1303  const KSpace& K,
1304  const SurfelRange& surfels,
1305  const Parameters& params
1307  | parametersKSpace() )
1308  {
1311 
1312  CurvatureTensorQuantities mc_estimations;
1313  int verbose = params[ "verbose" ].as<int>();
1314  Scalar h = params[ "gridstep" ].as<Scalar>();
1315  Scalar r = params[ "r-radius" ].as<Scalar>();
1316  Scalar alpha = params[ "alpha" ].as<Scalar>();
1317  if ( alpha != 1.0 ) r *= pow( h, alpha-1.0 );
1318  if ( verbose > 0 )
1319  {
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;
1323  }
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;
1333  }
1334 
1336 
1337  // --------------------------- AT approximation ------------------------------
1340  public:
1341 
1356  {
1357 #if defined(WITH_EIGEN)
1358  return Parameters
1359  ( "at-enabled", 1 )
1360  ( "at-alpha", 0.1 )
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" );
1368 #else // defined(WITH_EIGEN)
1369  return Parameters( "at-enabled", 0 );
1370 #endif// defined(WITH_EIGEN)
1371  }
1372 
1373 #if defined(WITH_EIGEN)
1374 
1398  template <typename TAnyDigitalSurface,
1399  typename VectorFieldInput>
1400  static
1401  VectorFieldInput
1403  const SurfelRange& surfels,
1404  const VectorFieldInput& input,
1405  const Parameters& params
1407  {
1408  int verbose = params[ "verbose" ].as<int>();
1409  Scalar alpha_at = params[ "at-alpha" ].as<Scalar>();
1410  Scalar lambda_at = params[ "at-lambda" ].as<Scalar>();
1411  Scalar epsilon1 = params[ "at-epsilon-start" ].as<Scalar>();
1412  Scalar epsilon2 = params[ "at-epsilon" ].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() );
1418  ATSolver2D< KSpace > at_solver( calculus, verbose );
1419  at_solver.initInputVectorFieldU2( input, surfels.cbegin(), surfels.cend() );
1420  at_solver.setUp( alpha_at, lambda_at );
1421  at_solver.solveGammaConvergence( epsilon1, epsilon2, epsilonr, false, diff_v_max, max_iter );
1422  auto output = input;
1423  at_solver.getOutputVectorFieldU2( output, surfels.cbegin(), surfels.cend() );
1424  return output;
1425  }
1426 
1458  template <typename TAnyDigitalSurface,
1459  typename VectorFieldInput,
1460  typename CellRangeConstIterator>
1461  static
1462  VectorFieldInput
1464  CellRangeConstIterator itB,
1465  CellRangeConstIterator itE,
1467  const SurfelRange& surfels,
1468  const VectorFieldInput& input,
1469  const Parameters& params
1471  {
1472  int verbose = params[ "verbose" ].as<int>();
1473  Scalar alpha_at = params[ "at-alpha" ].as<Scalar>();
1474  Scalar lambda_at = params[ "at-lambda" ].as<Scalar>();
1475  Scalar epsilon1 = params[ "at-epsilon-start" ].as<Scalar>();
1476  Scalar epsilon2 = params[ "at-epsilon" ].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() );
1483  ATSolver2D< KSpace > at_solver( calculus, verbose );
1484  at_solver.initInputVectorFieldU2( input, surfels.cbegin(), surfels.cend() );
1485  at_solver.setUp( alpha_at, lambda_at );
1486  at_solver.solveGammaConvergence( epsilon1, epsilon2, epsilonr, false, diff_v_max, max_iter );
1487  auto output = input;
1488  at_solver.getOutputVectorFieldU2( output, surfels.cbegin(), surfels.cend() );
1489  auto p = ( policy == "Average" ) ? at_solver.Average
1490  : ( policy == "Minimum" ) ? at_solver.Minimum
1491  : at_solver.Maximum;
1492  at_solver.getOutputScalarFieldV0( features, itB, itE, p );
1493  return output;
1494  }
1495 
1520  template <typename TAnyDigitalSurface>
1521  static
1522  Scalars
1524  const SurfelRange& surfels,
1525  const Scalars& input,
1526  const Parameters& params
1528  {
1529  int verbose = params[ "verbose" ].as<int>();
1530  Scalar alpha_at = params[ "at-alpha" ].as<Scalar>();
1531  Scalar lambda_at = params[ "at-lambda" ].as<Scalar>();
1532  Scalar epsilon1 = params[ "at-epsilon-start" ].as<Scalar>();
1533  Scalar epsilon2 = params[ "at-epsilon" ].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() );
1539  ATSolver2D< KSpace > at_solver( calculus, verbose );
1540  at_solver.initInputScalarFieldU2( input, surfels.cbegin(), surfels.cend() );
1541  at_solver.setUp( alpha_at, lambda_at );
1542  at_solver.solveGammaConvergence( epsilon1, epsilon2, epsilonr, false, diff_v_max, max_iter );
1543  auto output = input;
1544  at_solver.getOutputScalarFieldU2( output, surfels.cbegin(), surfels.cend() );
1545  return output;
1546  }
1547 
1583  template <typename TAnyDigitalSurface,
1584  typename CellRangeConstIterator>
1585  static
1586  Scalars
1588  CellRangeConstIterator itB,
1589  CellRangeConstIterator itE,
1591  const SurfelRange& surfels,
1592  const Scalars& input,
1593  const Parameters& params
1595  {
1596  int verbose = params[ "verbose" ].as<int>();
1597  Scalar alpha_at = params[ "at-alpha" ].as<Scalar>();
1598  Scalar lambda_at = params[ "at-lambda" ].as<Scalar>();
1599  Scalar epsilon1 = params[ "at-epsilon-start" ].as<Scalar>();
1600  Scalar epsilon2 = params[ "at-epsilon" ].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() );
1607  ATSolver2D< KSpace > at_solver( calculus, verbose );
1608  at_solver.initInputScalarFieldU2( input, surfels.cbegin(), surfels.cend() );
1609  at_solver.setUp( alpha_at, lambda_at );
1610  at_solver.solveGammaConvergence( epsilon1, epsilon2, epsilonr, false, diff_v_max, max_iter );
1611  auto output = input;
1612  at_solver.getOutputScalarFieldU2( output, surfels.cbegin(), surfels.cend() );
1613  auto p = ( policy == "Average" ) ? at_solver.Average
1614  : ( policy == "Minimum" ) ? at_solver.Minimum
1615  : at_solver.Maximum;
1616  at_solver.getOutputScalarFieldV0( features, itB, itE, p );
1617  return output;
1618  }
1619 
1620 #endif // defined(WITH_EIGEN)
1621 
1623 
1624  // ------------------------- Error measures services -------------------------
1627  public:
1628 
1634  static void
1636  const RealVectors& ref_v )
1637  {
1638  std::transform( ref_v.cbegin(), ref_v.cend(), v.cbegin(), v.begin(),
1639  [] ( RealVector rw, RealVector w )
1640  { return rw.dot( w ) >= 0.0 ? w : -w; } );
1641  }
1642 
1647  static ScalarStatistic
1648  getStatistic( const Scalars& v )
1649  {
1650  ScalarStatistic stat;
1651  stat.addValues( v.begin(), v.end() );
1652  stat.terminate();
1653  return stat;
1654  }
1655 
1662  static Scalars
1664  const RealVectors& v2 )
1665  {
1666  Scalars v( v1.size() );
1667  if ( v1.size() == v2.size() )
1668  {
1669  auto outIt = v.begin();
1670  for ( auto it1 = v1.cbegin(), it2 = v2.cbegin(), itE1 = v1.cend();
1671  it1 != itE1; ++it1, ++it2 )
1672  {
1673  Scalar angle_error = acos( (*it1).dot( *it2 ) );
1674  *outIt++ = angle_error;
1675  }
1676  }
1677  else
1678  {
1679  trace.warning() << "[ShortcutsGeometry::getVectorsAngleDeviation]"
1680  << " v1.size()=" << v1.size() << " should be equal to "
1681  << " v2.size()=" << v2.size() << std::endl;
1682  }
1683  return v;
1684  }
1685 
1690  static Scalars
1692  const Scalars & v2 )
1693  {
1694  Scalars result( v1.size() );
1695  std::transform( v2.cbegin(), v2.cend(), v1.cbegin(), result.begin(),
1696  [] ( Scalar val1, Scalar val2 )
1697  { return fabs( val1 - val2 ); } );
1698  return result;
1699  }
1700 
1707  static Scalar
1709  const Scalars & v2 )
1710  {
1711  Scalar sum = 0;
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() );
1715  }
1716 
1723  static Scalar
1725  const Scalars & v2 )
1726  {
1727  Scalar sum = 0;
1728  for ( unsigned int i = 0; i < v1.size(); i++ )
1729  sum += fabs( v1[ i ] - v2[ i ] );
1730  return sum / v1.size();
1731  }
1732 
1739  static Scalar
1741  const Scalars & v2 )
1742  {
1743  Scalar loo = 0;
1744  for ( unsigned int i = 0; i < v1.size(); i++ )
1745  loo = std::max( loo, fabs( v1[ i ] - v2[ i ] ) );
1746  return loo;
1747  }
1748 
1750 
1751  // ----------------------- Standard services ------------------------------
1754  public:
1755 
1759  ShortcutsGeometry() = delete;
1760 
1764  ~ShortcutsGeometry() = delete;
1765 
1770  ShortcutsGeometry ( const ShortcutsGeometry & other ) = delete;
1771 
1776  ShortcutsGeometry ( ShortcutsGeometry && other ) = delete;
1777 
1783  ShortcutsGeometry & operator= ( const ShortcutsGeometry & other ) = delete;
1784 
1790  ShortcutsGeometry & operator= ( ShortcutsGeometry && other ) = delete;
1791 
1793 
1794  // ----------------------- Interface --------------------------------------
1795  public:
1796 
1797  // ------------------------- Protected Datas ------------------------------
1798  protected:
1799 
1800  // ------------------------- Private Datas --------------------------------
1801  private:
1802 
1803  // ------------------------- Hidden services ------------------------------
1804  protected:
1805 
1806  // ------------------------- Internals ------------------------------------
1807  private:
1808 
1809  }; // end of class ShortcutsGeometry
1810 
1811 
1812 } // namespace DGtal
1813 
1814 
1816 // Includes inline functions.
1817 
1818 // //
1820 
1821 #endif // !defined ShortcutsGeometry_h
1822 
1823 #undef ShortcutsGeometry_RECURSES
1824 #endif // else defined(ShortcutsGeometry_RECURSES)
1825 
DGtal::DigitalSurface::ArcRange
std::vector< Arc > ArcRange
The range of arcs is defined as a vector.
Definition: DigitalSurface.h:301
DGtal::ShortcutsGeometry::SCell
LightDigitalSurface::SCell SCell
Definition: ShortcutsGeometry.h:142
DGtal::GaussDigitizer
Aim: A class for computing the Gauss digitization of some Euclidean shape, i.e. its intersection with...
Definition: GaussDigitizer.h:79
DGtal::ATSolver2D::Minimum
@ Minimum
compute minimum value at cell vertices,
Definition: ATSolver2D.h:104
DGtal::ShortcutsGeometry::IdxVertex
IdxDigitalSurface::Vertex IdxVertex
Definition: ShortcutsGeometry.h:148
DGtal::functors::ElementaryConvolutionNormalVectorEstimator
Aim: Estimates normal vector by convolution of elementary normal vector to adjacent surfel.
Definition: ElementaryConvolutionNormalVectorEstimator.h:75
DGtal::DigitalSurface::Face
Definition: DigitalSurface.h:278
DGtal::ShortcutsGeometry::getIIGaussianCurvatures
static Scalars getIIGaussianCurvatures(const TPointPredicate &shape, const KSpace &K, const SurfelRange &surfels, const Parameters &params=parametersGeometryEstimation()|parametersKSpace())
Definition: ShortcutsGeometry.h:1176
DGtal::ShortcutsGeometry::BOOST_CONCEPT_ASSERT
BOOST_CONCEPT_ASSERT((concepts::CCellularGridSpaceND< TKSpace >))
DGtal::ShortcutsGeometry::getIINormalVectors
static RealVectors getIINormalVectors(CountedPtr< BinaryImage > bimage, const SurfelRange &surfels, const Parameters &params=parametersGeometryEstimation()|parametersKSpace())
Definition: ShortcutsGeometry.h:848
DGtal::ATSolver2D::getOutputVectorFieldU2
void getOutputVectorFieldU2(VectorFieldOutput &output, SurfelRangeConstIterator itB, SurfelRangeConstIterator itE)
Definition: ATSolver2D.h:771
DGtal::PointVector::zero
static Self zero
Static const for zero PointVector.
Definition: PointVector.h:1595
DGtal::ShortcutsGeometry::getScalarsNormL2
static Scalar getScalarsNormL2(const Scalars &v1, const Scalars &v2)
Definition: ShortcutsGeometry.h:1708
DGtal::ShortcutsGeometry::TrueSecondPrincipalCurvatureEstimator
TrueDigitalSurfaceLocalEstimator< KSpace, ImplicitShape3D, SecondPrincipalCurvatureFunctor > TrueSecondPrincipalCurvatureEstimator
Definition: ShortcutsGeometry.h:186
DGtal::ShortcutsGeometry::getCTrivialNormalVectors
static RealVectors getCTrivialNormalVectors(CountedPtr< TAnyDigitalSurface > surface, const SurfelRange &surfels, const Parameters &params=parametersGeometryEstimation())
Definition: ShortcutsGeometry.h:699
DGtal::ShortcutsGeometry::getIINormalVectors
static RealVectors getIINormalVectors(const TPointPredicate &shape, const KSpace &K, const SurfelRange &surfels, const Parameters &params=parametersGeometryEstimation()|parametersKSpace())
Definition: ShortcutsGeometry.h:925
DGtal::ShortcutsGeometry::PositionFunctor
sgf::ShapePositionFunctor< ImplicitShape3D > PositionFunctor
Definition: ShortcutsGeometry.h:161
DGtal::ShortcutsGeometry::GrayScaleImage
ImageContainerBySTLVector< Domain, GrayScale > GrayScaleImage
defines a grey-level image with (hyper-)rectangular domain.
Definition: ShortcutsGeometry.h:122
DGtal::ShortcutsGeometry::~ShortcutsGeometry
~ShortcutsGeometry()=delete
DGtal::ATSolver2D::setUp
void setUp(double a, double l)
Definition: ATSolver2D.h:444
DGtal::HyperRectDomain< Space >
DGtal::ShortcutsGeometry::getGaussianCurvatures
static Scalars getGaussianCurvatures(CountedPtr< ImplicitShape3D > shape, const KSpace &K, const SurfelRange &surfels, const Parameters &params=parametersShapeGeometry())
Definition: ShortcutsGeometry.h:398
DGtal::ShortcutsGeometry::TruePrincipalCurvaturesAndDirectionsEstimator
TrueDigitalSurfaceLocalEstimator< KSpace, ImplicitShape3D, PrincipalCurvaturesAndDirectionsFunctor > TruePrincipalCurvaturesAndDirectionsEstimator
Definition: ShortcutsGeometry.h:192
DGtal::functors::ShapeGeometricFunctors::ShapeMeanCurvatureFunctor
Aim: A functor RealPoint -> Quantity that returns the mean curvature at given point.
Definition: ShapeGeometricFunctors.h:169
DGtal::KhalimskySpaceND::SurfelSet
std::set< SCell > SurfelSet
Preferred type for defining a set of surfels (always signed cells).
Definition: KhalimskySpaceND.h:450
DGtal::ShortcutsGeometry::getFirstPrincipalCurvatures
static Scalars getFirstPrincipalCurvatures(CountedPtr< ImplicitShape3D > shape, const KSpace &K, const SurfelRange &surfels, const Parameters &params=parametersShapeGeometry())
Definition: ShortcutsGeometry.h:439
DGtal::IndexedDigitalSurface::Arc
HalfEdgeDataStructure::HalfEdgeIndex Arc
Definition: IndexedDigitalSurface.h:132
DGtal::ShortcutsGeometry::Self
ShortcutsGeometry< TKSpace > Self
Definition: ShortcutsGeometry.h:81
max
int max(int a, int b)
Definition: testArithmeticalDSS.cpp:1108
DGtal::IndexedDigitalSurface::Vertex
VertexIndex Vertex
Definition: IndexedDigitalSurface.h:121
DGtal::ImageContainerBySTLVector
Definition: ImageContainerBySTLVector.h:126
DGtal::ShortcutsGeometry::IdxArcRange
IdxDigitalSurface::ArcRange IdxArcRange
Definition: ShortcutsGeometry.h:150
DGtal::Statistic::addValues
void addValues(Iter b, Iter e)
DGtal::functors::ShapeGeometricFunctors::ShapeFirstPrincipalDirectionFunctor
Aim: A functor RealPoint -> RealVector that returns the first principal direction at given point (i....
Definition: ShapeGeometricFunctors.h:385
DGtal::VoronoiCovarianceMeasureOnDigitalSurface
Aim: This class specializes the Voronoi covariance measure for digital surfaces. It adds notably the ...
Definition: VoronoiCovarianceMeasureOnDigitalSurface.h:86
DGtal::TrueDigitalSurfaceLocalEstimator::attach
void attach(ConstAlias< Shape > aShape)
DGtal::ShortcutsGeometry::Base
Shortcuts< TKSpace > Base
Definition: ShortcutsGeometry.h:80
DGtal::ShortcutsGeometry::getMeanCurvatures
static Scalars getMeanCurvatures(CountedPtr< ImplicitShape3D > shape, const KSpace &K, const SurfelRange &surfels, const Parameters &params=parametersShapeGeometry())
Definition: ShortcutsGeometry.h:358
DGtal::IndexedDigitalSurface
Aim: Represents a digital surface with the topology of its dual surface. Its aim is to mimick the sta...
Definition: IndexedDigitalSurface.h:96
DGtal::ShortcutsGeometry::ShortcutsGeometry
ShortcutsGeometry()=delete
DGtal::ShortcutsGeometry::operator=
ShortcutsGeometry & operator=(const ShortcutsGeometry &other)=delete
DGtal::ShortcutsGeometry::LightSurfaceContainer
LightImplicitDigitalSurface< KSpace, BinaryImage > LightSurfaceContainer
Definition: ShortcutsGeometry.h:131
DGtal::ATSolver2D::initInputScalarFieldU2
void initInputScalarFieldU2(const ScalarFieldInput &input, SurfelRangeConstIterator itB, SurfelRangeConstIterator itE)
Definition: ATSolver2D.h:330
DGtal::InnerSpel
@ InnerSpel
Definition: VoronoiCovarianceMeasureOnDigitalSurface.h:58
DGtal::ShortcutsGeometry::TrueSecondPrincipalDirectionEstimator
TrueDigitalSurfaceLocalEstimator< KSpace, ImplicitShape3D, SecondPrincipalDirectionFunctor > TrueSecondPrincipalDirectionEstimator
Definition: ShortcutsGeometry.h:190
DGtal::TrueDigitalSurfaceLocalEstimator::init
void init(const Scalar _h, SurfelConstIterator itb, SurfelConstIterator ite)
DGtal::ShortcutsGeometry::getSecondPrincipalDirections
static RealVectors getSecondPrincipalDirections(CountedPtr< ImplicitShape3D > shape, const KSpace &K, const SurfelRange &surfels, const Parameters &params=parametersShapeGeometry())
Definition: ShortcutsGeometry.h:565
DGtal::ShortcutsGeometry::Surfel
LightDigitalSurface::Surfel Surfel
Definition: ShortcutsGeometry.h:140
DGtal::concepts::CCellularGridSpaceND
Aim: This concept describes a cellular grid space in nD. In these spaces obtained by cartesian produc...
Definition: CCellularGridSpaceND.h:162
DGtal::trace
Trace trace
Definition: Common.h:154
DGtal::ShortcutsGeometry::CurvatureTensorQuantities
std::vector< CurvatureTensorQuantity > CurvatureTensorQuantities
Definition: ShortcutsGeometry.h:172
DGtal::ShortcutsGeometry::Cell2Index
std::map< Cell, IdxVertex > Cell2Index
Definition: ShortcutsGeometry.h:198
K
KSpace K
Definition: testCubicalComplex.cpp:62
DGtal::ATSolver2D::getOutputScalarFieldU2
void getOutputScalarFieldU2(ScalarFieldOutput &output, SurfelRangeConstIterator itB, SurfelRangeConstIterator itE)
Definition: ATSolver2D.h:797
DGtal::Dimension
DGtal::uint32_t Dimension
Definition: Common.h:137
DGtal::ShortcutsGeometry::getIIMeanCurvatures
static Scalars getIIMeanCurvatures(CountedPtr< BinaryImage > bimage, const SurfelRange &surfels, const Parameters &params=parametersGeometryEstimation()|parametersKSpace())
Definition: ShortcutsGeometry.h:981
DGtal::ShortcutsGeometry::getIIPrincipalCurvaturesAndDirections
static CurvatureTensorQuantities getIIPrincipalCurvaturesAndDirections(const TPointPredicate &shape, const KSpace &K, const SurfelRange &surfels, const Parameters &params=parametersGeometryEstimation()|parametersKSpace())
Definition: ShortcutsGeometry.h:1302
DGtal::ShortcutsGeometry::CellRange
std::vector< Cell > CellRange
Definition: ShortcutsGeometry.h:153
DGtal::ShortcutsGeometry::IdxDigitalSurface
IndexedDigitalSurface< ExplicitSurfaceContainer > IdxDigitalSurface
defines a connected or not indexed digital surface.
Definition: ShortcutsGeometry.h:139
DGtal::ShortcutsGeometry::getIIGaussianCurvatures
static Scalars getIIGaussianCurvatures(CountedPtr< BinaryImage > bimage, const SurfelRange &surfels, const Parameters &params=parametersGeometryEstimation()|parametersKSpace())
Definition: ShortcutsGeometry.h:1105
DGtal::functors::ShapeGeometricFunctors::ShapePrincipalCurvaturesAndDirectionsFunctor
Aim: A functor RealPoint -> (Scalar,Scalar,RealVector,RealVector that returns the principal curvature...
Definition: ShapeGeometricFunctors.h:499
DGtal::IntegralInvariantCovarianceEstimator
Aim: This class implement an Integral Invariant estimator which computes for each surfel the covarian...
Definition: IntegralInvariantCovarianceEstimator.h:115
DGtal::ShortcutsGeometry::parametersATApproximation
static Parameters parametersATApproximation()
Definition: ShortcutsGeometry.h:1355
Functor
InHalfPlaneBySimple3x3Matrix< Point, double > Functor
Definition: testConvexHull2DReverse.cpp:51
DGtal::Surfel2PointEmbedding
Surfel2PointEmbedding
Possible embeddings for surfel as point(s)
Definition: VoronoiCovarianceMeasureOnDigitalSurface.h:58
DGtal::functors::IINormalDirectionFunctor
Aim: A functor Matrix -> RealVector that returns the normal direction by diagonalizing the given cova...
Definition: IIGeometricFunctors.h:67
DGtal::ShortcutsGeometry::RealPoint
Space::RealPoint RealPoint
Point with floating-point coordinates.
Definition: ShortcutsGeometry.h:102
DGtal::ShortcutsGeometry::getVectorsAngleDeviation
static Scalars getVectorsAngleDeviation(const RealVectors &v1, const RealVectors &v2)
Definition: ShortcutsGeometry.h:1663
DGtal::ShortcutsGeometry::GrayScale
unsigned char GrayScale
The type for 8-bits gray-scale elements.
Definition: ShortcutsGeometry.h:108
DGtal::ShortcutsGeometry::ExplicitSurfaceContainer
SetOfSurfels< KSpace, SurfelSet > ExplicitSurfaceContainer
defines a heavy container that represents any digital surface.
Definition: ShortcutsGeometry.h:135
DGtal::Shortcuts
Aim: This class is used to simplify shape and surface creation. With it, you can create new shapes an...
Definition: Shortcuts.h:104
DGtal::ShortcutsGeometry::KSpace
TKSpace KSpace
Digital cellular space.
Definition: ShortcutsGeometry.h:90
DGtal::ShortcutsGeometry::GaussianCurvatureFunctor
sgf::ShapeGaussianCurvatureFunctor< ImplicitShape3D > GaussianCurvatureFunctor
Definition: ShortcutsGeometry.h:164
DGtal::ShortcutsGeometry::parametersGeometryEstimation
static Parameters parametersGeometryEstimation()
Definition: ShortcutsGeometry.h:644
DGtal::ShortcutsGeometry::getNormalVectors
static RealVectors getNormalVectors(CountedPtr< ImplicitShape3D > shape, const KSpace &K, const SurfelRange &surfels, const Parameters &params=parametersShapeGeometry())
Definition: ShortcutsGeometry.h:319
DGtal::Shortcuts::RealVectors
std::vector< RealVector > RealVectors
Definition: Shortcuts.h:179
DGtal::ShortcutsGeometry::Surfel2Index
std::map< Surfel, IdxSurfel > Surfel2Index
Definition: ShortcutsGeometry.h:197
DGtal::ProbingMode::R
@ R
DGtal::ShortcutsGeometry::FloatImage
ImageContainerBySTLVector< Domain, float > FloatImage
defines a float image with (hyper-)rectangular domain.
Definition: ShortcutsGeometry.h:124
DGtal::ShortcutsGeometry::IdxSurfel
IdxDigitalSurface::Vertex IdxSurfel
Definition: ShortcutsGeometry.h:147
DGtal::ShortcutsGeometry::getStatistic
static ScalarStatistic getStatistic(const Scalars &v)
Definition: ShortcutsGeometry.h:1648
DGtal::KhalimskySpaceND::sDirect
bool sDirect(const SCell &p, Dimension k) const
Return 'true' if the direct orientation of [p] along [k] is in the positive coordinate direction.
DGtal::Statistic
Aim: This class processes a set of sample values for one variable and can then compute different stat...
Definition: Statistic.h:69
DGtal::ATSolver2D::solveGammaConvergence
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)
Definition: ATSolver2D.h:656
DGtal::PointVector::Component
TEuclideanRing Component
Type for Vector elements.
Definition: PointVector.h:614
DGtal::ShortcutsGeometry::IdxSurfelSet
std::set< IdxSurfel > IdxSurfelSet
Definition: ShortcutsGeometry.h:151
DGtal::ShortcutsGeometry::RealPoints
std::vector< RealPoint > RealPoints
Definition: ShortcutsGeometry.h:157
DGtal::Parameters
Definition: Parameters.h:146
DGtal::functors::HatFunction
Definition: ScalarFunctors.h:55
DGtal::SpaceND
Definition: SpaceND.h:95
DGtal::functors::ShapeGeometricFunctors::ShapeFirstPrincipalCurvatureFunctor
Aim: A functor RealPoint -> Quantity that returns the first principal curvature at given point (i....
Definition: ShapeGeometricFunctors.h:273
DGtal::ShortcutsGeometry::getScalarsAbsoluteDifference
static Scalars getScalarsAbsoluteDifference(const Scalars &v1, const Scalars &v2)
Definition: ShortcutsGeometry.h:1691
DGtal::Trace::info
std::ostream & info()
DGtal::ShortcutsGeometry::getScalarsNormL1
static Scalar getScalarsNormL1(const Scalars &v1, const Scalars &v2)
Definition: ShortcutsGeometry.h:1724
DGtal::ShortcutsGeometry::Integer
Space::Integer Integer
Integer numbers.
Definition: ShortcutsGeometry.h:94
DGtal::ShortcutsGeometry::getIIMeanCurvatures
static Scalars getIIMeanCurvatures(const TPointPredicate &shape, const KSpace &K, const SurfelRange &surfels, const Parameters &params=parametersGeometryEstimation()|parametersKSpace())
Definition: ShortcutsGeometry.h:1052
DGtal::LightImplicitDigitalSurface
Aim: A model of CDigitalSurfaceContainer which defines the digital surface as the boundary of an impl...
Definition: LightImplicitDigitalSurface.h:115
DGtal::ShortcutsGeometry::getFirstPrincipalDirections
static RealVectors getFirstPrincipalDirections(CountedPtr< ImplicitShape3D > shape, const KSpace &K, const SurfelRange &surfels, const Parameters &params=parametersShapeGeometry())
Definition: ShortcutsGeometry.h:523
DGtal::IntegralInvariantVolumeEstimator
Aim: This class implement an Integral Invariant estimator which computes for each surfel the volume o...
Definition: IntegralInvariantVolumeEstimator.h:113
DGtal::Shortcuts::parametersKSpace
static Parameters parametersKSpace()
Definition: Shortcuts.h:311
DGtal::ShortcutsGeometry::getATVectorFieldApproximation
static VectorFieldInput getATVectorFieldApproximation(Scalars &features, CellRangeConstIterator itB, CellRangeConstIterator itE, CountedPtr< TAnyDigitalSurface > surface, const SurfelRange &surfels, const VectorFieldInput &input, const Parameters &params=parametersATApproximation()|parametersGeometryEstimation())
Definition: ShortcutsGeometry.h:1463
DGtal::Shortcuts::KSpace
TKSpace KSpace
Digital cellular space.
Definition: Shortcuts.h:111
DGtal::ATSolver2D::Average
@ Average
compute average values at cell vertices
Definition: ATSolver2D.h:103
DGtal::ShortcutsGeometry::IdxArc
IdxDigitalSurface::Arc IdxArc
Definition: ShortcutsGeometry.h:149
DGtal::ShortcutsGeometry::getATVectorFieldApproximation
static VectorFieldInput getATVectorFieldApproximation(CountedPtr< TAnyDigitalSurface > surface, const SurfelRange &surfels, const VectorFieldInput &input, const Parameters &params=parametersATApproximation()|parametersGeometryEstimation())
Definition: ShortcutsGeometry.h:1402
DGtal::DigitalSurface::Cell
DigitalSurfaceContainer::Cell Cell
Definition: DigitalSurface.h:160
DGtal::functors::ShapeGeometricFunctors::ShapeSecondPrincipalDirectionFunctor
Aim: A functor RealPoint -> RealVector that returns the second principal direction at given point (i....
Definition: ShapeGeometricFunctors.h:442
DGtal::Shortcuts::Scalar
RealVector::Component Scalar
Floating-point numbers.
Definition: Shortcuts.h:125
DGtal::ShortcutsGeometry::SurfelSet
KSpace::SurfelSet SurfelSet
defines a set of surfels
Definition: ShortcutsGeometry.h:128
DGtal::ShortcutsGeometry::BinaryImage
ImageContainerBySTLVector< Domain, bool > BinaryImage
defines a black and white image with (hyper-)rectangular domain.
Definition: ShortcutsGeometry.h:120
DGtal::ATSolver2D
Aim: This class solves Ambrosio-Tortorelli functional on a two-dimensional digital space (a 2D grid o...
Definition: ATSolver2D.h:90
DGtal::Shortcuts::parametersDigitizedImplicitShape3D
static Parameters parametersDigitizedImplicitShape3D()
Definition: Shortcuts.h:461
DGtal::ShortcutsGeometry::TrueMeanCurvatureEstimator
TrueDigitalSurfaceLocalEstimator< KSpace, ImplicitShape3D, MeanCurvatureFunctor > TrueMeanCurvatureEstimator
Definition: ShortcutsGeometry.h:180
DGtal::ShortcutsGeometry::Space
KSpace::Space Space
Digital space.
Definition: ShortcutsGeometry.h:92
DGtal::ShortcutsGeometry::getIIGaussianCurvatures
static Scalars getIIGaussianCurvatures(CountedPtr< DigitizedImplicitShape3D > dshape, const SurfelRange &surfels, const Parameters &params=parametersGeometryEstimation()|parametersKSpace()|parametersDigitizedImplicitShape3D())
Definition: ShortcutsGeometry.h:1141
DGtal
DGtal is the top-level namespace which contains all DGtal functions and types.
DGtal::ShortcutsGeometry::getATScalarFieldApproximation
static Scalars getATScalarFieldApproximation(CountedPtr< TAnyDigitalSurface > surface, const SurfelRange &surfels, const Scalars &input, const Parameters &params=parametersATApproximation()|parametersGeometryEstimation())
Definition: ShortcutsGeometry.h:1523
DGtal::ShortcutsGeometry::Cell
LightDigitalSurface::Cell Cell
Definition: ShortcutsGeometry.h:141
DGtal::ShortcutsGeometry::Scalar
RealVector::Component Scalar
Floating-point numbers.
Definition: ShortcutsGeometry.h:104
DGtal::ShortcutsGeometry::Vertex
LightDigitalSurface::Vertex Vertex
Definition: ShortcutsGeometry.h:143
DGtal::ATSolver2D::Maximum
@ Maximum
compute maximum value at cell vertices
Definition: ATSolver2D.h:105
DGtal::ShortcutsGeometry::CurvatureTensorQuantity
functors::IIPrincipalCurvaturesAndDirectionsFunctor< Space >::Quantity CurvatureTensorQuantity
Definition: ShortcutsGeometry.h:171
DGtal::TrueDigitalSurfaceLocalEstimator::eval
Quantity eval(SurfelConstIterator it) const
DGtal::ShortcutsGeometry::getATScalarFieldApproximation
static Scalars getATScalarFieldApproximation(Scalars &features, CellRangeConstIterator itB, CellRangeConstIterator itE, CountedPtr< TAnyDigitalSurface > surface, const SurfelRange &surfels, const Scalars &input, const Parameters &params=parametersATApproximation()|parametersGeometryEstimation())
Definition: ShortcutsGeometry.h:1587
DGtal::Shortcuts::Scalars
std::vector< Scalar > Scalars
Definition: Shortcuts.h:178
DGtal::DigitalSurface::SCell
DigitalSurfaceContainer::SCell SCell
Definition: DigitalSurface.h:161
DGtal::ShortcutsGeometry::Domain
HyperRectDomain< Space > Domain
An (hyper-)rectangular domain.
Definition: ShortcutsGeometry.h:106
DGtal::ShortcutsGeometry::TriangulatedSurface
::DGtal::TriangulatedSurface< RealPoint > TriangulatedSurface
Definition: ShortcutsGeometry.h:195
DGtal::ShortcutsGeometry::DigitalSurface
::DGtal::DigitalSurface< ExplicitSurfaceContainer > DigitalSurface
defines an arbitrary digital surface over a binary image.
Definition: ShortcutsGeometry.h:137
DGtal::DiscreteExteriorCalculusFactory
Aim: This class provides static members to create DEC structures from various other DGtal structures.
Definition: DiscreteExteriorCalculus.h:70
DGtal::ShortcutsGeometry::ImplicitShape3D
ImplicitPolynomial3Shape< Space > ImplicitShape3D
Definition: ShortcutsGeometry.h:116
DGtal::functors::HatPointFunction
Definition: Point2ScalarFunctors.h:55
DGtal::functors::VCMNormalVectorFunctor
Aim: A functor Surfel -> Quantity that returns the outer normal vector at given surfel.
Definition: VCMGeometricFunctors.h:59
DGtal::ShortcutsGeometry::getIIPrincipalCurvaturesAndDirections
static CurvatureTensorQuantities getIIPrincipalCurvaturesAndDirections(CountedPtr< DigitizedImplicitShape3D > dshape, const SurfelRange &surfels, const Parameters &params=parametersGeometryEstimation()|parametersKSpace()|parametersDigitizedImplicitShape3D())
Definition: ShortcutsGeometry.h:1267
DGtal::ShortcutsGeometry
Aim: This class is used to simplify shape and surface creation. With it, you can create new shapes an...
Definition: ShortcutsGeometry.h:76
DGtal::ImplicitPolynomial3Shape
Aim: model of CEuclideanOrientedShape concepts to create a shape from a polynomial.
Definition: ImplicitPolynomial3Shape.h:67
DGtal::functors::IIPrincipalCurvaturesAndDirectionsFunctor
Aim: A functor Matrix -> std::pair<RealVector,RealVector> that returns the first and the second princ...
Definition: IIGeometricFunctors.h:460
DGtal::ShortcutsGeometry::DoubleImage
ImageContainerBySTLVector< Domain, double > DoubleImage
defines a double image with (hyper-)rectangular domain.
Definition: ShortcutsGeometry.h:126
DGtal::OuterSpel
@ OuterSpel
Definition: VoronoiCovarianceMeasureOnDigitalSurface.h:58
DGtal::ShortcutsGeometry::ArcRange
LightDigitalSurface::ArcRange ArcRange
Definition: ShortcutsGeometry.h:146
DGtal::ShortcutsGeometry::PrincipalCurvaturesAndDirectionsFunctor
sgf::ShapePrincipalCurvaturesAndDirectionsFunctor< ImplicitShape3D > PrincipalCurvaturesAndDirectionsFunctor
Definition: ShortcutsGeometry.h:169
DGtal::ShortcutsGeometry::Vector
Space::Vector Vector
Vector with integer coordinates.
Definition: ShortcutsGeometry.h:98
DGtal::CountedPtr
Aim: Smart pointer based on reference counts.
Definition: CountedPtr.h:79
DGtal::Shortcuts::SurfelRange
SCellRange SurfelRange
Definition: Shortcuts.h:176
DGtal::functors::ShapeGeometricFunctors
Definition: ShapeGeometricFunctors.h:52
DGtal::ShortcutsGeometry::MeanCurvatureFunctor
sgf::ShapeMeanCurvatureFunctor< ImplicitShape3D > MeanCurvatureFunctor
Definition: ShortcutsGeometry.h:163
DGtal::DigitalSurface::Arc
Definition: DigitalSurface.h:238
DGtal::ShortcutsGeometry::Scalars
std::vector< Scalar > Scalars
Definition: ShortcutsGeometry.h:155
DGtal::Pointels
@ Pointels
Definition: VoronoiCovarianceMeasureOnDigitalSurface.h:58
DGtal::ShortcutsGeometry::orientVectors
static void orientVectors(RealVectors &v, const RealVectors &ref_v)
Definition: ShortcutsGeometry.h:1635
DGtal::functors::ShapeGeometricFunctors::ShapeNormalVectorFunctor
Aim: A functor RealPoint -> Quantity that returns the normal vector at given point.
Definition: ShapeGeometricFunctors.h:114
DGtal::Shortcuts::RealPoints
std::vector< RealPoint > RealPoints
Definition: Shortcuts.h:180
DGtal::ShortcutsGeometry::PolygonalSurface
::DGtal::PolygonalSurface< RealPoint > PolygonalSurface
Definition: ShortcutsGeometry.h:196
DGtal::functors::IIGaussianCurvature3DFunctor
Aim: A functor Matrix -> Real that returns the Gaussian curvature by diagonalizing the given covarian...
Definition: IIGeometricFunctors.h:666
DGtal::ShortcutsGeometry::getPrincipalCurvaturesAndDirections
static CurvatureTensorQuantities getPrincipalCurvaturesAndDirections(CountedPtr< ImplicitShape3D > shape, const KSpace &K, const SurfelRange &surfels, const Parameters &params=parametersShapeGeometry())
Definition: ShortcutsGeometry.h:608
DGtal::TrueDigitalSurfaceLocalEstimator::setParams
void setParams(ConstAlias< KSpace > ks, Clone< GeometricFunctor > fct, const int maxIter=20, const Scalar accuracy=0.0001, const Scalar gamma=0.5)
DGtal::KhalimskySpaceND::sOrthDir
Dimension sOrthDir(const SCell &s) const
Given a signed surfel [s], returns its orthogonal direction (ie, the coordinate where the surfel is c...
DGtal::Statistic::terminate
void terminate()
DGtal::ShortcutsGeometry::getVCMNormalVectors
static RealVectors getVCMNormalVectors(CountedPtr< TAnyDigitalSurface > surface, const SurfelRange &surfels, const Parameters &params=parametersGeometryEstimation())
Definition: ShortcutsGeometry.h:755
DGtal::functors::IIMeanCurvature3DFunctor
Aim: A functor Real -> Real that returns the 3d mean curvature by transforming the given volume....
Definition: IIGeometricFunctors.h:602
DGtal::Shortcuts::getKSpace
static KSpace getKSpace(const Point &low, const Point &up, Parameters params=parametersKSpace())
Definition: Shortcuts.h:332
DGtal::ShortcutsGeometry::Arc
LightDigitalSurface::Arc Arc
Definition: ShortcutsGeometry.h:144
DGtal::ExactPredicateLpSeparableMetric
Aim: implements separable l_p metrics with exact predicates.
Definition: ExactPredicateLpSeparableMetric.h:87
DGtal::DigitalSurface::Vertex
Surfel Vertex
Defines the type for a vertex.
Definition: DigitalSurface.h:177
DGtal::ShortcutsGeometry::DigitizedImplicitShape3D
GaussDigitizer< Space, ImplicitShape3D > DigitizedImplicitShape3D
defines the digitization of an implicit shape.
Definition: ShortcutsGeometry.h:118
DGtal::ShortcutsGeometry::SurfelRange
std::vector< Surfel > SurfelRange
Definition: ShortcutsGeometry.h:152
DGtal::ShortcutsGeometry::getIINormalVectors
static RealVectors getIINormalVectors(CountedPtr< DigitizedImplicitShape3D > dshape, const SurfelRange &surfels, const Parameters &params=parametersGeometryEstimation()|parametersKSpace()|parametersDigitizedImplicitShape3D())
Definition: ShortcutsGeometry.h:888
DGtal::IndexedDigitalSurface::ArcRange
std::vector< Arc > ArcRange
Definition: IndexedDigitalSurface.h:134
DGtal::ShortcutsGeometry::NormalFunctor
sgf::ShapeNormalVectorFunctor< ImplicitShape3D > NormalFunctor
Definition: ShortcutsGeometry.h:162
DGtal::DigitalSurface::Surfel
DigitalSurfaceContainer::Surfel Surfel
Definition: DigitalSurface.h:162
DGtal::ShortcutsGeometry::getIIPrincipalCurvaturesAndDirections
static CurvatureTensorQuantities getIIPrincipalCurvaturesAndDirections(CountedPtr< BinaryImage > bimage, const SurfelRange &surfels, const Parameters &params=parametersGeometryEstimation()|parametersKSpace())
Definition: ShortcutsGeometry.h:1230
DGtal::functors::ShapeGeometricFunctors::ShapeSecondPrincipalCurvatureFunctor
Aim: A functor RealPoint -> Quantity that returns the second principal curvature at given point (i....
Definition: ShapeGeometricFunctors.h:328
DGtal::PointVector< dim, Integer >
DGtal::LpMetric
Aim: implements l_p metrics.
Definition: LpMetric.h:74
DGtal::ShortcutsGeometry::TrueFirstPrincipalDirectionEstimator
TrueDigitalSurfaceLocalEstimator< KSpace, ImplicitShape3D, FirstPrincipalDirectionFunctor > TrueFirstPrincipalDirectionEstimator
Definition: ShortcutsGeometry.h:188
DGtal::ShortcutsGeometry::defaultParameters
static Parameters defaultParameters()
Definition: ShortcutsGeometry.h:209
DGtal::SetOfSurfels
Aim: A model of CDigitalSurfaceContainer which defines the digital surface as connected surfels....
Definition: SetOfSurfels.h:73
DGtal::ShortcutsGeometry::getSecondPrincipalCurvatures
static Scalars getSecondPrincipalCurvatures(CountedPtr< ImplicitShape3D > shape, const KSpace &K, const SurfelRange &surfels, const Parameters &params=parametersShapeGeometry())
Definition: ShortcutsGeometry.h:481
DGtal::MPolynomial
Aim: Represents a multivariate polynomial, i.e. an element of , where K is some ring or field.
Definition: MPolynomial.h:58
DGtal::ShortcutsGeometry::TrueGaussianCurvatureEstimator
TrueDigitalSurfaceLocalEstimator< KSpace, ImplicitShape3D, GaussianCurvatureFunctor > TrueGaussianCurvatureEstimator
Definition: ShortcutsGeometry.h:182
DGtal::ShortcutsGeometry::ScalarStatistic
::DGtal::Statistic< Scalar > ScalarStatistic
Definition: ShortcutsGeometry.h:159
DGtal::TrueDigitalSurfaceLocalEstimator
Aim: An estimator on digital surfaces that returns the reference local geometric quantity....
Definition: TrueDigitalSurfaceLocalEstimator.h:97
DGtal::ShortcutsGeometry::getScalarsNormLoo
static Scalar getScalarsNormLoo(const Scalars &v1, const Scalars &v2)
Definition: ShortcutsGeometry.h:1740
DGtal::ShortcutsGeometry::IdxSurfelRange
std::vector< IdxSurfel > IdxSurfelRange
Definition: ShortcutsGeometry.h:154
DGtal::ShortcutsGeometry::RealVectors
std::vector< RealVector > RealVectors
Definition: ShortcutsGeometry.h:156
DGtal::Trace::warning
std::ostream & warning()
DGtal::functors::ShapeGeometricFunctors::ShapePositionFunctor
Aim: A functor RealPoint -> Quantity that returns the position of the point itself.
Definition: ShapeGeometricFunctors.h:64
DGtal::LocalEstimatorFromSurfelFunctorAdapter
Aim: this class adapts any local functor on digital surface element to define a local estimator....
Definition: LocalEstimatorFromSurfelFunctorAdapter.h:103
DGtal::ShortcutsGeometry::TruePositionEstimator
TrueDigitalSurfaceLocalEstimator< KSpace, ImplicitShape3D, PositionFunctor > TruePositionEstimator
Definition: ShortcutsGeometry.h:176
DGtal::ShortcutsGeometry::FirstPrincipalCurvatureFunctor
sgf::ShapeFirstPrincipalCurvatureFunctor< ImplicitShape3D > FirstPrincipalCurvatureFunctor
Definition: ShortcutsGeometry.h:165
DGtal::functors::BallConstantPointFunction
Definition: Point2ScalarFunctors.h:85
DGtal::ShortcutsGeometry::getIIMeanCurvatures
static Scalars getIIMeanCurvatures(CountedPtr< DigitizedImplicitShape3D > dshape, const SurfelRange &surfels, const Parameters &params=parametersGeometryEstimation()|parametersKSpace()|parametersDigitizedImplicitShape3D())
Definition: ShortcutsGeometry.h:1017
DGtal::ShortcutsGeometry::Face
LightDigitalSurface::Face Face
Definition: ShortcutsGeometry.h:145
DGtal::CanonicSCellEmbedder< KSpace >
DGtal::ShortcutsGeometry::TrueNormalEstimator
TrueDigitalSurfaceLocalEstimator< KSpace, ImplicitShape3D, NormalFunctor > TrueNormalEstimator
Definition: ShortcutsGeometry.h:178
DGtal::ShortcutsGeometry::SecondPrincipalCurvatureFunctor
sgf::ShapeSecondPrincipalCurvatureFunctor< ImplicitShape3D > SecondPrincipalCurvatureFunctor
Definition: ShortcutsGeometry.h:166
DGtal::ShortcutsGeometry::SecondPrincipalDirectionFunctor
sgf::ShapeSecondPrincipalDirectionFunctor< ImplicitShape3D > SecondPrincipalDirectionFunctor
Definition: ShortcutsGeometry.h:168
DGtal::ShortcutsGeometry::LightDigitalSurface
::DGtal::DigitalSurface< LightSurfaceContainer > LightDigitalSurface
defines a connected digital surface over a binary image.
Definition: ShortcutsGeometry.h:133
DGtal::ShortcutsGeometry::TrueFirstPrincipalCurvatureEstimator
TrueDigitalSurfaceLocalEstimator< KSpace, ImplicitShape3D, FirstPrincipalCurvatureFunctor > TrueFirstPrincipalCurvatureEstimator
Definition: ShortcutsGeometry.h:184
DGtal::functors::ShapeGeometricFunctors::ShapeGaussianCurvatureFunctor
Aim: A functor RealPoint -> Quantity that returns the gaussian curvature at given point.
Definition: ShapeGeometricFunctors.h:221
DGtal::VCMDigitalSurfaceLocalEstimator
Aim: This class adapts a VoronoiCovarianceMeasureOnDigitalSurface to be a model of CDigitalSurfaceLoc...
Definition: VCMDigitalSurfaceLocalEstimator.h:82
DGtal::ShortcutsGeometry::parametersShapeGeometry
static Parameters parametersShapeGeometry()
Definition: ShortcutsGeometry.h:222
DGtal::ImplicitPolynomial3Shape::nearestPoint
RealPoint nearestPoint(const RealPoint &aPoint, const double accuracy=0.0001, const int maxIter=20, const double gamma=0.5) const
DGtal::SpaceND::Integer
TInteger Integer
Arithmetic ring induced by (+,-,*) and Integer numbers.
Definition: SpaceND.h:102
DGtal::functors::IIPrincipalCurvaturesAndDirectionsFunctor::Quantity
std::tuple< double, double, RealVector, RealVector > Quantity
Definition: IIGeometricFunctors.h:470
DGtal::ATSolver2D::initInputVectorFieldU2
void initInputVectorFieldU2(const VectorFieldInput &input, SurfelRangeConstIterator itB, SurfelRangeConstIterator itE, bool normalize=false)
Definition: ATSolver2D.h:288
DGtal::ShortcutsGeometry::Mesh
::DGtal::Mesh< RealPoint > Mesh
Definition: ShortcutsGeometry.h:194
DGtal::ShortcutsGeometry::getTrivialNormalVectors
static RealVectors getTrivialNormalVectors(const KSpace &K, const SurfelRange &surfels)
Definition: ShortcutsGeometry.h:666
DGtal::ShortcutsGeometry::Point
Space::Point Point
Point with integer coordinates.
Definition: ShortcutsGeometry.h:96
DGtal::ATSolver2D::getOutputScalarFieldV0
void getOutputScalarFieldV0(ScalarFieldOutput &output, CellRangeConstIterator itB, CellRangeConstIterator itE, CellOutputPolicy policy=CellOutputPolicy::Average)
Definition: ATSolver2D.h:823
DGtal::ShortcutsGeometry::getPositions
static RealPoints getPositions(CountedPtr< ImplicitShape3D > shape, const KSpace &K, const SurfelRange &surfels, const Parameters &params=parametersShapeGeometry())
Definition: ShortcutsGeometry.h:251
DGtal::ShortcutsGeometry::FirstPrincipalDirectionFunctor
sgf::ShapeFirstPrincipalDirectionFunctor< ImplicitShape3D > FirstPrincipalDirectionFunctor
Definition: ShortcutsGeometry.h:167
DGtal::ShortcutsGeometry::RealVector
Space::RealVector RealVector
Vector with floating-point coordinates.
Definition: ShortcutsGeometry.h:100
DGtal::ShortcutsGeometry::ScalarPolynomial
MPolynomial< Space::dimension, Scalar > ScalarPolynomial
defines a multi-variate polynomial : RealPoint -> Scalar
Definition: ShortcutsGeometry.h:113