ITK  5.2.0
Insight Toolkit
Public Types | Public Member Functions | Static Public Attributes | List of all members
itk::ImageReverseConstIterator< TImage > Class Template Reference

#include <itkImageReverseConstIterator.h>

+ Inheritance diagram for itk::ImageReverseConstIterator< TImage >:

Public Types

using AccessorFunctorType = typename TImage::AccessorFunctorType
 
using AccessorType = typename TImage::AccessorType
 
using ImageType = TImage
 
using IndexType = typename TImage::IndexType
 
using InternalPixelType = typename TImage::InternalPixelType
 
using OffsetType = typename TImage::OffsetType
 
using PixelContainer = typename TImage::PixelContainer
 
using PixelContainerPointer = typename PixelContainer::Pointer
 
using PixelType = typename TImage::PixelType
 
using RegionType = typename TImage::RegionType
 
using Self = ImageReverseConstIterator
 
using SizeType = typename TImage::SizeType
 

Public Member Functions

 itkTypeMacroNoParent (ImageReverseConstIterator)
 

Static Public Attributes

static constexpr unsigned int ImageIteratorDimension = TImage::ImageDimension
 
ImageType::ConstWeakPointer m_Image
 
RegionType m_Region
 
SizeValueType m_Offset
 
SizeValueType m_BeginOffset
 
SizeValueType m_EndOffset
 
const InternalPixelTypem_Buffer
 
AccessorType m_PixelAccessor
 
AccessorFunctorType m_PixelAccessorFunctor
 
 ImageReverseConstIterator ()
 
virtual ~ImageReverseConstIterator ()=default
 
 ImageReverseConstIterator (const Self &it)
 
 ImageReverseConstIterator (const ImageType *ptr, const RegionType &region)
 
 ImageReverseConstIterator (const ImageConstIterator< TImage > &it)
 
Selfoperator= (const Self &it)
 
Selfoperator= (const ImageConstIterator< TImage > &it)
 
bool operator!= (const Self &it) const
 
bool operator== (const Self &it) const
 
const IndexType GetIndex ()
 
virtual void SetIndex (const IndexType &ind)
 
const RegionTypeGetRegion () const
 
const PixelType Get () const
 
void Set (const PixelType &value) const
 
const PixelTypeValue () const
 
const PixelTypeValue ()
 
void GoToBegin ()
 
void GoToEnd ()
 
bool IsAtBegin () const
 
bool IsAtEnd () const
 
static unsigned int GetImageIteratorDimension ()
 

Detailed Description

template<typename TImage>
class itk::ImageReverseConstIterator< TImage >

Multi-dimensional image iterator.

ImageReverseConstIterator is a templated class to represent a multi-dimensional iterator. ImageReverseConstIterator is templated over the dimension of the image and the data type of the image.

ImageReverseConstIterator is a base class for all the reverse image iterators. It provides the basic construction and comparison operations. However, it does not provide mechanisms for moving the iterator. A subclass of ImageReverseConstIterator must be used to move the iterator.

ImageReverseConstIterator is a multi-dimensional iterator, requiring more information be specified before the iterator can be used than conventional iterators. Whereas the std::vector::iterator from the STL only needs to be passed a pointer to establish the iterator, the multi-dimensional image iterator needs a pointer, the size of the buffer, the size of the region, the start index of the buffer, and the start index of the region. To gain access to this information, ImageReverseConstIterator holds a reference to the image over which it is traversing.

ImageReverseConstIterator assumes a particular layout of the image data. In particular, the data is arranged in a 1D array as if it were [][][][slice][row][col] with Index[0] = col, Index[1] = row, Index[2] = slice, etc.

MORE INFORMATION
For a complete description of the ITK Image Iterators and their API, please see the Iterators chapter in the ITK Software Guide. The ITK Software Guide is available in print and as a free .pdf download from https://www.itk.org.
See also
ImageConstIterator
ConditionalConstIterator
ConstNeighborhoodIterator
ConstShapedNeighborhoodIterator
ConstSliceIterator
CorrespondenceDataStructureIterator
FloodFilledFunctionConditionalConstIterator
FloodFilledImageFunctionConditionalConstIterator
FloodFilledImageFunctionConditionalIterator
FloodFilledSpatialFunctionConditionalConstIterator
FloodFilledSpatialFunctionConditionalIterator
ImageConstIterator
ImageConstIteratorWithIndex
ImageIterator
ImageIteratorWithIndex
ImageLinearConstIteratorWithIndex
ImageLinearIteratorWithIndex
ImageRandomConstIteratorWithIndex
ImageRandomIteratorWithIndex
ImageRegionConstIterator
ImageRegionConstIteratorWithIndex
ImageRegionExclusionConstIteratorWithIndex
ImageRegionExclusionIteratorWithIndex
ImageRegionIterator
ImageRegionIteratorWithIndex
ImageRegionReverseConstIterator
ImageRegionReverseIterator
ImageReverseConstIterator
ImageReverseIterator
ImageSliceConstIteratorWithIndex
ImageSliceIteratorWithIndex
NeighborhoodIterator
PathConstIterator
PathIterator
ShapedNeighborhoodIterator
SliceIterator
ImageConstIteratorWithIndex

Definition at line 87 of file itkImageReverseConstIterator.h.

Member Typedef Documentation

◆ AccessorFunctorType

template<typename TImage>
using itk::ImageReverseConstIterator< TImage >::AccessorFunctorType = typename TImage::AccessorFunctorType

Functor to choose the appropriate accessor. (for Image vs VectorImage)

Definition at line 134 of file itkImageReverseConstIterator.h.

◆ AccessorType

template<typename TImage>
using itk::ImageReverseConstIterator< TImage >::AccessorType = typename TImage::AccessorType

Accessor type that convert data between internal and external representations.

Definition at line 131 of file itkImageReverseConstIterator.h.

◆ ImageType

template<typename TImage>
using itk::ImageReverseConstIterator< TImage >::ImageType = TImage

Image type alias support

Definition at line 115 of file itkImageReverseConstIterator.h.

◆ IndexType

template<typename TImage>
using itk::ImageReverseConstIterator< TImage >::IndexType = typename TImage::IndexType

Index type alias support

Definition at line 103 of file itkImageReverseConstIterator.h.

◆ InternalPixelType

template<typename TImage>
using itk::ImageReverseConstIterator< TImage >::InternalPixelType = typename TImage::InternalPixelType

Internal Pixel Type

Definition at line 124 of file itkImageReverseConstIterator.h.

◆ OffsetType

template<typename TImage>
using itk::ImageReverseConstIterator< TImage >::OffsetType = typename TImage::OffsetType

Offset type alias support

Definition at line 109 of file itkImageReverseConstIterator.h.

◆ PixelContainer

template<typename TImage>
using itk::ImageReverseConstIterator< TImage >::PixelContainer = typename TImage::PixelContainer

PixelContainer type alias support Used to refer to the container for the pixel data. While this was already typdef'ed in the superclass it needs to be redone here for this subclass to compile properly with gcc.

Definition at line 120 of file itkImageReverseConstIterator.h.

◆ PixelContainerPointer

template<typename TImage>
using itk::ImageReverseConstIterator< TImage >::PixelContainerPointer = typename PixelContainer::Pointer

Definition at line 121 of file itkImageReverseConstIterator.h.

◆ PixelType

template<typename TImage>
using itk::ImageReverseConstIterator< TImage >::PixelType = typename TImage::PixelType

External Pixel Type

Definition at line 127 of file itkImageReverseConstIterator.h.

◆ RegionType

template<typename TImage>
using itk::ImageReverseConstIterator< TImage >::RegionType = typename TImage::RegionType

Region type alias support

Definition at line 112 of file itkImageReverseConstIterator.h.

◆ Self

template<typename TImage>
using itk::ImageReverseConstIterator< TImage >::Self = ImageReverseConstIterator

Standard class type aliases.

Definition at line 91 of file itkImageReverseConstIterator.h.

◆ SizeType

template<typename TImage>
using itk::ImageReverseConstIterator< TImage >::SizeType = typename TImage::SizeType

Size type alias support

Definition at line 106 of file itkImageReverseConstIterator.h.

Constructor & Destructor Documentation

◆ ImageReverseConstIterator() [1/4]

template<typename TImage>
itk::ImageReverseConstIterator< TImage >::ImageReverseConstIterator ( )
inline

Default Constructor. Need to provide a default constructor since we provide a copy constructor.

Definition at line 138 of file itkImageReverseConstIterator.h.

◆ ~ImageReverseConstIterator()

template<typename TImage>
virtual itk::ImageReverseConstIterator< TImage >::~ImageReverseConstIterator ( )
virtualdefault

Default Destructor.

◆ ImageReverseConstIterator() [2/4]

template<typename TImage>
itk::ImageReverseConstIterator< TImage >::ImageReverseConstIterator ( const Self it)
inline

◆ ImageReverseConstIterator() [3/4]

template<typename TImage>
itk::ImageReverseConstIterator< TImage >::ImageReverseConstIterator ( const ImageType ptr,
const RegionType region 
)
inline

Constructor establishes an iterator to walk a particular image and a particular region of that image.

Definition at line 172 of file itkImageReverseConstIterator.h.

◆ ImageReverseConstIterator() [4/4]

template<typename TImage>
itk::ImageReverseConstIterator< TImage >::ImageReverseConstIterator ( const ImageConstIterator< TImage > &  it)
inline

Constructor that can be used to cast from an ImageConstIterator to an ImageRegionReverseIterator. Many routines return an ImageConstIterator but for a particular task, you may want an ImageRegionReverseIterator. Rather than provide overloaded APIs that return different types of Iterators, itk returns ImageConstIterators and uses constructors to cast from an ImageConstIterator to a ImageRegionReverseIterator.

Definition at line 206 of file itkImageReverseConstIterator.h.

References itk::ImageConstIterator< TImage >::GetImage(), itk::ImageConstIterator< TImage >::GetIndex(), and itk::ImageConstIterator< TImage >::GetRegion().

Member Function Documentation

◆ Get()

template<typename TImage>
const PixelType itk::ImageReverseConstIterator< TImage >::Get ( ) const
inline

Get the pixel value

Definition at line 341 of file itkImageReverseConstIterator.h.

◆ GetImageIteratorDimension()

template<typename TImage>
static unsigned int itk::ImageReverseConstIterator< TImage >::GetImageIteratorDimension ( )
inlinestatic

Get the dimension (size) of the index.

Definition at line 290 of file itkImageReverseConstIterator.h.

◆ GetIndex()

template<typename TImage>
const IndexType itk::ImageReverseConstIterator< TImage >::GetIndex ( )
inline

Get the index. This provides a read only reference to the index. This causes the index to be calculated from pointer arithmetic and is therefore an expensive operation.

See also
SetIndex

Definition at line 318 of file itkImageReverseConstIterator.h.

Referenced by itk::ImageRegionReverseConstIterator< TImage >::operator++(), and itk::ImageRegionReverseConstIterator< TImage >::operator--().

◆ GetRegion()

template<typename TImage>
const RegionType& itk::ImageReverseConstIterator< TImage >::GetRegion ( ) const
inline

Get the region that this iterator walks. ImageReverseConstIterators know the beginning and the end of the region of the image to iterate over.

Definition at line 334 of file itkImageReverseConstIterator.h.

◆ GoToBegin()

template<typename TImage>
void itk::ImageReverseConstIterator< TImage >::GoToBegin ( )
inline

Move an iterator to the beginning of the region. "Begin" for a reverse iterator is the last pixel in the region.

Definition at line 374 of file itkImageReverseConstIterator.h.

◆ GoToEnd()

template<typename TImage>
void itk::ImageReverseConstIterator< TImage >::GoToEnd ( )
inline

Move an iterator to the end of the region. "End" for a reverse iterator is defined as one pixel before the first pixel in the region.

Definition at line 382 of file itkImageReverseConstIterator.h.

◆ IsAtBegin()

template<typename TImage>
bool itk::ImageReverseConstIterator< TImage >::IsAtBegin ( ) const
inline

Is the iterator at the beginning of the (reverse) region? "Begin" for a reverse iterator is the last pixel in the region.

Definition at line 390 of file itkImageReverseConstIterator.h.

◆ IsAtEnd()

template<typename TImage>
bool itk::ImageReverseConstIterator< TImage >::IsAtEnd ( ) const
inline

Is the iterator at the end of the (reverse) region? "End" for a reverse iterator is one pixel before the first pixel in the region.

Definition at line 398 of file itkImageReverseConstIterator.h.

◆ itkTypeMacroNoParent()

template<typename TImage>
itk::ImageReverseConstIterator< TImage >::itkTypeMacroNoParent ( ImageReverseConstIterator< TImage >  )

Run-time type information (and related methods).

◆ operator!=()

template<typename TImage>
bool itk::ImageReverseConstIterator< TImage >::operator!= ( const Self it) const
inline

Comparison operator. Two iterators are the same if they "point to" the same memory location

Definition at line 298 of file itkImageReverseConstIterator.h.

References itk::ImageReverseConstIterator< TImage >::m_Buffer, and itk::ImageReverseConstIterator< TImage >::m_Offset.

◆ operator=() [1/2]

template<typename TImage>
Self& itk::ImageReverseConstIterator< TImage >::operator= ( const ImageConstIterator< TImage > &  it)
inline

operator= is provided to make sure the handle to the image is properly reference counted.

Definition at line 259 of file itkImageReverseConstIterator.h.

References itk::ImageConstIterator< TImage >::GetImage(), itk::ImageConstIterator< TImage >::GetIndex(), and itk::ImageConstIterator< TImage >::GetRegion().

◆ operator=() [2/2]

template<typename TImage>
Self& itk::ImageReverseConstIterator< TImage >::operator= ( const Self it)
inline

◆ operator==()

template<typename TImage>
bool itk::ImageReverseConstIterator< TImage >::operator== ( const Self it) const
inline

Comparison operator. Two iterators are the same if they "point to" the same memory location

Definition at line 307 of file itkImageReverseConstIterator.h.

References itk::ImageReverseConstIterator< TImage >::m_Buffer, and itk::ImageReverseConstIterator< TImage >::m_Offset.

◆ Set()

template<typename TImage>
void itk::ImageReverseConstIterator< TImage >::Set ( const PixelType value) const
inline

Set the pixel value

Definition at line 348 of file itkImageReverseConstIterator.h.

◆ SetIndex()

template<typename TImage>
virtual void itk::ImageReverseConstIterator< TImage >::SetIndex ( const IndexType ind)
inlinevirtual

Set the index. No bounds checking is performed.

See also
GetIndex

Definition at line 326 of file itkImageReverseConstIterator.h.

◆ Value() [1/2]

template<typename TImage>
const PixelType& itk::ImageReverseConstIterator< TImage >::Value ( )
inline

Return a reference to the pixel This method will provide the fastest access to pixel data, but it will NOT support ImageAdaptors.

Definition at line 366 of file itkImageReverseConstIterator.h.

◆ Value() [2/2]

template<typename TImage>
const PixelType& itk::ImageReverseConstIterator< TImage >::Value ( ) const
inline

Return a const reference to the pixel This method will provide the fastest access to pixel data, but it will NOT support ImageAdaptors.

Definition at line 357 of file itkImageReverseConstIterator.h.

Member Data Documentation

◆ ImageIteratorDimension

template<typename TImage>
constexpr unsigned int itk::ImageReverseConstIterator< TImage >::ImageIteratorDimension = TImage::ImageDimension
staticconstexpr

Dimension of the image the iterator walks. This constant is needed so functions that are templated over image iterator type (as opposed to being templated over pixel type and dimension) can have compile time access to the dimension of the image that the iterator walks.

Definition at line 97 of file itkImageReverseConstIterator.h.

◆ m_BeginOffset

template<typename TImage>
SizeValueType itk::ImageReverseConstIterator< TImage >::m_BeginOffset
protected

Default Constructor. Need to provide a default constructor since we provide a copy constructor.

Definition at line 409 of file itkImageReverseConstIterator.h.

Referenced by itk::ImageReverseConstIterator< TImage >::ImageReverseConstIterator(), and itk::ImageReverseConstIterator< TImage >::operator=().

◆ m_Buffer

template<typename TImage>
const InternalPixelType* itk::ImageReverseConstIterator< TImage >::m_Buffer
protected

◆ m_EndOffset

template<typename TImage>
SizeValueType itk::ImageReverseConstIterator< TImage >::m_EndOffset
protected

Default Constructor. Need to provide a default constructor since we provide a copy constructor.

Definition at line 410 of file itkImageReverseConstIterator.h.

Referenced by itk::ImageReverseConstIterator< TImage >::ImageReverseConstIterator(), and itk::ImageReverseConstIterator< TImage >::operator=().

◆ m_Image

template<typename TImage>
ImageType::ConstWeakPointer itk::ImageReverseConstIterator< TImage >::m_Image
protected

Default Constructor. Need to provide a default constructor since we provide a copy constructor.

Definition at line 404 of file itkImageReverseConstIterator.h.

Referenced by itk::ImageReverseConstIterator< TImage >::ImageReverseConstIterator(), and itk::ImageReverseConstIterator< TImage >::operator=().

◆ m_Offset

template<typename TImage>
SizeValueType itk::ImageReverseConstIterator< TImage >::m_Offset
protected

◆ m_PixelAccessor

template<typename TImage>
AccessorType itk::ImageReverseConstIterator< TImage >::m_PixelAccessor
protected

Default Constructor. Need to provide a default constructor since we provide a copy constructor.

Definition at line 414 of file itkImageReverseConstIterator.h.

Referenced by itk::ImageReverseConstIterator< TImage >::ImageReverseConstIterator(), and itk::ImageReverseConstIterator< TImage >::operator=().

◆ m_PixelAccessorFunctor

template<typename TImage>
AccessorFunctorType itk::ImageReverseConstIterator< TImage >::m_PixelAccessorFunctor
protected

Default Constructor. Need to provide a default constructor since we provide a copy constructor.

Definition at line 415 of file itkImageReverseConstIterator.h.

Referenced by itk::ImageReverseConstIterator< TImage >::ImageReverseConstIterator().

◆ m_Region

template<typename TImage>
RegionType itk::ImageReverseConstIterator< TImage >::m_Region
protected

Default Constructor. Need to provide a default constructor since we provide a copy constructor.

Definition at line 406 of file itkImageReverseConstIterator.h.

Referenced by itk::ImageReverseConstIterator< TImage >::ImageReverseConstIterator(), and itk::ImageReverseConstIterator< TImage >::operator=().


The documentation for this class was generated from the following file: