ITK  5.3.0
Insight Toolkit
Classes | Public Types | Public Member Functions | Private Types | Private Member Functions | Private Attributes | Static Private Attributes | Friends | List of all members
itk::ImageBufferRange< TImage >::QualifiedIterator< VIsConst > Class Template Referencefinal

Classes

class  PixelReferenceWrapper
 

Public Types

using difference_type = std::ptrdiff_t
 
using iterator_category = std::random_access_iterator_tag
 
using pointer = QualifiedPixelType *
 
using reference = std::conditional_t< SupportsDirectPixelAccess, QualifiedPixelType &, PixelProxy< IsImageTypeConst > >
 
using value_type = PixelType
 

Public Member Functions

 QualifiedIterator ()=default
 

Private Types

using QualifiedImageType = std::conditional_t< VIsConst, const ImageType, ImageType >
 
using QualifiedInternalPixelType = std::conditional_t< IsImageTypeConst, const InternalPixelType, InternalPixelType >
 
using QualifiedPixelType = std::conditional_t< IsImageTypeConst, const PixelType, PixelType >
 

Private Member Functions

 QualifiedIterator (const OptionalAccessorFunctorType &accessorFunctor, QualifiedInternalPixelType *const internalPixelPointer) noexcept
 

Private Attributes

QualifiedInternalPixelTypem_InternalPixelPointer = nullptr
 
OptionalAccessorFunctorType m_OptionalAccessorFunctor
 

Static Private Attributes

static constexpr bool IsImageTypeConst = std::is_const<QualifiedImageType>::value
 

Friends

class ImageBufferRange
 
class QualifiedIterator<!VIsConst >
 
bool operator== (const QualifiedIterator &lhs, const QualifiedIterator &rhs) noexcept
 
bool operator!= (const QualifiedIterator &lhs, const QualifiedIterator &rhs) noexcept
 
bool operator< (const QualifiedIterator &lhs, const QualifiedIterator &rhs) noexcept
 
bool operator> (const QualifiedIterator &lhs, const QualifiedIterator &rhs) noexcept
 
bool operator<= (const QualifiedIterator &lhs, const QualifiedIterator &rhs) noexcept
 
bool operator>= (const QualifiedIterator &lhs, const QualifiedIterator &rhs) noexcept
 
QualifiedIteratoroperator+= (QualifiedIterator &it, const difference_type n) noexcept
 
QualifiedIteratoroperator-= (QualifiedIterator &it, const difference_type n) noexcept
 
difference_type operator- (const QualifiedIterator &lhs, const QualifiedIterator &rhs) noexcept
 
QualifiedIterator operator+ (QualifiedIterator it, const difference_type n) noexcept
 
QualifiedIterator operator+ (const difference_type n, QualifiedIterator it) noexcept
 
QualifiedIterator operator- (QualifiedIterator it, const difference_type n) noexcept
 
 QualifiedIterator (const QualifiedIterator< false > &arg) noexcept
 
reference operator* () const noexcept
 
QualifiedIteratoroperator++ () noexcept
 
QualifiedIterator operator++ (int) noexcept
 
QualifiedIteratoroperator-- () noexcept
 
QualifiedIterator operator-- (int) noexcept
 
reference operator[] (const difference_type n) const noexcept
 
QualifiedIteratoroperator= (const QualifiedIterator &) noexcept=default
 

Detailed Description

template<typename TImage>
template<bool VIsConst>
class itk::ImageBufferRange< TImage >::QualifiedIterator< VIsConst >

Iterator class that is either 'const' or non-const qualified. A non-const qualified instantiation of this template allows the pixel that it points to, to be modified. A const qualified instantiation does not.

Note
The definition of this class is private. Please use its type alias ImageBufferRange::iterator, or ImageBufferRange::const_iterator!
See also
ImageBufferRange

Definition at line 228 of file itkImageBufferRange.h.

Member Typedef Documentation

◆ difference_type

template<typename TImage>
template<bool VIsConst>
using itk::ImageBufferRange< TImage >::QualifiedIterator< VIsConst >::difference_type = std::ptrdiff_t

Definition at line 292 of file itkImageBufferRange.h.

◆ iterator_category

template<typename TImage>
template<bool VIsConst>
using itk::ImageBufferRange< TImage >::QualifiedIterator< VIsConst >::iterator_category = std::random_access_iterator_tag

Definition at line 296 of file itkImageBufferRange.h.

◆ pointer

template<typename TImage>
template<bool VIsConst>
using itk::ImageBufferRange< TImage >::QualifiedIterator< VIsConst >::pointer = QualifiedPixelType *

Definition at line 295 of file itkImageBufferRange.h.

◆ QualifiedImageType

template<typename TImage>
template<bool VIsConst>
using itk::ImageBufferRange< TImage >::QualifiedIterator< VIsConst >::QualifiedImageType = std::conditional_t<VIsConst, const ImageType, ImageType>
private

Definition at line 240 of file itkImageBufferRange.h.

◆ QualifiedInternalPixelType

template<typename TImage>
template<bool VIsConst>
using itk::ImageBufferRange< TImage >::QualifiedIterator< VIsConst >::QualifiedInternalPixelType = std::conditional_t<IsImageTypeConst, const InternalPixelType, InternalPixelType>
private

Definition at line 244 of file itkImageBufferRange.h.

◆ QualifiedPixelType

template<typename TImage>
template<bool VIsConst>
using itk::ImageBufferRange< TImage >::QualifiedIterator< VIsConst >::QualifiedPixelType = std::conditional_t<IsImageTypeConst, const PixelType, PixelType>
private

Definition at line 247 of file itkImageBufferRange.h.

◆ reference

template<typename TImage>
template<bool VIsConst>
using itk::ImageBufferRange< TImage >::QualifiedIterator< VIsConst >::reference = std::conditional_t<SupportsDirectPixelAccess, QualifiedPixelType &, PixelProxy<IsImageTypeConst> >

Definition at line 294 of file itkImageBufferRange.h.

◆ value_type

template<typename TImage>
template<bool VIsConst>
using itk::ImageBufferRange< TImage >::QualifiedIterator< VIsConst >::value_type = PixelType

Definition at line 293 of file itkImageBufferRange.h.

Constructor & Destructor Documentation

◆ QualifiedIterator() [1/3]

template<typename TImage>
template<bool VIsConst>
itk::ImageBufferRange< TImage >::QualifiedIterator< VIsConst >::QualifiedIterator ( const OptionalAccessorFunctorType accessorFunctor,
QualifiedInternalPixelType *const  internalPixelPointer 
)
inlineprivatenoexcept

Definition at line 282 of file itkImageBufferRange.h.

◆ QualifiedIterator() [2/3]

template<typename TImage>
template<bool VIsConst>
itk::ImageBufferRange< TImage >::QualifiedIterator< VIsConst >::QualifiedIterator ( )
default

Default-constructor, as required for any C++11 Forward Iterator. Offers the guarantee added to the C++14 Standard: "value-initialized iterators may be compared and shall compare equal to other value-initialized iterators of the same type." \note `QualifiedIterator<VIsConst>` follows the C++ "Rule of Zero" when VIsConst is true: The other five "special member functions" of the class are then implicitly defaulted. When VIsConst is false, its copy-constructor is provided explicitly, but it still behaves the same as a default implementation.

◆ QualifiedIterator() [3/3]

template<typename TImage>
template<bool VIsConst>
itk::ImageBufferRange< TImage >::QualifiedIterator< VIsConst >::QualifiedIterator ( const QualifiedIterator< false > &  arg)
inlinenoexcept

Constructor that allows implicit conversion from non-const to const iterator. Also serves as copy-constructor of a non-const iterator.

Definition at line 313 of file itkImageBufferRange.h.

Member Function Documentation

◆ operator*()

template<typename TImage>
template<bool VIsConst>
reference itk::ImageBufferRange< TImage >::QualifiedIterator< VIsConst >::operator* ( ) const
inlinenoexcept

◆ operator++() [1/2]

template<typename TImage>
template<bool VIsConst>
QualifiedIterator& itk::ImageBufferRange< TImage >::QualifiedIterator< VIsConst >::operator++ ( )
inlinenoexcept

◆ operator++() [2/2]

template<typename TImage>
template<bool VIsConst>
QualifiedIterator itk::ImageBufferRange< TImage >::QualifiedIterator< VIsConst >::operator++ ( int  )
inlinenoexcept

Postfix increment ('it++').

Note
Usually prefix increment ('++it') is preferable.

Definition at line 347 of file itkImageBufferRange.h.

◆ operator--() [1/2]

template<typename TImage>
template<bool VIsConst>
QualifiedIterator& itk::ImageBufferRange< TImage >::QualifiedIterator< VIsConst >::operator-- ( )
inlinenoexcept

◆ operator--() [2/2]

template<typename TImage>
template<bool VIsConst>
QualifiedIterator itk::ImageBufferRange< TImage >::QualifiedIterator< VIsConst >::operator-- ( int  )
inlinenoexcept

Postfix increment ('it–').

Note
Usually prefix increment ('–it') is preferable.

Definition at line 370 of file itkImageBufferRange.h.

◆ operator=()

template<typename TImage>
template<bool VIsConst>
QualifiedIterator& itk::ImageBufferRange< TImage >::QualifiedIterator< VIsConst >::operator= ( const QualifiedIterator< VIsConst > &  )
defaultnoexcept

Explicitly-defaulted assignment operator.

◆ operator[]()

template<typename TImage>
template<bool VIsConst>
reference itk::ImageBufferRange< TImage >::QualifiedIterator< VIsConst >::operator[] ( const difference_type  n) const
inlinenoexcept

Returns it[n] for iterator 'it' and integer value 'n'.

Definition at line 484 of file itkImageBufferRange.h.

Friends And Related Function Documentation

◆ ImageBufferRange

template<typename TImage>
template<bool VIsConst>
friend class ImageBufferRange
friend

Definition at line 237 of file itkImageBufferRange.h.

◆ operator!=

template<typename TImage>
template<bool VIsConst>
bool operator!= ( const QualifiedIterator< VIsConst > &  lhs,
const QualifiedIterator< VIsConst > &  rhs 
)
friend

Returns (it1 != it2) for iterators it1 and it2.

Definition at line 391 of file itkImageBufferRange.h.

◆ operator+ [1/2]

template<typename TImage>
template<bool VIsConst>
QualifiedIterator operator+ ( const difference_type  n,
QualifiedIterator< VIsConst >  it 
)
friend

Returns (n + it) for iterator 'it' and integer value 'n'.

Definition at line 469 of file itkImageBufferRange.h.

◆ operator+ [2/2]

template<typename TImage>
template<bool VIsConst>
QualifiedIterator operator+ ( QualifiedIterator< VIsConst >  it,
const difference_type  n 
)
friend

Returns (it + n) for iterator 'it' and integer value 'n'.

Definition at line 461 of file itkImageBufferRange.h.

◆ operator+=

template<typename TImage>
template<bool VIsConst>
QualifiedIterator& operator+= ( QualifiedIterator< VIsConst > &  it,
const difference_type  n 
)
friend

Does (it += d) for iterator 'it' and integer value 'n'.

Definition at line 435 of file itkImageBufferRange.h.

◆ operator- [1/2]

template<typename TImage>
template<bool VIsConst>
difference_type operator- ( const QualifiedIterator< VIsConst > &  lhs,
const QualifiedIterator< VIsConst > &  rhs 
)
friend

Returns (it1 - it2) for iterators it1 and it2.

Definition at line 453 of file itkImageBufferRange.h.

◆ operator- [2/2]

template<typename TImage>
template<bool VIsConst>
QualifiedIterator operator- ( QualifiedIterator< VIsConst >  it,
const difference_type  n 
)
friend

Returns (it - n) for iterator 'it' and integer value 'n'.

Definition at line 477 of file itkImageBufferRange.h.

◆ operator-=

template<typename TImage>
template<bool VIsConst>
QualifiedIterator& operator-= ( QualifiedIterator< VIsConst > &  it,
const difference_type  n 
)
friend

Does (it -= d) for iterator 'it' and integer value 'n'.

Definition at line 444 of file itkImageBufferRange.h.

◆ operator<

template<typename TImage>
template<bool VIsConst>
bool operator< ( const QualifiedIterator< VIsConst > &  lhs,
const QualifiedIterator< VIsConst > &  rhs 
)
friend

Returns (it1 < it2) for iterators it1 and it2.

Definition at line 400 of file itkImageBufferRange.h.

◆ operator<=

template<typename TImage>
template<bool VIsConst>
bool operator<= ( const QualifiedIterator< VIsConst > &  lhs,
const QualifiedIterator< VIsConst > &  rhs 
)
friend

Returns (it1 <= it2) for iterators it1 and it2.

Definition at line 417 of file itkImageBufferRange.h.

◆ operator==

template<typename TImage>
template<bool VIsConst>
bool operator== ( const QualifiedIterator< VIsConst > &  lhs,
const QualifiedIterator< VIsConst > &  rhs 
)
friend

Returns (it1 == it2) for iterators it1 and it2. Note that these iterators should be from the same range. This operator does not support comparing iterators from different ranges.

Definition at line 383 of file itkImageBufferRange.h.

◆ operator>

template<typename TImage>
template<bool VIsConst>
bool operator> ( const QualifiedIterator< VIsConst > &  lhs,
const QualifiedIterator< VIsConst > &  rhs 
)
friend

Returns (it1 > it2) for iterators it1 and it2.

Definition at line 408 of file itkImageBufferRange.h.

◆ operator>=

template<typename TImage>
template<bool VIsConst>
bool operator>= ( const QualifiedIterator< VIsConst > &  lhs,
const QualifiedIterator< VIsConst > &  rhs 
)
friend

Returns (it1 >= it2) for iterators it1 and it2.

Definition at line 426 of file itkImageBufferRange.h.

◆ QualifiedIterator<!VIsConst >

template<typename TImage>
template<bool VIsConst>
friend class QualifiedIterator<!VIsConst >
friend

Definition at line 233 of file itkImageBufferRange.h.

Member Data Documentation

◆ IsImageTypeConst

template<typename TImage>
template<bool VIsConst>
constexpr bool itk::ImageBufferRange< TImage >::QualifiedIterator< VIsConst >::IsImageTypeConst = std::is_const<QualifiedImageType>::value
staticconstexprprivate

Definition at line 242 of file itkImageBufferRange.h.

◆ m_InternalPixelPointer

template<typename TImage>
template<bool VIsConst>
QualifiedInternalPixelType* itk::ImageBufferRange< TImage >::QualifiedIterator< VIsConst >::m_InternalPixelPointer = nullptr
private

◆ m_OptionalAccessorFunctor

template<typename TImage>
template<bool VIsConst>
OptionalAccessorFunctorType itk::ImageBufferRange< TImage >::QualifiedIterator< VIsConst >::m_OptionalAccessorFunctor
private

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