19#ifndef itkImageRegionRange_h
20#define itkImageRegionRange_h
71template <
typename TImage>
102 template <
bool VIsConst>
138 const SizeType & regionSize) noexcept
148 template <
size_t VIndex>
160 this->Increment<VIndex + 1>();
172 template <
size_t VIndex>
184 this->Decrement<VIndex + 1>();
199 using value_type =
typename std::iterator_traits<QualifiedBufferIteratorType>::value_type;
200 using reference =
typename std::iterator_traits<QualifiedBufferIteratorType>::reference;
201 using pointer =
typename std::iterator_traits<QualifiedBufferIteratorType>::pointer;
215 template <
bool VIsArgumentConst,
typename = std::enable_if_t<VIsConst && !VIsArgumentConst>>
234 this->Increment<0>();
256 this->Decrement<0>();
280 return lhs.m_BufferIterator == rhs.m_BufferIterator;
289 return !(lhs == rhs);
300 bufferedRegionIndex, index, offsetTable.
data(), offsetValue);
343 assert(offsetTable !=
nullptr);
346 if (iterationRegion.GetNumberOfPixels() > 0)
352 const auto & bufferedRegion = image.GetBufferedRegion();
354 itkAssertOrThrowMacro((bufferedRegion.IsInside(iterationRegion)),
355 "Iteration region " << iterationRegion <<
" is outside of buffered region "
404 return this->
begin();
449 return std::accumulate(
460 return sizeValue == 0;
472template <
typename TImage>
std::conditional_t< UsingPointerAsIterator, QualifiedInternalPixelType *, QualifiedIterator< IsImageTypeConst > > iterator
std::conditional_t< UsingPointerAsIterator, const InternalPixelType *, QualifiedIterator< true > > const_iterator
static void ComputeOffset(const IndexType &bufferedRegionIndex, const IndexType &index, const OffsetValueType offsetTable[], OffsetValueType &offset)
friend bool operator!=(const QualifiedIterator &lhs, const QualifiedIterator &rhs) noexcept
void Increment() noexcept
typename std::iterator_traits< QualifiedBufferIteratorType >::reference reference
void Decrement() noexcept
QualifiedIterator & operator--() noexcept
QualifiedIterator operator--(int) noexcept
QualifiedIterator()=default
QualifiedIterator(const QualifiedIterator< VIsArgumentConst > &arg) noexcept
QualifiedIterator & operator++() noexcept
ptrdiff_t difference_type
friend bool operator==(const QualifiedIterator &lhs, const QualifiedIterator &rhs) noexcept
typename std::iterator_traits< QualifiedBufferIteratorType >::pointer pointer
typename std::iterator_traits< QualifiedBufferIteratorType >::value_type value_type
OffsetTableType m_OffsetTable
std::conditional_t< VIsConst, typename ImageBufferRange< TImage >::const_iterator, typename ImageBufferRange< TImage >::iterator > QualifiedBufferIteratorType
QualifiedIterator operator++(int) noexcept
OffsetType m_IterationOffset
reference operator*() const noexcept
QualifiedIterator(const QualifiedBufferIteratorType &bufferIterator, const OffsetTableType &offsetTable, const OffsetType &iterationOffset, const SizeType ®ionSize) noexcept
std::bidirectional_iterator_tag iterator_category
SizeType m_IterationRegionSize
QualifiedBufferIteratorType m_BufferIterator
typename RegionType::IndexType IndexType
typename TImage::ImageDimensionType ImageDimensionType
iterator begin() const noexcept
QualifiedIterator< true > const_iterator
const_reverse_iterator crbegin() const noexcept
OffsetTableType m_OffsetTable
SizeType m_IterationRegionSize
reverse_iterator rbegin() const noexcept
IndexType m_IterationRegionIndex
IndexType m_BufferedRegionIndex
ImageRegionRange(TImage &image)
typename TImage::RegionType RegionType
reverse_iterator rend() const noexcept
BufferIteratorType m_BufferBegin
const_iterator cend() const noexcept
ImageRegionRange() noexcept=default
iterator end() const noexcept
typename ImageBufferRange< TImage >::iterator BufferIteratorType
const_iterator cbegin() const noexcept
typename TImage::SizeType SizeType
static OffsetValueType ComputeOffset(const OffsetTableType &offsetTable, const IndexType &bufferedRegionIndex, const IndexType &index)
std::reverse_iterator< const_iterator > const_reverse_iterator
vcl_size_t size() const noexcept
std::reverse_iterator< iterator > reverse_iterator
const_reverse_iterator crend() const noexcept
typename TImage::PixelType PixelType
typename TImage::OffsetType OffsetType
~ImageRegionRange()=default
QualifiedIterator< IsImageTypeConst > iterator
static constexpr ImageDimensionType ImageDimension
static constexpr bool IsImageTypeConst
bool empty() const noexcept
ImageBaseType::RegionType RegionType
ImageBaseType::IndexType IndexType
ImageBaseType::SizeType SizeType
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
ImageRegionRange(TImage &) -> ImageRegionRange< TImage >
unsigned long SizeValueType