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

Detailed Description

template<typename TImage>
template<bool VIsConst>
class itk::ImageRegionRange< 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 ImageRegionRange::iterator, or ImageRegionRange::const_iterator!
See also
ImageRegionRange

Definition at line 103 of file itkImageRegionRange.h.

+ Collaboration diagram for itk::ImageRegionRange< TImage >::QualifiedIterator< VIsConst >:

Public Types

using difference_type = ptrdiff_t
 
using iterator_category = std::bidirectional_iterator_tag
 
using pointer = typename std::iterator_traits< QualifiedBufferIteratorType >::pointer
 
using reference = typename std::iterator_traits< QualifiedBufferIteratorType >::reference
 
using value_type = typename std::iterator_traits< QualifiedBufferIteratorType >::value_type
 

Public Member Functions

reference operator* () const noexcept
 
 QualifiedIterator ()=default
 
template<bool VIsArgumentConst, typename = std::enable_if_t<VIsConst && !VIsArgumentConst>>
 QualifiedIterator (const QualifiedIterator< VIsArgumentConst > &arg) noexcept
 
QualifiedIteratoroperator++ () noexcept
 
QualifiedIterator operator++ (int) noexcept
 
QualifiedIteratoroperator-- () noexcept
 
QualifiedIterator operator-- (int) noexcept
 

Private Types

using QualifiedBufferIteratorType = std::conditional_t< VIsConst, typename ImageBufferRange< TImage >::const_iterator, typename ImageBufferRange< TImage >::iterator >
 

Private Member Functions

template<vcl_size_t VIndex>
void Decrement () noexcept
 
template<vcl_size_t VIndex>
void Increment () noexcept
 
 QualifiedIterator (const QualifiedBufferIteratorType &bufferIterator, const OffsetTableType &offsetTable, const OffsetType &iterationOffset, const SizeType &regionSize) noexcept
 

Private Attributes

QualifiedBufferIteratorType m_BufferIterator {}
 
OffsetType m_IterationOffset { {} }
 
SizeType m_IterationRegionSize { {} }
 
OffsetTableType m_OffsetTable { {} }
 

Friends

class ImageRegionRange
 
bool operator== (const QualifiedIterator &lhs, const QualifiedIterator &rhs) noexcept
 
class QualifiedIterator<!VIsConst >
 
bool operator!= (const QualifiedIterator &lhs, const QualifiedIterator &rhs) noexcept
 

Member Typedef Documentation

◆ difference_type

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

Definition at line 198 of file itkImageRegionRange.h.

◆ iterator_category

template<typename TImage >
template<bool VIsConst>
using itk::ImageRegionRange< TImage >::QualifiedIterator< VIsConst >::iterator_category = std::bidirectional_iterator_tag

Definition at line 202 of file itkImageRegionRange.h.

◆ pointer

template<typename TImage >
template<bool VIsConst>
using itk::ImageRegionRange< TImage >::QualifiedIterator< VIsConst >::pointer = typename std::iterator_traits<QualifiedBufferIteratorType>::pointer

Definition at line 201 of file itkImageRegionRange.h.

◆ QualifiedBufferIteratorType

template<typename TImage >
template<bool VIsConst>
using itk::ImageRegionRange< TImage >::QualifiedIterator< VIsConst >::QualifiedBufferIteratorType = std::conditional_t<VIsConst, typename ImageBufferRange<TImage>::const_iterator, typename ImageBufferRange<TImage>::iterator>
private

Definition at line 117 of file itkImageRegionRange.h.

◆ reference

template<typename TImage >
template<bool VIsConst>
using itk::ImageRegionRange< TImage >::QualifiedIterator< VIsConst >::reference = typename std::iterator_traits<QualifiedBufferIteratorType>::reference

Definition at line 200 of file itkImageRegionRange.h.

◆ value_type

template<typename TImage >
template<bool VIsConst>
using itk::ImageRegionRange< TImage >::QualifiedIterator< VIsConst >::value_type = typename std::iterator_traits<QualifiedBufferIteratorType>::value_type

Definition at line 199 of file itkImageRegionRange.h.

Constructor & Destructor Documentation

◆ QualifiedIterator() [1/3]

template<typename TImage >
template<bool VIsConst>
itk::ImageRegionRange< TImage >::QualifiedIterator< VIsConst >::QualifiedIterator ( const QualifiedBufferIteratorType bufferIterator,
const OffsetTableType offsetTable,
const OffsetType iterationOffset,
const SizeType regionSize 
)
inlineprivatenoexcept

Definition at line 135 of file itkImageRegionRange.h.

◆ QualifiedIterator() [2/3]

template<typename TImage >
template<bool VIsConst>
itk::ImageRegionRange< 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
The other five "special member functions" are defaulted implicitly, following the C++ "Rule of Zero".

◆ QualifiedIterator() [3/3]

template<typename TImage >
template<bool VIsConst>
template<bool VIsArgumentConst, typename = std::enable_if_t<VIsConst && !VIsArgumentConst>>
itk::ImageRegionRange< TImage >::QualifiedIterator< VIsConst >::QualifiedIterator ( const QualifiedIterator< VIsArgumentConst > &  arg)
inlinenoexcept

Constructor for implicit conversion from non-const to const iterator.

Definition at line 216 of file itkImageRegionRange.h.

Member Function Documentation

◆ Decrement()

template<typename TImage >
template<bool VIsConst>
template<vcl_size_t VIndex>
void itk::ImageRegionRange< TImage >::QualifiedIterator< VIsConst >::Decrement ( )
inlineprivatenoexcept

◆ Increment()

template<typename TImage >
template<bool VIsConst>
template<vcl_size_t VIndex>
void itk::ImageRegionRange< TImage >::QualifiedIterator< VIsConst >::Increment ( )
inlineprivatenoexcept

◆ operator*()

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

Returns a reference to the current pixel.

Definition at line 228 of file itkImageRegionRange.h.

References itk::ImageRegionRange< TImage >::QualifiedIterator< VIsConst >::m_BufferIterator.

◆ operator++() [1/2]

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

Prefix increment ('++it').

Definition at line 232 of file itkImageRegionRange.h.

◆ operator++() [2/2]

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

Postfix increment ('it++').

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

Definition at line 243 of file itkImageRegionRange.h.

◆ operator--() [1/2]

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

Prefix decrement ('–it').

Definition at line 254 of file itkImageRegionRange.h.

◆ operator--() [2/2]

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

Postfix increment ('it–').

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

Definition at line 265 of file itkImageRegionRange.h.

Friends And Related Function Documentation

◆ ImageRegionRange

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

Definition at line 112 of file itkImageRegionRange.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 286 of file itkImageRegionRange.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 278 of file itkImageRegionRange.h.

◆ QualifiedIterator<!VIsConst >

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

Definition at line 108 of file itkImageRegionRange.h.

Member Data Documentation

◆ m_BufferIterator

template<typename TImage >
template<bool VIsConst>
QualifiedBufferIteratorType itk::ImageRegionRange< TImage >::QualifiedIterator< VIsConst >::m_BufferIterator {}
private

◆ m_IterationOffset

template<typename TImage >
template<bool VIsConst>
OffsetType itk::ImageRegionRange< TImage >::QualifiedIterator< VIsConst >::m_IterationOffset { {} }
private

◆ m_IterationRegionSize

template<typename TImage >
template<bool VIsConst>
SizeType itk::ImageRegionRange< TImage >::QualifiedIterator< VIsConst >::m_IterationRegionSize { {} }
private

◆ m_OffsetTable

template<typename TImage >
template<bool VIsConst>
OffsetTableType itk::ImageRegionRange< TImage >::QualifiedIterator< VIsConst >::m_OffsetTable { {} }
private

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