![Logo](itkLogoSmall.png) |
ITK
5.1.0
Insight Toolkit
|
Go to the documentation of this file.
19 #ifndef itkImageRegionRange_h
20 #define itkImageRegionRange_h
28 #include <type_traits>
36 namespace Experimental
73 template <
typename TImage>
104 template <
bool VIsConst>
140 const SizeType & regionSize) ITK_NOEXCEPT
150 template <std::
size_t VIndex>
153 static_assert(VIndex < (
ImageDimension - 1),
"For a larger index value, the other overload should be picked");
161 this->Increment<VIndex + 1>(std::integral_constant<
bool, (VIndex + 1) < (
ImageDimension - 1)>{});
165 template <std::
size_t VIndex>
168 static_assert(VIndex == (
ImageDimension - 1),
"For a smaller index value, the other overload should be picked");
175 template <std::
size_t VIndex>
178 static_assert(VIndex < (
ImageDimension - 1),
"For a larger index value, the other overload should be picked");
186 this->Decrement<VIndex + 1>(std::integral_constant<
bool, (VIndex + 1) < (
ImageDimension - 1)>{});
190 template <std::
size_t VIndex>
193 static_assert(VIndex == (
ImageDimension - 1),
"For a smaller index value, the other overload should be picked");
203 using value_type =
typename std::iterator_traits<QualifiedBufferIteratorType>::value_type;
204 using reference =
typename std::iterator_traits<QualifiedBufferIteratorType>::reference;
205 using pointer =
typename std::iterator_traits<QualifiedBufferIteratorType>::pointer;
235 this->Increment<0>(std::integral_constant<
bool, (
ImageDimension > 1)>{});
257 this->Decrement<0>(std::integral_constant<
bool, (
ImageDimension > 1)>{});
281 return lhs.m_BufferIterator == rhs.m_BufferIterator;
290 return !(lhs == rhs);
309 bufferedRegionIndex, index, offsetTable.
data(), offsetValue);
351 assert(offsetTable !=
nullptr);
354 if (iterationRegion.GetNumberOfPixels() > 0)
360 const auto & bufferedRegion = image.GetBufferedRegion();
362 itkAssertOrThrowMacro((bufferedRegion.IsInside(iterationRegion)),
363 "Iteration region " << iterationRegion <<
" is outside of buffered region "
411 return this->
begin();
456 return std::accumulate(
467 return sizeValue == 0;
void Decrement(std::true_type) noexcept
QualifiedIterator & operator++() noexcept
QualifiedIterator & operator=(const QualifiedIterator &) noexcept=default
typename std::conditional< VIsConst, typename ImageBufferRange< TImage >::const_iterator, typename ImageBufferRange< TImage >::iterator >::type QualifiedBufferIteratorType
SizeType m_IterationRegionSize
iterator end() const noexcept
BufferIteratorType m_BufferBegin
OffsetTableType m_OffsetTable
typename TImage::PixelType PixelType
reverse_iterator rbegin() const noexcept
IndexType m_IterationRegionIndex
QualifiedIterator< true > const_iterator
typename TImage::RegionType RegionType
~QualifiedIterator()=default
OffsetType m_IterationOffset
const_iterator cend() const noexcept
std::reverse_iterator< iterator > reverse_iterator
ImageBaseType::SizeType SizeType
QualifiedIterator operator--(int) noexcept
typename TImage::OffsetType OffsetType
typename std::iterator_traits< QualifiedBufferIteratorType >::value_type value_type
ImageRegionRange() noexcept=default
typename std::iterator_traits< QualifiedBufferIteratorType >::pointer pointer
OffsetTableType m_OffsetTable
const_reverse_iterator crend() const noexcept
QualifiedIterator(const QualifiedIterator< false > &arg) noexcept
typename RegionType::IndexType IndexType
typename ImageBufferRange< TImage >::iterator BufferIteratorType
std::reverse_iterator< const_iterator > const_reverse_iterator
ImageBaseType::IndexType IndexType
typename std::conditional< UsingPointerAsIterator, QualifiedInternalPixelType *, QualifiedIterator< IsImageTypeConst > >::type iterator
QualifiedIterator()=default
reverse_iterator rend() const noexcept
ImageBaseType::RegionType RegionType
static constexpr ImageDimensionType ImageDimension
QualifiedIterator operator++(int) noexcept
typename TImage::SizeType SizeType
reference operator*() const noexcept
void Increment(std::true_type) noexcept
friend bool operator!=(const QualifiedIterator &lhs, const QualifiedIterator &rhs) noexcept
QualifiedBufferIteratorType m_BufferIterator
void Decrement(std::false_type) noexcept
QualifiedIterator< IsImageTypeConst > iterator
iterator begin() const noexcept
typename std::iterator_traits< QualifiedBufferIteratorType >::reference reference
bool empty() const noexcept
const_reverse_iterator crbegin() const noexcept
void Increment(std::false_type) noexcept
SizeType m_IterationRegionSize
ImageRegionRange(TImage &image)
std::ptrdiff_t difference_type
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
const_iterator cbegin() const noexcept
static constexpr bool IsImageTypeConst
signed long OffsetValueType
~ImageRegionRange()=default
typename std::conditional< UsingPointerAsIterator, const InternalPixelType *, QualifiedIterator< true > >::type const_iterator
friend bool operator==(const QualifiedIterator &lhs, const QualifiedIterator &rhs) noexcept
static OffsetValueType ComputeOffset(const OffsetTableType &offsetTable, const IndexType &bufferedRegionIndex, const IndexType &index)
typename TImage::ImageDimensionType ImageDimensionType
std::bidirectional_iterator_tag iterator_category
std::vcl_size_t size() const noexcept
unsigned long SizeValueType
QualifiedIterator(const QualifiedBufferIteratorType &bufferIterator, const OffsetTableType &offsetTable, const OffsetType &iterationOffset, const SizeType ®ionSize) noexcept
IndexType m_BufferedRegionIndex
QualifiedIterator & operator--() noexcept
static void ComputeOffset(const IndexType &bufferedRegionIndex, const IndexType &index, const OffsetValueType offsetTable[], OffsetValueType &offset)