#include <itkImageConstIterator.h>
Inheritance diagram for itk::ImageConstIterator< TImage >:
ImageConstIterator is a templated class to represent a multi-dimensional iterator. ImageConstIterator is templated over the type of the image to be iterated over.
ImageConstIterator is a base class for all the image iterators. It provides the basic construction and comparison operations. However, it does not provide mechanisms for moving the iterator. A subclass of ImageConstIterator must be used to move the iterator.
ImageConstIterator 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, ImageConstIterator holds a reference to the image over which it is traversing.
ImageConstIterator 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.
ConstShapedNeighborhoodIterator
CorrespondenceDataStructureIterator
FloodFilledFunctionConditionalConstIterator
FloodFilledImageFunctionConditionalConstIterator
FloodFilledImageFunctionConditionalIterator
FloodFilledSpatialFunctionConditionalConstIterator
FloodFilledSpatialFunctionConditionalIterator
ImageLinearConstIteratorWithIndex
ImageRandomConstIteratorWithIndex
ImageRegionConstIteratorWithIndex
ImageRegionExclusionConstIteratorWithIndex
ImageRegionExclusionIteratorWithIndex
ImageRegionReverseConstIterator
Definition at line 84 of file itkImageConstIterator.h.
ImageConstIterator (const ImageType *ptr, const RegionType ®ion) | |
bool | operator!= (const Self &it) const |
Self & | operator= (const Self &it) |
static unsigned int | GetImageIteratorDimension () |
Public Types | |
typedef TImage::AccessorFunctorType | AccessorFunctorType |
typedef TImage::AccessorType | AccessorType |
typedef TImage | ImageType |
typedef TImage::IndexType | IndexType |
typedef TImage::IndexValueType | IndexValueType |
typedef TImage::InternalPixelType | InternalPixelType |
typedef TImage::OffsetType | OffsetType |
typedef TImage::OffsetValueType | OffsetValueType |
typedef TImage::PixelContainer | PixelContainer |
typedef PixelContainer::Pointer | PixelContainerPointer |
typedef TImage::PixelType | PixelType |
typedef TImage::RegionType | RegionType |
typedef ImageConstIterator | Self |
typedef TImage::SizeType | SizeType |
typedef TImage::SizeValueType | SizeValueType |
Public Member Functions | |
Self | Begin (void) const |
Self | End (void) const |
PixelType | Get (void) const |
const ImageType * | GetImage () const |
const IndexType | GetIndex () const |
const RegionType & | GetRegion () const |
void | GoToBegin () |
void | GoToEnd () |
ImageConstIterator (const Self &it) | |
bool | IsAtBegin (void) const |
bool | IsAtEnd (void) const |
itkStaticConstMacro (ImageIteratorDimension, unsigned int, TImage::ImageDimension) | |
virtual void | SetIndex (const IndexType &ind) |
const PixelType & | Value (void) const |
virtual | ~ImageConstIterator () |
bool | operator< (const Self &it) const |
bool | operator<= (const Self &it) const |
bool | operator== (const Self &it) const |
bool | operator> (const Self &it) const |
bool | operator>= (const Self &it) const |
Protected Attributes | |
unsigned long | m_BeginOffset |
const InternalPixelType * | m_Buffer |
unsigned long | m_EndOffset |
TImage::ConstWeakPointer | m_Image |
unsigned long | m_Offset |
AccessorType | m_PixelAccessor |
AccessorFunctorType | m_PixelAccessorFunctor |
RegionType | m_Region |
typedef TImage::AccessorFunctorType itk::ImageConstIterator< TImage >::AccessorFunctorType |
Definition at line 130 of file itkImageConstIterator.h.
typedef TImage::AccessorType itk::ImageConstIterator< TImage >::AccessorType |
Accessor type that convert data between internal and external representations.
Reimplemented in itk::ImageIterator< TImage >, itk::ImageRegionConstIterator< TImage >, and itk::ImageRegionIterator< TImage >.
Definition at line 129 of file itkImageConstIterator.h.
typedef TImage itk::ImageConstIterator< TImage >::ImageType |
Image typedef support.
Reimplemented in itk::ImageIterator< TImage >, itk::ImageRegionConstIterator< TImage >, and itk::ImageRegionIterator< TImage >.
Definition at line 113 of file itkImageConstIterator.h.
typedef TImage::IndexType itk::ImageConstIterator< TImage >::IndexType |
Index typedef support.
Reimplemented in itk::ImageIterator< TImage >, itk::ImageRegionConstIterator< TImage >, and itk::ImageRegionIterator< TImage >.
Definition at line 98 of file itkImageConstIterator.h.
typedef TImage::IndexValueType itk::ImageConstIterator< TImage >::IndexValueType |
Reimplemented in itk::ImageIterator< TImage >, and itk::ImageRegionIterator< TImage >.
Definition at line 99 of file itkImageConstIterator.h.
typedef TImage::InternalPixelType itk::ImageConstIterator< TImage >::InternalPixelType |
Internal Pixel Type
Reimplemented in itk::ImageIterator< TImage >, itk::ImageRegionConstIterator< TImage >, and itk::ImageRegionIterator< TImage >.
Definition at line 122 of file itkImageConstIterator.h.
typedef TImage::OffsetType itk::ImageConstIterator< TImage >::OffsetType |
Offset typedef support.
Reimplemented in itk::ImageIterator< TImage >, and itk::ImageRegionIterator< TImage >.
Definition at line 106 of file itkImageConstIterator.h.
typedef TImage::OffsetValueType itk::ImageConstIterator< TImage >::OffsetValueType |
Reimplemented in itk::ImageIterator< TImage >, and itk::ImageRegionIterator< TImage >.
Definition at line 107 of file itkImageConstIterator.h.
typedef TImage::PixelContainer itk::ImageConstIterator< TImage >::PixelContainer |
PixelContainer typedef 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.
Reimplemented in itk::ImageIterator< TImage >, itk::ImageRegionConstIterator< TImage >, and itk::ImageRegionIterator< TImage >.
Definition at line 118 of file itkImageConstIterator.h.
typedef PixelContainer::Pointer itk::ImageConstIterator< TImage >::PixelContainerPointer |
Reimplemented in itk::ImageIterator< TImage >, itk::ImageRegionConstIterator< TImage >, and itk::ImageRegionIterator< TImage >.
Definition at line 119 of file itkImageConstIterator.h.
typedef TImage::PixelType itk::ImageConstIterator< TImage >::PixelType |
External Pixel Type
Reimplemented in itk::ImageIterator< TImage >, itk::ImageRegionConstIterator< TImage >, and itk::ImageRegionIterator< TImage >.
Definition at line 125 of file itkImageConstIterator.h.
typedef TImage::RegionType itk::ImageConstIterator< TImage >::RegionType |
Region typedef support.
Reimplemented in itk::ImageIterator< TImage >, itk::ImageRegionConstIterator< TImage >, and itk::ImageRegionIterator< TImage >.
Definition at line 110 of file itkImageConstIterator.h.
typedef ImageConstIterator itk::ImageConstIterator< TImage >::Self |
Standard class typedefs.
Reimplemented in itk::ImageIterator< TImage >, itk::ImageRegionConstIterator< TImage >, and itk::ImageRegionIterator< TImage >.
Definition at line 88 of file itkImageConstIterator.h.
typedef TImage::SizeType itk::ImageConstIterator< TImage >::SizeType |
Size typedef support.
Reimplemented in itk::ImageIterator< TImage >, itk::ImageRegionConstIterator< TImage >, and itk::ImageRegionIterator< TImage >.
Definition at line 102 of file itkImageConstIterator.h.
typedef TImage::SizeValueType itk::ImageConstIterator< TImage >::SizeValueType |
Reimplemented in itk::ImageIterator< TImage >, and itk::ImageRegionIterator< TImage >.
Definition at line 103 of file itkImageConstIterator.h.
itk::ImageConstIterator< TImage >::ImageConstIterator | ( | ) | [inline] |
Default Constructor. Need to provide a default constructor since we provide a copy constructor.
Definition at line 134 of file itkImageConstIterator.h.
virtual itk::ImageConstIterator< TImage >::~ImageConstIterator | ( | ) | [inline, virtual] |
Default Destructor.
Definition at line 149 of file itkImageConstIterator.h.
itk::ImageConstIterator< TImage >::ImageConstIterator | ( | const Self & | it | ) | [inline] |
Copy Constructor. The copy constructor is provided to make sure the handle to the image is properly reference counted.
Definition at line 153 of file itkImageConstIterator.h.
References itk::ImageConstIterator< TImage >::m_BeginOffset, itk::ImageConstIterator< TImage >::m_Buffer, itk::ImageConstIterator< TImage >::m_EndOffset, itk::ImageConstIterator< TImage >::m_Image, itk::ImageConstIterator< TImage >::m_Offset, itk::ImageConstIterator< TImage >::m_PixelAccessor, itk::ImageConstIterator< TImage >::m_PixelAccessorFunctor, and itk::ImageConstIterator< TImage >::m_Region.
itk::ImageConstIterator< TImage >::ImageConstIterator | ( | 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 170 of file itkImageConstIterator.h.
itk::ImageConstIterator< TImage >::ImageConstIterator | ( | ) | [inline] |
Default Constructor. Need to provide a default constructor since we provide a copy constructor.
Definition at line 134 of file itkImageConstIterator.h.
Self itk::ImageConstIterator< TImage >::Begin | ( | void | ) | const |
Return an iterator for the beginning of the region. "Begin" is defined as the first pixel in the region.
Reimplemented in itk::ImageIterator< TImage >, itk::ImageRegionConstIterator< TImage >, and itk::ImageRegionIterator< TImage >.
Self itk::ImageConstIterator< TImage >::End | ( | void | ) | const |
Return an iterator for the end of the region. "End" is defined as one pixel past the last pixel of the region.
Reimplemented in itk::ImageIterator< TImage >, itk::ImageRegionConstIterator< TImage >, and itk::ImageRegionIterator< TImage >.
PixelType itk::ImageConstIterator< TImage >::Get | ( | void | ) | const [inline] |
Get the pixel value
Definition at line 316 of file itkImageConstIterator.h.
const ImageType* itk::ImageConstIterator< TImage >::GetImage | ( | ) | const [inline] |
Get the image that this iterator walks.
Reimplemented in itk::ImageIterator< TImage >.
Definition at line 312 of file itkImageConstIterator.h.
Referenced by itk::ImageReverseConstIterator< TImage >::ImageReverseConstIterator(), and itk::ImageReverseConstIterator< TImage >::operator=().
static unsigned int itk::ImageConstIterator< TImage >::GetImageIteratorDimension | ( | ) | [inline, static] |
Get the dimension (size) of the index.
Definition at line 227 of file itkImageConstIterator.h.
const IndexType itk::ImageConstIterator< TImage >::GetIndex | ( | void | ) | const [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.
Definition at line 298 of file itkImageConstIterator.h.
Referenced by itk::ImageReverseConstIterator< TImage >::ImageReverseConstIterator(), itk::ImageRegionReverseConstIterator< TImage >::operator--(), and itk::ImageReverseConstIterator< TImage >::operator=().
const RegionType& itk::ImageConstIterator< TImage >::GetRegion | ( | ) | const [inline] |
Get the region that this iterator walks. ImageConstIterators know the beginning and the end of the region of the image to iterate over.
Definition at line 308 of file itkImageConstIterator.h.
Referenced by itk::ImageReverseConstIterator< TImage >::ImageReverseConstIterator(), and itk::ImageReverseConstIterator< TImage >::operator=().
void itk::ImageConstIterator< TImage >::GoToBegin | ( | void | ) | [inline] |
Move an iterator to the beginning of the region. "Begin" is defined as the first pixel in the region.
Reimplemented in itk::ImageRegionConstIterator< TImage >.
Definition at line 333 of file itkImageConstIterator.h.
void itk::ImageConstIterator< TImage >::GoToEnd | ( | ) | [inline] |
Move an iterator to the end of the region. "End" is defined as one pixel past the last pixel of the region.
Reimplemented in itk::ImageRegionConstIterator< TImage >.
Definition at line 346 of file itkImageConstIterator.h.
bool itk::ImageConstIterator< TImage >::IsAtBegin | ( | void | ) | const [inline] |
Is the iterator at the beginning of the region? "Begin" is defined as the first pixel in the region.
Definition at line 353 of file itkImageConstIterator.h.
bool itk::ImageConstIterator< TImage >::IsAtEnd | ( | void | ) | const [inline] |
Is the iterator at the end of the region? "End" is defined as one pixel past the last pixel of the region.
Definition at line 360 of file itkImageConstIterator.h.
itk::ImageConstIterator< TImage >::itkStaticConstMacro | ( | ImageIteratorDimension | , | |
unsigned | int, | |||
TImage::ImageDimension | ||||
) |
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.
Reimplemented in itk::ImageIterator< TImage >.
bool itk::ImageConstIterator< 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 233 of file itkImageConstIterator.h.
References itk::ImageConstIterator< TImage >::m_Buffer, and itk::ImageConstIterator< TImage >::m_Offset.
bool itk::ImageConstIterator< TImage >::operator< | ( | const Self & | it | ) | const [inline] |
Comparison operator. An iterator is "less than" another if it "points to" a lower memory location.
Definition at line 264 of file itkImageConstIterator.h.
References itk::ImageConstIterator< TImage >::m_Buffer, and itk::ImageConstIterator< TImage >::m_Offset.
bool itk::ImageConstIterator< TImage >::operator<= | ( | const Self & | it | ) | const [inline] |
Comparison operator. An iterator is "less than" another if it "points to" a lower memory location.
Definition at line 253 of file itkImageConstIterator.h.
References itk::ImageConstIterator< TImage >::m_Buffer, and itk::ImageConstIterator< TImage >::m_Offset.
Self& itk::ImageConstIterator< TImage >::operator= | ( | const Self & | it | ) | [inline] |
operator= is provided to make sure the handle to the image is properly reference counted.
Reimplemented in itk::ImageIterator< TImage >.
Definition at line 210 of file itkImageConstIterator.h.
References itk::ImageConstIterator< TImage >::m_BeginOffset, itk::ImageConstIterator< TImage >::m_Buffer, itk::ImageConstIterator< TImage >::m_EndOffset, itk::ImageConstIterator< TImage >::m_Image, itk::ImageConstIterator< TImage >::m_Offset, itk::ImageConstIterator< TImage >::m_PixelAccessor, itk::ImageConstIterator< TImage >::m_PixelAccessorFunctor, and itk::ImageConstIterator< TImage >::m_Region.
bool itk::ImageConstIterator< 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 243 of file itkImageConstIterator.h.
References itk::ImageConstIterator< TImage >::m_Buffer, and itk::ImageConstIterator< TImage >::m_Offset.
bool itk::ImageConstIterator< TImage >::operator> | ( | const Self & | it | ) | const [inline] |
Comparison operator. An iterator is "greater than" another if it "points to" a higher location.
Definition at line 286 of file itkImageConstIterator.h.
References itk::ImageConstIterator< TImage >::m_Buffer, and itk::ImageConstIterator< TImage >::m_Offset.
bool itk::ImageConstIterator< TImage >::operator>= | ( | const Self & | it | ) | const [inline] |
Comparison operator. An iterator is "greater than" another if it "points to" a higher location.
Definition at line 275 of file itkImageConstIterator.h.
References itk::ImageConstIterator< TImage >::m_Buffer, and itk::ImageConstIterator< TImage >::m_Offset.
virtual void itk::ImageConstIterator< TImage >::SetIndex | ( | const IndexType & | ind | ) | [inline, virtual] |
Set the index. No bounds checking is performed.
Definition at line 303 of file itkImageConstIterator.h.
const PixelType& itk::ImageConstIterator< TImage >::Value | ( | void | ) | 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 322 of file itkImageConstIterator.h.
unsigned long itk::ImageConstIterator< TImage >::m_BeginOffset [protected] |
Definition at line 371 of file itkImageConstIterator.h.
Referenced by itk::ImageConstIterator< TImage >::ImageConstIterator(), and itk::ImageConstIterator< TImage >::operator=().
const InternalPixelType* itk::ImageConstIterator< TImage >::m_Buffer [protected] |
Definition at line 374 of file itkImageConstIterator.h.
Referenced by itk::ImageConstIterator< TImage >::ImageConstIterator(), itk::ImageConstIterator< TImage >::operator!=(), itk::ImageConstIterator< TImage >::operator<(), itk::ImageConstIterator< TImage >::operator<=(), itk::ImageConstIterator< TImage >::operator=(), itk::ImageConstIterator< TImage >::operator==(), itk::ImageConstIterator< TImage >::operator>(), and itk::ImageConstIterator< TImage >::operator>=().
unsigned long itk::ImageConstIterator< TImage >::m_EndOffset [protected] |
Definition at line 372 of file itkImageConstIterator.h.
Referenced by itk::ImageConstIterator< TImage >::ImageConstIterator(), and itk::ImageConstIterator< TImage >::operator=().
TImage::ConstWeakPointer itk::ImageConstIterator< TImage >::m_Image [protected] |
Definition at line 367 of file itkImageConstIterator.h.
Referenced by itk::ImageConstIterator< TImage >::ImageConstIterator(), and itk::ImageConstIterator< TImage >::operator=().
unsigned long itk::ImageConstIterator< TImage >::m_Offset [protected] |
Definition at line 370 of file itkImageConstIterator.h.
Referenced by itk::ImageConstIterator< TImage >::ImageConstIterator(), itk::ImageConstIterator< TImage >::operator!=(), itk::ImageConstIterator< TImage >::operator<(), itk::ImageConstIterator< TImage >::operator<=(), itk::ImageConstIterator< TImage >::operator=(), itk::ImageConstIterator< TImage >::operator==(), itk::ImageConstIterator< TImage >::operator>(), and itk::ImageConstIterator< TImage >::operator>=().
AccessorType itk::ImageConstIterator< TImage >::m_PixelAccessor [protected] |
Definition at line 376 of file itkImageConstIterator.h.
Referenced by itk::ImageConstIterator< TImage >::ImageConstIterator(), and itk::ImageConstIterator< TImage >::operator=().
AccessorFunctorType itk::ImageConstIterator< TImage >::m_PixelAccessorFunctor [protected] |
Definition at line 377 of file itkImageConstIterator.h.
Referenced by itk::ImageConstIterator< TImage >::ImageConstIterator(), and itk::ImageConstIterator< TImage >::operator=().
RegionType itk::ImageConstIterator< TImage >::m_Region [protected] |
Definition at line 368 of file itkImageConstIterator.h.
Referenced by itk::ImageConstIterator< TImage >::ImageConstIterator(), and itk::ImageConstIterator< TImage >::operator=().