31 #if defined(PlaneProbingDigitalSurfaceLocalEstimator_RECURSES)
32 #error Recursive header files inclusion detected in PlaneProbingDigitalSurfaceLocalEstimator.h
35 #define PlaneProbingDigitalSurfaceLocalEstimator_RECURSES
37 #if !defined PlaneProbingDigitalSurfaceLocalEstimator_h
39 #define PlaneProbingDigitalSurfaceLocalEstimator_h
44 #include <unordered_map>
45 #include "DGtal/base/Common.h"
46 #include "DGtal/geometry/surfaces/DigitalSurfacePredicate.h"
47 #include "DGtal/geometry/surfaces/estimation/MaximalSegmentSliceEstimation.h"
48 #include "DGtal/topology/KhalimskyCellHashFunctions.h"
49 #include "DGtal/topology/CDigitalSurfaceContainer.h"
69 template <
typename TSurface,
typename TInternalProbingAlgorithm>
100 newNormal = newB1.crossProduct(newB2);
102 return { newP, newB1, newB2, newNormal };
121 using Quantity =
typename InternalProbingAlgorithm::Quantity;
152 std::unordered_map<Surfel, RealPoint>
const& aPreEstimations = {},
153 bool aVerbose =
false);
165 std::unordered_map<Surfel, RealPoint>
const& aPreEstimations = {},
166 bool aVerbose =
false);
208 template <
typename SurfelConstIterator >
209 void init (
Scalar const& h, SurfelConstIterator itb, SurfelConstIterator ite);
219 template <
typename SurfelConstIterator >
230 template <
typename SurfelConstIterator,
typename OutputIterator >
231 OutputIterator
eval (SurfelConstIterator itb, SurfelConstIterator ite, OutputIterator out);
254 std::unordered_map<Surfel, RealPoint>
const& aPreEstimations = {},
255 bool aVerbose =
false);
276 template <
typename SurfelConstIterator >
323 return (x >= 0) ? 1 : -1;
332 std::vector<int> zeros;
334 for (
int i = 0; i < 3; ++i)
357 else if (aIndex == 1)
376 int im1 = (aIndex - 1 + 3) % 3,
377 im2 = (aIndex - 2 + 3) % 3;
391 template <
typename TSurface,
typename TInternalProbingAlgorithm >
400 #include "DGtal/geometry/surfaces/estimation/PlaneProbingDigitalSurfaceLocalEstimator.ih"
407 #undef PlaneProbingDigitalSurfaceLocalEstimator_RECURSES
Aim: This class encapsulates its parameter class so that to indicate to the user that the object/poin...
Aim: Adapt a plane-probing estimator on a digital surface to estimate normal vectors.
TInternalProbingAlgorithm InternalProbingAlgorithm
PlaneProbingDigitalSurfaceLocalEstimator & operator=(const PlaneProbingDigitalSurfaceLocalEstimator &other)
BOOST_CONCEPT_ASSERT((concepts::CDigitalSurfaceContainer< typename TSurface::DigitalSurfaceContainer >))
PlaneProbingDigitalSurfaceLocalEstimator()
void init(Scalar const &h, SurfelConstIterator itb, SurfelConstIterator ite)
std::function< InternalProbingAlgorithm *(const ProbingFrame &, Predicate const &)> ProbingFactory
PlaneProbingDigitalSurfaceLocalEstimator(const PlaneProbingDigitalSurfaceLocalEstimator &other)
PlaneProbingDigitalSurfaceLocalEstimator(ConstAlias< Surface > aSurface, ProbingFactory const &aProbingFactory, std::unordered_map< Surfel, RealPoint > const &aPreEstimations={}, bool aVerbose=false)
typename Space::RealPoint RealPoint
typename KSpace::Cell Cell
typename Surface::KSpace KSpace
void selfDisplay(std::ostream &out) const
PreEstimation myPreEstimationEstimator
PlaneProbingDigitalSurfaceLocalEstimator(PlaneProbingDigitalSurfaceLocalEstimator &&other)=delete
void setParams(ProbingFactory const &aProbingFactory, std::unordered_map< Surfel, RealPoint > const &aPreEstimations={}, bool aVerbose=false)
static std::vector< int > findZeros(RealPoint const &p)
std::pair< bool, ProbingFrame > probingFrameWithPreEstimation(ProbingFrame const &aInitialFrame, RealPoint const &aPreEstimation) const
~PlaneProbingDigitalSurfaceLocalEstimator()
ProbingFrame probingFrameFromSurfel(Surfel const &aSurfel) const
ProbingFactory myProbingFactory
static std::vector< PointOnProbingRay > getProbingRaysOneFlatDirection(int aIndex)
static int signComponent(double x)
typename KSpace::Space Space
typename KSpace::SCell SCell
void attach(ConstAlias< Surface > aSurface)
Point getNormalOneFlatDirection(int aIndex) const
CountedConstPtrOrConstPtr< Surface > mySurface
typename Surface::Surfel Surfel
typename InternalProbingAlgorithm::Point Point
Quantity eval(SurfelConstIterator it)
OutputIterator eval(SurfelConstIterator itb, SurfelConstIterator ite, OutputIterator out)
PlaneProbingDigitalSurfaceLocalEstimator(ProbingFactory const &aProbingFactory, std::unordered_map< Surfel, RealPoint > const &aPreEstimations={}, bool aVerbose=false)
InternalProbingAlgorithm * myProbingAlgorithm
typename InternalProbingAlgorithm::Quantity Quantity
std::unordered_map< Surfel, RealPoint > myPreEstimations
RealPoint getPreEstimation(SurfelConstIterator it) const
PlaneProbingDigitalSurfaceLocalEstimator(ConstAlias< Surface > aSurface)
typename InternalProbingAlgorithm::PointOnProbingRay PointOnProbingRay
DGtal is the top-level namespace which contains all DGtal functions and types.
std::ostream & operator<<(std::ostream &out, const ATu0v1< TKSpace, TLinearAlgebra > &object)
ProbingFrame rotatedCopy() const
Aim: The digital surface container concept describes a minimal set of inner types and methods so as t...
PointVector< 3, double > RealPoint