File failed to load: https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.3/config/TeX-MML-AM_CHTML/MathJax.js
DGtal 2.0.0
DGtal::IteratorCompletionTraits< ArrayImageAdapter< TArrayIterator, TDomain > >::DistanceFunctor Class Reference

#include <DGtal/images/ArrayImageAdapter.h>

Public Types

using Domain = typename Self::Domain
 Domain type.
using Point = typename Self::Point
 Point type.
using Difference = typename Self::Difference
 Type of the difference between two iterators.

Public Member Functions

 DistanceFunctor (Self const *anImage)
Difference operator() (Point const &aPoint) const

Private Attributes

Domain myDomain
 Stored domain to avoid iterator corruption if domain changed.

Detailed Description

template<typename TArrayIterator, typename TDomain>
class DGtal::IteratorCompletionTraits< ArrayImageAdapter< TArrayIterator, TDomain > >::DistanceFunctor

Functor that returns the distance between the domain's lower bound and a given point.

See also
SimpleRandomAccessRangeFromPoint and SimpleRandomAccessConstRangeFromPoint.

Definition at line 398 of file ArrayImageAdapter.h.

Member Typedef Documentation

◆ Difference

template<typename TArrayIterator, typename TDomain>
using DGtal::IteratorCompletionTraits< ArrayImageAdapter< TArrayIterator, TDomain > >::DistanceFunctor::Difference = typename Self::Difference

Type of the difference between two iterators.

Definition at line 403 of file ArrayImageAdapter.h.

◆ Domain

template<typename TArrayIterator, typename TDomain>
using DGtal::IteratorCompletionTraits< ArrayImageAdapter< TArrayIterator, TDomain > >::DistanceFunctor::Domain = typename Self::Domain

Domain type.

Definition at line 401 of file ArrayImageAdapter.h.

◆ Point

template<typename TArrayIterator, typename TDomain>
using DGtal::IteratorCompletionTraits< ArrayImageAdapter< TArrayIterator, TDomain > >::DistanceFunctor::Point = typename Self::Point

Point type.

Definition at line 402 of file ArrayImageAdapter.h.

Constructor & Destructor Documentation

◆ DistanceFunctor()

template<typename TArrayIterator, typename TDomain>
DGtal::IteratorCompletionTraits< ArrayImageAdapter< TArrayIterator, TDomain > >::DistanceFunctor::DistanceFunctor ( Self const * anImage)
inline

Constructor from an image.

Parameters
anImageConstant pointer to an image.

Definition at line 408 of file ArrayImageAdapter.h.

409 : myDomain( anImage->domain() )
410 {}
Domain myDomain
Stored domain to avoid iterator corruption if domain changed.
Aim: Traits that must be specialized for each IteratorCompletion derived class.

References domain, and myDomain.

Member Function Documentation

◆ operator()()

template<typename TArrayIterator, typename TDomain>
Difference DGtal::IteratorCompletionTraits< ArrayImageAdapter< TArrayIterator, TDomain > >::DistanceFunctor::operator() ( Point const & aPoint) const
inline

Return the distance between the domain's lower bound and the given point.

Parameters
aPointThe point.
Returns
the distance.

Definition at line 416 of file ArrayImageAdapter.h.

417 {
419 myDomain.isInside(aPoint),
420 "The point is outside the domain !"
421 );
423 }

References aPoint, and myDomain.

Field Documentation

◆ myDomain

template<typename TArrayIterator, typename TDomain>
Domain DGtal::IteratorCompletionTraits< ArrayImageAdapter< TArrayIterator, TDomain > >::DistanceFunctor::myDomain
private

Stored domain to avoid iterator corruption if domain changed.

Definition at line 426 of file ArrayImageAdapter.h.

Referenced by DistanceFunctor(), and operator()().


The documentation for this class was generated from the following file: