DGtal 1.3.0
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Private Attributes
DGtal::IteratorCompletionTraits< ArrayImageAdapter< TArrayIterator, TDomain > >::DistanceFunctor Class Reference

#include <DGtal/images/ArrayImageAdapter.h>

Public Types

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

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. More...
 

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.

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 {
418 ASSERT_MSG(
419 myDomain.isInside(aPoint),
420 "The point is outside the domain !"
421 );
423 }
Linearizer< Domain, ColMajorStorage > Linearizer
const Point aPoint(3, 4)

References aPoint().

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.


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