34#if defined(SphereFittingEstimator_RECURSES) 
   35#error Recursive header files inclusion detected in SphereFittingEstimator.h 
   38#define SphereFittingEstimator_RECURSES
 
   40#if !defined SphereFittingEstimator_h 
   42#define SphereFittingEstimator_h 
   47#include <DGtal/base/Common.h> 
   48#include <DGtal/topology/SCellsFunctors.h> 
   51#error You need to have activated Patate (WITH_PATATE) to include this file. 
   55#include <Patate/grenaille.h> 
   85    template <
typename TSurfel,
 
   87              typename TNormalVectorEstimatorCache>
 
  102                                     const VectorType& _normal = VectorType::Zero())
 
 
 
  125      typedef Grenaille::DistWeightFunc<PatatePoint,Grenaille::SmoothWeightKernel<Scalar> > 
WeightFunc; 
 
  126      typedef Grenaille::Basket<PatatePoint,WeightFunc,Grenaille::OrientedSphereFit, Grenaille::GLSParam> 
Fit;
 
  188                      const double aDistance)
 
  190        BOOST_VERIFY(aDistance==aDistance);
 
  209          myFit->addNeighbor(point);
 
 
  229        if(
myFit->isStable())
 
  231                std::cout << 
"Center: [" << 
myFit->center().transpose() << 
"] ;  radius: " << 
myFit->radius() << std::endl;
 
  233                std::cout << 
"Pratt normalization"  
  234                        << (
myFit->applyPrattNorm() ? 
" is now done." : 
" has already been applied.") << std::endl;
 
  237                std::cout << 
"Fitted Sphere: " << std::endl
 
  238                        << 
"\t Tau  : "      << 
myFit->tau()             << std::endl
 
  239                        << 
"\t Eta  : "      << 
myFit->eta().transpose() << std::endl
 
  240                        << 
"\t Kappa: "      << 
myFit->kappa()           << std::endl;
 
  245            std::cout << 
"Ooops... not stable result"<<std::endl;
 
  250                               (
myFit->center())(1),
 
  251                               (
myFit->center())(2));
 
  252        res.radius =  
myFit->radius();
 
  253        res.tau = 
myFit->tau();
 
  254        res.kappa = 
myFit->kappa();
 
 
 
  305#undef SphereFittingEstimator_RECURSES 
Aim: This class encapsulates its parameter class so that to indicate to the user that the object/poin...
 
MULTIARCH VectorType & normal()
 
Eigen::Matrix< Scalar, Dim, Dim > MatrixType
 
MULTIARCH const VectorType & normal() const
 
Eigen::Matrix< Scalar, Dim, 1 > VectorType
 
MULTIARCH VectorType & pos()
 
MULTIARCH const VectorType & pos() const
 
MULTIARCH PatatePoint(const VectorType &_pos=VectorType::Zero(), const VectorType &_normal=VectorType::Zero())
 
Aim: Use Patate library to perform a local sphere fitting.
 
const NormalVectorEstimatorCache * myNormalEsitmatorCache
NormalVectorCache.
 
bool myFirstPoint
Boolean for initial point.
 
Fit * myFit
Fitting object.
 
Grenaille::DistWeightFunc< PatatePoint, Grenaille::SmoothWeightKernel< Scalar > > WeightFunc
 
PatatePoint::Scalar Scalar
 
const SCellEmbedder * myEmbedder
Alias of the geometrical embedder.
 
const WeightFunc * myWeightFunction
const WeightFunction
 
SCellEmbedder::RealPoint RealPoint
 
SphereFittingEstimator(ConstAlias< SCellEmbedder > anEmbedder, const double h, const double radius, ConstAlias< NormalVectorEstimatorCache > anEstimator)
 
Grenaille::Basket< PatatePoint, WeightFunc, Grenaille::OrientedSphereFit, Grenaille::GLSParam > Fit
 
PatatePoint::VectorType VectorType
 
TNormalVectorEstimatorCache NormalVectorEstimatorCache
 
~SphereFittingEstimator()
 
void pushSurfel(const Surfel &aSurf, const double aDistance)
 
DGtal is the top-level namespace which contains all DGtal functions and types.
 
Quantity type: a 3-sphere (model of CQuantity)
 
bool operator<(Quantity aq)
 
bool operator!=(Quantity aq)
 
Quantity(RealPoint p, double rad, double _tau, double _kappa, RealPoint _eta)
 
bool operator==(Quantity aq)