DGtal 2.1.1
Loading...
Searching...
No Matches
ParallelIIEstimator.h
1
29#include <DGtal/kernel/domains/DomainSplitter.h>
30#include <DGtal/topology/helpers/Surfaces.h>
31
32#ifndef DGTAL_WITH_OPENMP
33#error You need to have activated OpenMP (DGTAL_WITH_OPENMP) to include this file.
34#endif
35
36// We require openmp for this estimator, even though it could run without
37#include <omp.h>
38
39namespace DGtal
40{
52 template<class TEstimator, typename TSplitter>
54 {
55 public:
56 using Estimator = TEstimator;
57 using Splitter = TSplitter;
58 using Domain = typename TEstimator::Domain;
59 using Scalar = typename TEstimator::Scalar;
60
61 using KSpace = typename TEstimator::KSpace;
62 using PointPredicate = typename TEstimator::PointPredicate;
63 using Surfel = typename KSpace::Surfel;
64 using SurfelSet = typename KSpace::SurfelSet;
65 using EstimatorQuantity = typename TEstimator::Quantity;
67
68 // Building the surface
73
74
84 template<typename... Args>
85 ParallelIIEstimator(Splitter splitter, int32_t nbThread, Args&&... args);
86
90 void clear();
91
93 Scalar h() const;
94
103 ConstAlias<PointPredicate> aPointPredicate);
104
110 void setParams(double dRadius);
111
112
117 bool isValid() const;
118
127 template<typename ItA, typename ItB>
128 void init(double h_, ItA ite, ItB itb);
129
144 template<typename It>
146
167 template<typename It, typename Oit>
168 Oit eval(It itb, It ite, Oit result);
169
174 void selfDisplay ( std::ostream & out ) const;
175
176 private:
177 std::vector<Estimator> myEstimators;
179
182
183 double myH;
184 double myRadius;
185 };
186}
187
188#include "ParallelIIEstimator.ih"
Aim: This class encapsulates its parameter class so that to indicate to the user that the object/poin...
Definition ConstAlias.h:187
Aim: Smart or simple const pointer on T. It can be a smart pointer based on reference counts or a sim...
Aim: This class is useful to perform a depth-first exploration of a graph given a starting point or s...
Aim: Represents a set of n-1-cells in a nD space, together with adjacency relation between these cell...
Aim: Transforms a graph visitor into a single pass input range.
std::set< SCell > SurfelSet
Preferred type for defining a set of surfels (always signed cells).
Aim: A model of CDigitalSurfaceContainer which defines the digital surface as the boundary of an impl...
Run an Integral Invariant estimator in parallel.
typename TEstimator::Quantity EstimatorQuantity
CountedConstPtrOrConstPtr< KSpace > myKSpace
void attach(ConstAlias< KSpace > K, ConstAlias< PointPredicate > aPointPredicate)
void setParams(double dRadius)
typename KSpace::SurfelSet SurfelSet
CountedConstPtrOrConstPtr< PointPredicate > myPointPredicate
typename TEstimator::Scalar Scalar
ParallelIIEstimator(Splitter splitter, int32_t nbThread, Args &&... args)
Constructor.
typename KSpace::Surfel Surfel
typename TEstimator::KSpace KSpace
void selfDisplay(std::ostream &out) const
void init(double h_, ItA ite, ItB itb)
std::vector< Estimator > myEstimators
typename TEstimator::Domain Domain
Oit eval(It itb, It ite, Oit result)
typename TEstimator::PointPredicate PointPredicate
DGtal is the top-level namespace which contains all DGtal functions and types.
std::int32_t int32_t
signed 32-bit integer.
Definition BasicTypes.h:71
KSpace K
AxisDomainSplitter< Domain > splitter