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

Detailed Description

template<typename TImage>
template<bool VIsConst>
class itk::Experimental::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 239 of file itkImageBufferRange.h.

Classes

class  PixelReferenceWrapper
 

Public Types

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

Public Member Functions

reference operator* () const noexcept
 
QualifiedIteratoroperator= (const QualifiedIterator &) noexcept=default
 
reference operator[] (const difference_type n) const noexcept
 
 QualifiedIterator ()=default
 
 QualifiedIterator (const QualifiedIterator< false > &arg) noexcept
 
QualifiedIteratoroperator++ () noexcept
 
QualifiedIterator operator++ (int) noexcept
 
QualifiedIteratoroperator-- () noexcept
 
QualifiedIterator operator-- (int) noexcept
 

Private Types

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

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
 
bool 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
 
difference_type operator- (const QualifiedIterator &lhs, const QualifiedIterator &rhs) noexcept
 
QualifiedIterator operator- (QualifiedIterator it, const difference_type n) 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
 
class QualifiedIterator<!VIsConst >
 
QualifiedIteratoroperator+= (QualifiedIterator &it, const difference_type n) noexcept
 
QualifiedIteratoroperator-= (QualifiedIterator &it, const difference_type n) noexcept
 

Member Typedef Documentation

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

Definition at line 312 of file itkImageBufferRange.h.

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

Definition at line 317 of file itkImageBufferRange.h.

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

Definition at line 316 of file itkImageBufferRange.h.

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

Definition at line 251 of file itkImageBufferRange.h.

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

Definition at line 255 of file itkImageBufferRange.h.

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

Definition at line 258 of file itkImageBufferRange.h.

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

Definition at line 315 of file itkImageBufferRange.h.

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

Definition at line 313 of file itkImageBufferRange.h.

Constructor & Destructor Documentation

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

Definition at line 299 of file itkImageBufferRange.h.

template<typename TImage >
template<bool VIsConst>
itk::Experimental::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.

template<typename TImage >
template<bool VIsConst>
itk::Experimental::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 334 of file itkImageBufferRange.h.

Member Function Documentation

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

Postfix increment ('it++').

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

Definition at line 369 of file itkImageBufferRange.h.

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

Postfix increment ('it–').

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

Definition at line 390 of file itkImageBufferRange.h.

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

Explicitly-defaulted assignment operator.

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

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

Definition at line 492 of file itkImageBufferRange.h.

Friends And Related Function Documentation

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

Definition at line 248 of file itkImageBufferRange.h.

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 409 of file itkImageBufferRange.h.

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 471 of file itkImageBufferRange.h.

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 478 of file itkImageBufferRange.h.

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 448 of file itkImageBufferRange.h.

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 464 of file itkImageBufferRange.h.

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 485 of file itkImageBufferRange.h.

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 456 of file itkImageBufferRange.h.

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.

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 432 of file itkImageBufferRange.h.

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 402 of file itkImageBufferRange.h.

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 424 of file itkImageBufferRange.h.

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 440 of file itkImageBufferRange.h.

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

Definition at line 244 of file itkImageBufferRange.h.

Member Data Documentation

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

Definition at line 253 of file itkImageBufferRange.h.

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

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