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{
55 template<class TEstimator, typename TSplitter>
57 {
58 public:
59 using Estimator = TEstimator;
60 using Splitter = TSplitter;
61 using Domain = typename TEstimator::Domain;
62 using Scalar = typename TEstimator::Scalar;
63
64 using KSpace = typename TEstimator::KSpace;
65 using PointPredicate = typename TEstimator::PointPredicate;
66 using Surfel = typename KSpace::Surfel;
67 using SurfelSet = typename KSpace::SurfelSet;
68 using EstimatorQuantity = typename TEstimator::Quantity;
70
71 // Building the surface
76
77
87 template<typename... Args>
88 ParallelIIEstimator(Splitter splitter, int32_t nbThread, Args&&... args);
89
93 void clear();
94
96 Scalar h() const;
97
106 ConstAlias<PointPredicate> aPointPredicate);
107
113 void setParams(double dRadius);
114
115
120 bool isValid() const;
121
130 template<typename ItA, typename ItB>
131 void init(double h_, ItA ite, ItB itb);
132
147 template<typename It>
149
170 template<typename It, typename Oit>
171 Oit eval(It itb, It ite, Oit result);
172
177 void selfDisplay ( std::ostream & out ) const;
178
179 private:
180 std::vector<Estimator> myEstimators;
182
185
186 double myH;
187 double myRadius;
188 };
189}
190
191#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