ITK
5.2.0
Insight Toolkit
|
#include <itkImageBufferRange.h>
Classes | |
class | AccessorFunctorInitializer |
struct | EmptyAccessorFunctor |
class | IteratorInitializer |
class | PixelProxy |
class | PixelProxy< false, TDummy > |
class | PixelProxy< true, TDummy > |
class | QualifiedIterator |
Public Types | |
using | const_iterator = typename std::conditional< UsingPointerAsIterator, const InternalPixelType *, QualifiedIterator< true > >::type |
using | const_reverse_iterator = std::reverse_iterator< const_iterator > |
using | iterator = typename std::conditional< UsingPointerAsIterator, QualifiedInternalPixelType *, QualifiedIterator< IsImageTypeConst > >::type |
using | reverse_iterator = std::reverse_iterator< iterator > |
Public Member Functions | |
ImageBufferRange ()=default | |
ImageBufferRange (ImageType &image) | |
iterator | begin () const noexcept |
iterator | end () const noexcept |
const_iterator | cbegin () const noexcept |
const_iterator | cend () const noexcept |
reverse_iterator | rbegin () const noexcept |
reverse_iterator | rend () const noexcept |
const_reverse_iterator | crbegin () const noexcept |
const_reverse_iterator | crend () const noexcept |
std::vcl_size_t | size () const noexcept |
bool | empty () const noexcept |
QualifiedIterator< false >::reference | operator[] (const std::vcl_size_t n) const noexcept |
Private Types | |
using | AccessorFunctorType = typename TImage::AccessorFunctorType |
using | ImageType = TImage |
using | InternalPixelType = typename TImage::InternalPixelType |
using | OptionalAccessorFunctorType = typename std::conditional< SupportsDirectPixelAccess, EmptyAccessorFunctor, AccessorFunctorType >::type |
using | PixelType = typename TImage::PixelType |
using | QualifiedInternalPixelType = typename std::conditional< IsImageTypeConst, const InternalPixelType, InternalPixelType >::type |
Private Attributes | |
QualifiedInternalPixelType * | m_ImageBufferPointer = nullptr |
SizeValueType | m_NumberOfPixels = 0 |
OptionalAccessorFunctorType | m_OptionalAccessorFunctor |
Static Private Attributes | |
static constexpr bool | IsImageTypeConst = std::is_const<TImage>::value |
constexpr static bool | SupportsDirectPixelAccess |
constexpr static bool | UsingPointerAsIterator = SupportsDirectPixelAccess |
Modern C++11 range to iterate over the pixels of an image. 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 75 of file itkImageBufferRange.h.
|
private |
Definition at line 81 of file itkImageBufferRange.h.
using itk::Experimental::ImageBufferRange< TImage >::const_iterator = typename std::conditional<UsingPointerAsIterator, const InternalPixelType *, QualifiedIterator<true> >::type |
Definition at line 562 of file itkImageBufferRange.h.
using itk::Experimental::ImageBufferRange< TImage >::const_reverse_iterator = std::reverse_iterator<const_iterator> |
Definition at line 566 of file itkImageBufferRange.h.
|
private |
Definition at line 78 of file itkImageBufferRange.h.
|
private |
Definition at line 80 of file itkImageBufferRange.h.
using itk::Experimental::ImageBufferRange< TImage >::iterator = typename std:: conditional<UsingPointerAsIterator, QualifiedInternalPixelType *, QualifiedIterator<IsImageTypeConst> >::type |
Definition at line 564 of file itkImageBufferRange.h.
|
private |
Definition at line 99 of file itkImageBufferRange.h.
|
private |
Definition at line 79 of file itkImageBufferRange.h.
|
private |
Definition at line 500 of file itkImageBufferRange.h.
using itk::Experimental::ImageBufferRange< TImage >::reverse_iterator = std::reverse_iterator<iterator> |
Definition at line 565 of file itkImageBufferRange.h.
|
default |
Explicitly-defaulted default-constructor. Constructs an empty range.
|
inlineexplicit |
Specifies a range of the pixels of an image.
Definition at line 579 of file itkImageBufferRange.h.
|
inlinenoexcept |
Returns an iterator to the first pixel.
Definition at line 591 of file itkImageBufferRange.h.
References itk::Experimental::ImageBufferRange< TImage >::m_ImageBufferPointer, and itk::Experimental::ImageBufferRange< TImage >::m_OptionalAccessorFunctor.
Referenced by itk::Experimental::ImageBufferRange< TImage >::cbegin(), itk::Experimental::ImageBufferRange< TImage >::operator[](), and itk::Experimental::ImageBufferRange< TImage >::rend().
|
inlinenoexcept |
Returns a const iterator to the first pixel. Provides only read-only access to the pixel data.
Definition at line 609 of file itkImageBufferRange.h.
References itk::Experimental::ImageBufferRange< TImage >::begin().
|
inlinenoexcept |
Returns a const 'end iterator' for this range.
Definition at line 616 of file itkImageBufferRange.h.
References itk::Experimental::ImageBufferRange< TImage >::end().
|
inlinenoexcept |
Returns a const reverse 'begin iterator' for this range.
Definition at line 637 of file itkImageBufferRange.h.
References itk::Experimental::ImageBufferRange< TImage >::rbegin().
|
inlinenoexcept |
Returns a const reverse 'end iterator' for this range.
Definition at line 644 of file itkImageBufferRange.h.
References itk::Experimental::ImageBufferRange< TImage >::rend().
|
inlinenoexcept |
Tells whether the range is empty.
Definition at line 660 of file itkImageBufferRange.h.
References itk::Experimental::ImageBufferRange< TImage >::m_NumberOfPixels.
|
inlinenoexcept |
Returns an 'end iterator' for this range.
Definition at line 598 of file itkImageBufferRange.h.
References itk::Experimental::ImageBufferRange< TImage >::m_ImageBufferPointer, itk::Experimental::ImageBufferRange< TImage >::m_NumberOfPixels, and itk::Experimental::ImageBufferRange< TImage >::m_OptionalAccessorFunctor.
Referenced by itk::Experimental::ImageBufferRange< TImage >::cend(), and itk::Experimental::ImageBufferRange< TImage >::rbegin().
|
inlinenoexcept |
Subscript operator. Allows random access, to the nth pixel.
Definition at line 670 of file itkImageBufferRange.h.
References itk::Experimental::ImageBufferRange< TImage >::begin(), and itk::Experimental::ImageBufferRange< TImage >::size().
|
inlinenoexcept |
Returns a reverse 'begin iterator' for this range.
Definition at line 623 of file itkImageBufferRange.h.
References itk::Experimental::ImageBufferRange< TImage >::end().
Referenced by itk::Experimental::ImageBufferRange< TImage >::crbegin().
|
inlinenoexcept |
Returns a reverse 'end iterator' for this range.
Definition at line 630 of file itkImageBufferRange.h.
References itk::Experimental::ImageBufferRange< TImage >::begin().
Referenced by itk::Experimental::ImageBufferRange< TImage >::crend().
|
inlinenoexcept |
Returns the size of the range, that is the number of pixels.
Definition at line 652 of file itkImageBufferRange.h.
References itk::Experimental::ImageBufferRange< TImage >::m_NumberOfPixels.
Referenced by itk::Experimental::ImageBufferRange< TImage >::operator[]().
|
staticconstexprprivate |
Definition at line 497 of file itkImageBufferRange.h.
|
private |
Definition at line 555 of file itkImageBufferRange.h.
Referenced by itk::Experimental::ImageBufferRange< TImage >::begin(), and itk::Experimental::ImageBufferRange< TImage >::end().
|
private |
Definition at line 558 of file itkImageBufferRange.h.
Referenced by itk::Experimental::ImageBufferRange< TImage >::empty(), itk::Experimental::ImageBufferRange< TImage >::end(), and itk::Experimental::ImageBufferRange< TImage >::size().
|
private |
Definition at line 552 of file itkImageBufferRange.h.
Referenced by itk::Experimental::ImageBufferRange< TImage >::begin(), and itk::Experimental::ImageBufferRange< TImage >::end().
|
staticconstexprprivate |
Definition at line 87 of file itkImageBufferRange.h.
|
staticconstexprprivate |
Definition at line 93 of file itkImageBufferRange.h.