ITK
6.0.0
Insight Toolkit
|
#include <itkImageRegionRange.h>
Modern C++11 range to iterate over the pixels of an image region. Designed to conform to Standard C++ Iterator requirements, so that it can be used in range-based for loop, and passed to Standard C++ algorithms.
The following example adds 42 to each pixel, using a range-based for loop:
The following example prints the values of the pixels:
Definition at line 72 of file itkImageRegionRange.h.
Classes | |
class | QualifiedIterator |
Public Types | |
using | const_iterator = QualifiedIterator< true > |
using | const_reverse_iterator = std::reverse_iterator< const_iterator > |
using | iterator = QualifiedIterator< IsImageTypeConst > |
using | reverse_iterator = std::reverse_iterator< iterator > |
Public Member Functions | |
const_iterator | cbegin () const noexcept |
const_iterator | cend () const noexcept |
const_reverse_iterator | crbegin () const noexcept |
const_reverse_iterator | crend () const noexcept |
ImageRegionRange () noexcept=default | |
ImageRegionRange (TImage &image) | |
~ImageRegionRange ()=default | |
ImageRegionRange (TImage &image, const RegionType &iterationRegion) | |
iterator | begin () const noexcept |
iterator | end () const noexcept |
reverse_iterator | rbegin () const noexcept |
reverse_iterator | rend () const noexcept |
vcl_size_t | size () const noexcept |
bool | empty () const noexcept |
Private Types | |
using | BufferIteratorType = typename ImageBufferRange< TImage >::iterator |
using | ImageDimensionType = typename TImage::ImageDimensionType |
using | IndexType = typename RegionType::IndexType |
using | OffsetTableType = Offset< ImageDimension+1 > |
using | OffsetType = typename TImage::OffsetType |
using | PixelType = typename TImage::PixelType |
using | RegionType = typename TImage::RegionType |
using | Self = ImageRegionRange |
using | SizeType = typename TImage::SizeType |
Static Private Member Functions | |
static OffsetValueType | ComputeOffset (const OffsetTableType &offsetTable, const IndexType &bufferedRegionIndex, const IndexType &index) |
Private Attributes | |
BufferIteratorType | m_BufferBegin {} |
IndexType | m_BufferedRegionIndex { {} } |
IndexType | m_IterationRegionIndex { {} } |
SizeType | m_IterationRegionSize { {} } |
OffsetTableType | m_OffsetTable { {} } |
Static Private Attributes | |
static constexpr ImageDimensionType | ImageDimension = TImage::ImageDimension |
static constexpr bool | IsImageTypeConst = std::is_const_v<TImage> |
|
private |
Definition at line 82 of file itkImageRegionRange.h.
using itk::ImageRegionRange< TImage >::const_iterator = QualifiedIterator<true> |
Definition at line 318 of file itkImageRegionRange.h.
using itk::ImageRegionRange< TImage >::const_reverse_iterator = std::reverse_iterator<const_iterator> |
Definition at line 321 of file itkImageRegionRange.h.
|
private |
Definition at line 76 of file itkImageRegionRange.h.
|
private |
Definition at line 87 of file itkImageRegionRange.h.
using itk::ImageRegionRange< TImage >::iterator = QualifiedIterator<IsImageTypeConst> |
Definition at line 319 of file itkImageRegionRange.h.
|
private |
Definition at line 86 of file itkImageRegionRange.h.
|
private |
Definition at line 85 of file itkImageRegionRange.h.
|
private |
Definition at line 77 of file itkImageRegionRange.h.
|
private |
Definition at line 83 of file itkImageRegionRange.h.
using itk::ImageRegionRange< TImage >::reverse_iterator = std::reverse_iterator<iterator> |
Definition at line 320 of file itkImageRegionRange.h.
|
private |
Definition at line 75 of file itkImageRegionRange.h.
|
private |
Definition at line 84 of file itkImageRegionRange.h.
|
defaultnoexcept |
Constructs an empty range
|
inlineexplicit |
Constructs an object, representing the range of pixels of the specified region, within the specified image.
Definition at line 333 of file itkImageRegionRange.h.
|
inlineexplicit |
Constructs a range of the pixels of the requested region of an image.
Definition at line 366 of file itkImageRegionRange.h.
|
default |
Explicitly-defaulted destructor.
|
inlinenoexcept |
Returns an iterator to the first pixel.
Definition at line 373 of file itkImageRegionRange.h.
References itk::ImageRegionRange< TImage >::ComputeOffset(), itk::ImageRegionRange< TImage >::m_BufferBegin, itk::ImageRegionRange< TImage >::m_BufferedRegionIndex, itk::ImageRegionRange< TImage >::m_IterationRegionIndex, itk::ImageRegionRange< TImage >::m_IterationRegionSize, and itk::ImageRegionRange< TImage >::m_OffsetTable.
Referenced by itk::ImageRegionRange< TImage >::cbegin(), and itk::ImageRegionRange< TImage >::rend().
|
inlinenoexcept |
Returns a const iterator to the first pixel. Provides only read-only access to the pixel data.
Definition at line 402 of file itkImageRegionRange.h.
References itk::ImageRegionRange< TImage >::begin().
|
inlinenoexcept |
Returns a const 'end iterator' for this range.
Definition at line 409 of file itkImageRegionRange.h.
References itk::ImageRegionRange< TImage >::end().
|
inlinestaticprivate |
Definition at line 296 of file itkImageRegionRange.h.
References itk::ImageHelper< VImageDimension, VLoop >::ComputeOffset(), and itk::Offset< VDimension >::data().
Referenced by itk::ImageRegionRange< TImage >::begin(), and itk::ImageRegionRange< TImage >::end().
|
inlinenoexcept |
Returns a const reverse 'begin iterator' for this range.
Definition at line 432 of file itkImageRegionRange.h.
References itk::ImageRegionRange< TImage >::rbegin().
|
inlinenoexcept |
Returns a const reverse 'end iterator' for this range.
Definition at line 439 of file itkImageRegionRange.h.
References itk::ImageRegionRange< TImage >::rend().
|
inlinenoexcept |
Tells whether the range is empty.
Definition at line 457 of file itkImageRegionRange.h.
References itk::ImageRegionRange< TImage >::m_IterationRegionSize.
|
inlinenoexcept |
Returns an 'end iterator' for this range.
Definition at line 384 of file itkImageRegionRange.h.
References itk::ImageRegionRange< TImage >::ComputeOffset(), itk::ImageRegionRange< TImage >::m_BufferBegin, itk::ImageRegionRange< TImage >::m_BufferedRegionIndex, itk::ImageRegionRange< TImage >::m_IterationRegionIndex, itk::ImageRegionRange< TImage >::m_IterationRegionSize, and itk::ImageRegionRange< TImage >::m_OffsetTable.
Referenced by itk::ImageRegionRange< TImage >::cend(), and itk::ImageRegionRange< TImage >::rbegin().
|
inlinenoexcept |
Returns a reverse 'begin iterator' for this range.
Definition at line 416 of file itkImageRegionRange.h.
References itk::ImageRegionRange< TImage >::end().
Referenced by itk::ImageRegionRange< TImage >::crbegin().
|
inlinenoexcept |
Returns a reverse 'end iterator' for this range.
Definition at line 424 of file itkImageRegionRange.h.
References itk::ImageRegionRange< TImage >::begin().
Referenced by itk::ImageRegionRange< TImage >::crend().
|
inlinenoexcept |
Returns the size of the range, that is the number of pixels in the region.
Definition at line 447 of file itkImageRegionRange.h.
References itk::ImageRegionRange< TImage >::m_IterationRegionSize.
|
staticconstexprprivate |
Definition at line 80 of file itkImageRegionRange.h.
Referenced by itk::ImageRegionRange< TImage >::QualifiedIterator< VIsConst >::Decrement(), and itk::ImageRegionRange< TImage >::QualifiedIterator< VIsConst >::Increment().
|
staticconstexprprivate |
Definition at line 79 of file itkImageRegionRange.h.
|
private |
Definition at line 306 of file itkImageRegionRange.h.
Referenced by itk::ImageRegionRange< TImage >::begin(), and itk::ImageRegionRange< TImage >::end().
|
private |
Definition at line 308 of file itkImageRegionRange.h.
Referenced by itk::ImageRegionRange< TImage >::begin(), and itk::ImageRegionRange< TImage >::end().
|
private |
Definition at line 310 of file itkImageRegionRange.h.
Referenced by itk::ImageRegionRange< TImage >::begin(), and itk::ImageRegionRange< TImage >::end().
|
private |
Definition at line 312 of file itkImageRegionRange.h.
Referenced by itk::ImageRegionRange< TImage >::begin(), itk::ImageRegionRange< TImage >::empty(), itk::ImageRegionRange< TImage >::end(), and itk::ImageRegionRange< TImage >::size().
|
private |
Definition at line 315 of file itkImageRegionRange.h.
Referenced by itk::ImageRegionRange< TImage >::begin(), and itk::ImageRegionRange< TImage >::end().