|
ITK
6.0.0
Insight Toolkit
|
Go to the documentation of this file.
19 #ifndef itkImageRegionRange_h
20 #define itkImageRegionRange_h
28 #include <type_traits>
71 template <
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;
472 template <
typename TImage>
typename TImage::OffsetType OffsetType
ImageRegionRange(TImage &image)
std::reverse_iterator< iterator > reverse_iterator
std::reverse_iterator< const_iterator > const_reverse_iterator
vcl_size_t size() const noexcept
iterator begin() const noexcept
OffsetTableType m_OffsetTable
typename ImageBufferRange< TImage >::iterator BufferIteratorType
SizeType m_IterationRegionSize
const_iterator cend() const noexcept
typename std::iterator_traits< QualifiedBufferIteratorType >::value_type value_type
void Decrement() noexcept
typename std::iterator_traits< QualifiedBufferIteratorType >::reference reference
~ImageRegionRange()=default
bool empty() const noexcept
ImageBaseType::SizeType SizeType
void Increment() noexcept
QualifiedIterator operator++(int) noexcept
QualifiedIterator & operator--() noexcept
typename std::iterator_traits< QualifiedBufferIteratorType >::pointer pointer
std::conditional_t< UsingPointerAsIterator, const InternalPixelType *, QualifiedIterator< true > > const_iterator
ImageBaseType::IndexType IndexType
friend bool operator==(const QualifiedIterator &lhs, const QualifiedIterator &rhs) noexcept
ptrdiff_t difference_type
QualifiedIterator(const QualifiedBufferIteratorType &bufferIterator, const OffsetTableType &offsetTable, const OffsetType &iterationOffset, const SizeType ®ionSize) noexcept
QualifiedIterator()=default
static constexpr ImageDimensionType ImageDimension
QualifiedIterator operator--(int) noexcept
ImageBaseType::RegionType RegionType
OffsetTableType m_OffsetTable
reverse_iterator rbegin() const noexcept
static void ComputeOffset(const IndexType &bufferedRegionIndex, const IndexType &index, [[maybe_unused]] const OffsetValueType offsetTable[], OffsetValueType &offset)
reverse_iterator rend() const noexcept
QualifiedIterator< IsImageTypeConst > iterator
iterator end() const noexcept
const_reverse_iterator crend() const noexcept
IndexType m_BufferedRegionIndex
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
ImageRegionRange(TImage &) -> ImageRegionRange< TImage >
OffsetType m_IterationOffset
static constexpr bool IsImageTypeConst
typename TImage::SizeType SizeType
IndexType m_IterationRegionIndex
typename RegionType::IndexType IndexType
QualifiedBufferIteratorType m_BufferIterator
reference operator*() const noexcept
const_iterator cbegin() const noexcept
BufferIteratorType m_BufferBegin
const_reverse_iterator crbegin() const noexcept
typename TImage::PixelType PixelType
QualifiedIterator & operator++() noexcept
typename TImage::RegionType RegionType
typename TImage::ImageDimensionType ImageDimensionType
QualifiedIterator< true > const_iterator
static OffsetValueType ComputeOffset(const OffsetTableType &offsetTable, const IndexType &bufferedRegionIndex, const IndexType &index)
friend bool operator!=(const QualifiedIterator &lhs, const QualifiedIterator &rhs) noexcept
QualifiedIterator(const QualifiedIterator< VIsArgumentConst > &arg) noexcept
std::conditional_t< UsingPointerAsIterator, QualifiedInternalPixelType *, QualifiedIterator< IsImageTypeConst > > iterator
unsigned long SizeValueType
std::conditional_t< VIsConst, typename ImageBufferRange< TImage >::const_iterator, typename ImageBufferRange< TImage >::iterator > QualifiedBufferIteratorType
ImageRegionRange() noexcept=default
SizeType m_IterationRegionSize
std::bidirectional_iterator_tag iterator_category