|
DGtal 2.1.1
|
Run an Integral Invariant estimator in parallel. More...
#include <DGtal/geometry/surfaces/estimation/ParallelIIEstimator.h>
Public Types | |
| using | Estimator = TEstimator |
| using | Splitter = TSplitter |
| using | Domain = typename TEstimator::Domain |
| using | Scalar = typename TEstimator::Scalar |
| using | KSpace = typename TEstimator::KSpace |
| using | PointPredicate = typename TEstimator::PointPredicate |
| using | Surfel = typename KSpace::Surfel |
| using | SurfelSet = typename KSpace::SurfelSet |
| using | EstimatorQuantity = typename TEstimator::Quantity |
| using | Quantity = EstimatorQuantity |
| using | Boundary = LightImplicitDigitalSurface< KSpace, PointPredicate > |
| using | Surface = DigitalSurface< Boundary > |
| using | Visitor = DepthFirstVisitor< Surface > |
| using | VisitorRange = GraphVisitorRange< Visitor > |
Public Member Functions | |
| template<typename... Args> | |
| ParallelIIEstimator (Splitter splitter, int32_t nbThread, Args &&... args) | |
| Constructor. | |
| void | clear () |
| Scalar | h () const |
| void | attach (ConstAlias< KSpace > K, ConstAlias< PointPredicate > aPointPredicate) |
| void | setParams (double dRadius) |
| bool | isValid () const |
| template<typename ItA , typename ItB > | |
| void | init (double h_, ItA ite, ItB itb) |
| template<typename It > | |
| Quantity | eval (It it) |
| template<typename It , typename Oit > | |
| Oit | eval (It itb, It ite, Oit result) |
| void | selfDisplay (std::ostream &out) const |
Private Attributes | |
| std::vector< Estimator > | myEstimators |
| Splitter | mySplitter |
| CountedConstPtrOrConstPtr< PointPredicate > | myPointPredicate |
| CountedConstPtrOrConstPtr< KSpace > | myKSpace |
| double | myH |
| double | myRadius |
Run an Integral Invariant estimator in parallel.
This class is meant as an almost perfect replacement of other IIEstimator. The only difference is the constructor, which needs both a domain splitter instance and the number of threads.
TODO: Value to control output (ie. value + loc, just value or ordered value) TODO: Surface construction on subdomain fonctor ?
| TEstimator | The model of Estimator |
| TSplitter | The function to split the domain |
Definition at line 56 of file ParallelIIEstimator.h.
| using DGtal::ParallelIIEstimator< TEstimator, TSplitter >::Boundary = LightImplicitDigitalSurface<KSpace, PointPredicate> |
Definition at line 72 of file ParallelIIEstimator.h.
| using DGtal::ParallelIIEstimator< TEstimator, TSplitter >::Domain = typename TEstimator::Domain |
Definition at line 61 of file ParallelIIEstimator.h.
| using DGtal::ParallelIIEstimator< TEstimator, TSplitter >::Estimator = TEstimator |
Definition at line 59 of file ParallelIIEstimator.h.
| using DGtal::ParallelIIEstimator< TEstimator, TSplitter >::EstimatorQuantity = typename TEstimator::Quantity |
Definition at line 68 of file ParallelIIEstimator.h.
| using DGtal::ParallelIIEstimator< TEstimator, TSplitter >::KSpace = typename TEstimator::KSpace |
Definition at line 64 of file ParallelIIEstimator.h.
| using DGtal::ParallelIIEstimator< TEstimator, TSplitter >::PointPredicate = typename TEstimator::PointPredicate |
Definition at line 65 of file ParallelIIEstimator.h.
| using DGtal::ParallelIIEstimator< TEstimator, TSplitter >::Quantity = EstimatorQuantity |
Definition at line 69 of file ParallelIIEstimator.h.
| using DGtal::ParallelIIEstimator< TEstimator, TSplitter >::Scalar = typename TEstimator::Scalar |
Definition at line 62 of file ParallelIIEstimator.h.
| using DGtal::ParallelIIEstimator< TEstimator, TSplitter >::Splitter = TSplitter |
Definition at line 60 of file ParallelIIEstimator.h.
| using DGtal::ParallelIIEstimator< TEstimator, TSplitter >::Surface = DigitalSurface<Boundary> |
Definition at line 73 of file ParallelIIEstimator.h.
| using DGtal::ParallelIIEstimator< TEstimator, TSplitter >::Surfel = typename KSpace::Surfel |
Definition at line 66 of file ParallelIIEstimator.h.
| using DGtal::ParallelIIEstimator< TEstimator, TSplitter >::SurfelSet = typename KSpace::SurfelSet |
Definition at line 67 of file ParallelIIEstimator.h.
| using DGtal::ParallelIIEstimator< TEstimator, TSplitter >::Visitor = DepthFirstVisitor<Surface> |
Definition at line 74 of file ParallelIIEstimator.h.
| using DGtal::ParallelIIEstimator< TEstimator, TSplitter >::VisitorRange = GraphVisitorRange<Visitor> |
Definition at line 75 of file ParallelIIEstimator.h.
| DGtal::ParallelIIEstimator< TEstimator, TSplitter >::ParallelIIEstimator | ( | Splitter | splitter, |
| int32_t | nbThread, | ||
| Args &&... | args | ||
| ) |
Constructor.
| Args | The estimator constructor arguments |
| splitter | The domain splitter instance used to partition the domain. |
| nbThread | The number of thread to run in parallel. -1 means as many as possible |
| args | Constructor arguments to underlying estimators |
| void DGtal::ParallelIIEstimator< TEstimator, TSplitter >::attach | ( | ConstAlias< KSpace > | K, |
| ConstAlias< PointPredicate > | aPointPredicate | ||
| ) |
Attach a shape, defined as a functor spel -> boolean
| [in] | K | the cellular grid space in which the shape is defined. |
| aPointPredicate | the shape of interest. The alias can be secured if a some counted pointer is handed. |
| void DGtal::ParallelIIEstimator< TEstimator, TSplitter >::clear | ( | ) |
Clears the object. It is now invalid.
| Quantity DGtal::ParallelIIEstimator< TEstimator, TSplitter >::eval | ( | It | it | ) |
– Estimation –
Compute the integral invariant volume at surfel *it of a shape, then apply the VolumeFunctor to extract some geometric information.
| SurfelConstIterator | type of Iterator on a Surfel |
| [in] | it | iterator pointing on the surfel of the shape where we wish to evaluate some geometric information. |
| Oit DGtal::ParallelIIEstimator< TEstimator, TSplitter >::eval | ( | It | itb, |
| It | ite, | ||
| Oit | result | ||
| ) |
– Estimation –
Compute the integral invariant volume for a range of surfels [itb,ite) on a shape, then apply the VolumeFunctor to extract some geometric information. Return the result on an OutputIterator (param).
| OutputIterator | type of Iterator of an array of Quantity |
| SurfelConstIterator | type of Iterator on a Surfel |
| [in] | itb | iterator defining the start of the range of surfels where we wish to compute some geometric information. |
| [in] | ite | iterator defining the end of the range of surfels where we wish to compute some geometric information. |
| [in] | result | output iterator of results of the computation. |
| Scalar DGtal::ParallelIIEstimator< TEstimator, TSplitter >::h | ( | ) | const |
| void DGtal::ParallelIIEstimator< TEstimator, TSplitter >::init | ( | double | h_, |
| ItA | ite, | ||
| ItB | itb | ||
| ) |
Model of CDigitalSurfaceLocalEstimator. Initialisation.
| SurfelConstIterator | any model of forward readable iterator on Surfel. |
| [in] | h_ | grid size (must be >0). |
| [in] | ite | iterator on the first surfel of the surface. |
| [in] | itb | iterator after the last surfel of the surface. |
| bool DGtal::ParallelIIEstimator< TEstimator, TSplitter >::isValid | ( | ) | const |
Checks the validity/consistency of the object.
| void DGtal::ParallelIIEstimator< TEstimator, TSplitter >::selfDisplay | ( | std::ostream & | out | ) | const |
Writes/Displays the object on an output stream.
| out | the output stream where the object is written. |
| void DGtal::ParallelIIEstimator< TEstimator, TSplitter >::setParams | ( | double | dRadius | ) |
Set specific parameters: the radius of the ball.
| [in] | dRadius | the "digital" radius of the kernel (buy may be non integer). |
|
private |
Definition at line 180 of file ParallelIIEstimator.h.
|
private |
Definition at line 186 of file ParallelIIEstimator.h.
|
private |
Definition at line 184 of file ParallelIIEstimator.h.
|
private |
Definition at line 183 of file ParallelIIEstimator.h.
|
private |
Definition at line 187 of file ParallelIIEstimator.h.
|
private |
Definition at line 181 of file ParallelIIEstimator.h.