#include <itkImageConstIterator.h>
Inheritance diagram for itk::ImageConstIterator:
[NOHEADER] | |
ImageConstIterator (const ImageType *ptr, const RegionType ®ion) | |
Self & | operator= (const Self &it) |
bool | operator!= (const Self &it) const |
unsigned int | GetImageIteratorDimension () |
Public Types | |
typedef ImageConstIterator | Self |
typedef TImage::IndexType | IndexType |
typedef TImage::IndexValueType | IndexValueType |
typedef TImage::SizeType | SizeType |
typedef TImage::SizeValueType | SizeValueType |
typedef TImage::OffsetType | OffsetType |
typedef TImage::OffsetValueType | OffsetValueType |
typedef TImage::RegionType | RegionType |
typedef TImage | ImageType |
typedef TImage::PixelContainer | PixelContainer |
typedef PixelContainer::Pointer | PixelContainerPointer |
typedef TImage::InternalPixelType | InternalPixelType |
typedef TImage::PixelType | PixelType |
typedef TImage::AccessorType | AccessorType |
Public Methods | |
itkStaticConstMacro (ImageIteratorDimension, unsigned int, TImage::ImageDimension) | |
virtual | ~ImageConstIterator () |
ImageConstIterator (const Self &it) | |
const IndexType | GetIndex () const |
virtual void | SetIndex (const IndexType &ind) |
const RegionType & | GetRegion () const |
const ImageType * | GetImage () const |
PixelType | Get (void) const |
const PixelType & | Value (void) const |
Self | Begin (void) const |
void | GoToBegin () |
Self | End (void) const |
void | GoToEnd () |
bool | IsAtBegin (void) const |
bool | IsAtEnd (void) const |
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 | |
SmartPointer< const ImageType > | m_Image |
RegionType | m_Region |
unsigned long | m_Offset |
unsigned long | m_BeginOffset |
unsigned long | m_EndOffset |
const InternalPixelType * | m_Buffer |
AccessorType | m_PixelAccessor |
ImageConstIterator is a templated class to represent a multi-dimensional iterator. ImageConstIterator is templated over the dimension of the image and the data type of the image.
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.
Definition at line 56 of file itkImageConstIterator.h.
|
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 100 of file itkImageConstIterator.h. |
|
Image typedef support. Reimplemented in itk::ImageIterator< TImage >, itk::ImageRegionConstIterator< TImage >, and itk::ImageRegionIterator< TImage >. Definition at line 84 of file itkImageConstIterator.h. |
|
Index typedef support. Reimplemented in itk::ImageIterator< TImage >, itk::ImageRegionConstIterator< TImage >, and itk::ImageRegionIterator< TImage >. Definition at line 69 of file itkImageConstIterator.h. Referenced by itk::ImageConstIterator< TImage >::ImageConstIterator(). |
|
Reimplemented in itk::ImageIterator< TImage >, and itk::ImageRegionIterator< TImage >. Definition at line 70 of file itkImageConstIterator.h. |
|
Internal Pixel Type Reimplemented in itk::ImageIterator< TImage >, itk::ImageRegionConstIterator< TImage >, and itk::ImageRegionIterator< TImage >. Definition at line 93 of file itkImageConstIterator.h. Referenced by itk::ImageConstIterator< TImage >::IsAtEnd(). |
|
Offset typedef support. Reimplemented in itk::ImageIterator< TImage >, and itk::ImageRegionIterator< TImage >. Definition at line 77 of file itkImageConstIterator.h. |
|
Reimplemented in itk::ImageIterator< TImage >, and itk::ImageRegionIterator< TImage >. Definition at line 78 of file itkImageConstIterator.h. |
|
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 89 of file itkImageConstIterator.h. |
|
Reimplemented in itk::ImageIterator< TImage >, itk::ImageRegionConstIterator< TImage >, and itk::ImageRegionIterator< TImage >. Definition at line 90 of file itkImageConstIterator.h. |
|
External Pixel Type Reimplemented in itk::ImageIterator< TImage >, itk::ImageRegionConstIterator< TImage >, and itk::ImageRegionIterator< TImage >. Definition at line 96 of file itkImageConstIterator.h. Referenced by itk::ImageConstIterator< TImage >::GetRegion(). |
|
Region typedef support. Reimplemented in itk::ImageIterator< TImage >, itk::ImageRegionConstIterator< TImage >, and itk::ImageRegionIterator< TImage >. Definition at line 81 of file itkImageConstIterator.h. Referenced by itk::ImageConstIterator< TImage >::ImageConstIterator(), and itk::ImageConstIterator< TImage >::IsAtEnd(). |
|
Standard class typedefs. Reimplemented in itk::ImageIterator< TImage >, itk::ImageRegionConstIterator< TImage >, and itk::ImageRegionIterator< TImage >. Definition at line 59 of file itkImageConstIterator.h. |
|
Size typedef support. Reimplemented in itk::ImageIterator< TImage >, itk::ImageRegionConstIterator< TImage >, and itk::ImageRegionIterator< TImage >. Definition at line 73 of file itkImageConstIterator.h. Referenced by itk::ImageConstIterator< TImage >::ImageConstIterator(). |
|
Reimplemented in itk::ImageIterator< TImage >, and itk::ImageRegionIterator< TImage >. Definition at line 74 of file itkImageConstIterator.h. |
|
Default Constructor. Need to provide a default constructor since we provide a copy constructor. Definition at line 104 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, and itk::ImageConstIterator< TImage >::m_Region. |
|
Default Destructor. Definition at line 117 of file itkImageConstIterator.h. |
|
Copy Constructor. The copy constructor is provided to make sure the handle to the image is properly reference counted. Definition at line 121 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, and itk::ImageConstIterator< TImage >::m_Region. |
|
Constructor establishes an iterator to walk a particular image and a particular region of that image. Definition at line 136 of file itkImageConstIterator.h. References itk::ImageConstIterator< TImage >::IndexType, 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_Region, itk::ImageConstIterator< TImage >::RegionType, and itk::ImageConstIterator< TImage >::SizeType. |
|
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 >. |
|
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 >. |
|
Get the pixel value Definition at line 267 of file itkImageConstIterator.h. |
|
Get the image that this iterator walks. Reimplemented in itk::ImageIterator< TImage >. Definition at line 263 of file itkImageConstIterator.h. |
|
Get the dimension (size) of the index. Definition at line 178 of file itkImageConstIterator.h. |
|
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 249 of file itkImageConstIterator.h. Referenced by itk::ImageRegionConstIterator< TImage >::ImageRegionConstIterator(). |
|
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 259 of file itkImageConstIterator.h. References itk::ImageConstIterator< TImage >::m_Buffer, itk::ImageConstIterator< TImage >::m_Offset, itk::ImageConstIterator< TImage >::m_PixelAccessor, and itk::ImageConstIterator< TImage >::PixelType. |
|
Move an iterator to the beginning of the region. "Begin" is defined as the first pixel in the region. Definition at line 284 of file itkImageConstIterator.h. |
|
Move an iterator to the end of the region. "End" is defined as one pixel past the last pixel of the region. Definition at line 297 of file itkImageConstIterator.h. References itk::ImageConstIterator< TImage >::m_BeginOffset, and itk::ImageConstIterator< TImage >::m_Offset. |
|
Is the iterator at the beginning of the region? "Begin" is defined as the first pixel in the region. Definition at line 304 of file itkImageConstIterator.h. References itk::ImageConstIterator< TImage >::m_EndOffset, and itk::ImageConstIterator< TImage >::m_Offset. |
|
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 311 of file itkImageConstIterator.h. References itk::ImageConstIterator< TImage >::InternalPixelType, itk::ImageConstIterator< TImage >::m_BeginOffset, itk::ImageConstIterator< TImage >::m_Buffer, itk::ImageConstIterator< TImage >::m_EndOffset, itk::ImageConstIterator< TImage >::m_Offset, itk::ImageConstIterator< TImage >::m_Region, and itk::ImageConstIterator< TImage >::RegionType. |
|
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 >. |
|
Comparison operator. Two iterators are the same if they "point to" the same memory location Definition at line 184 of file itkImageConstIterator.h. References itk::ImageConstIterator< TImage >::m_Buffer, and itk::ImageConstIterator< TImage >::m_Offset. |
|
Comparison operator. An iterator is "less than" another if it "points to" a lower memory location. Definition at line 215 of file itkImageConstIterator.h. |
|
Comparison operator. An iterator is "less than" another if it "points to" a lower memory location. Definition at line 204 of file itkImageConstIterator.h. References itk::ImageConstIterator< TImage >::m_Buffer, and itk::ImageConstIterator< TImage >::m_Offset. |
|
operator= is provided to make sure the handle to the image is properly reference counted. Reimplemented in itk::ImageIterator< TImage >. Definition at line 163 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, and itk::ImageConstIterator< TImage >::m_Region. |
|
Comparison operator. Two iterators are the same if they "point to" the same memory location Definition at line 194 of file itkImageConstIterator.h. References itk::ImageConstIterator< TImage >::m_Buffer, and itk::ImageConstIterator< TImage >::m_Offset. |
|
Comparison operator. An iterator is "greater than" another if it "points to" a higher location. Definition at line 237 of file itkImageConstIterator.h. |
|
Comparison operator. An iterator is "greater than" another if it "points to" a higher location. Definition at line 226 of file itkImageConstIterator.h. References itk::ImageConstIterator< TImage >::m_Buffer, and itk::ImageConstIterator< TImage >::m_Offset. |
|
Set the index. No bounds checking is performed.
Reimplemented in itk::ImageRegionConstIterator< TImage >. Definition at line 254 of file itkImageConstIterator.h. |
|
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 273 of file itkImageConstIterator.h. References itk::ImageConstIterator< TImage >::m_BeginOffset, and itk::ImageConstIterator< TImage >::m_Offset. |
|
|
|
Definition at line 323 of file itkImageConstIterator.h. Referenced by itk::ImageConstIterator< TImage >::ImageConstIterator(), itk::ImageConstIterator< TImage >::IsAtBegin(), itk::ImageConstIterator< TImage >::IsAtEnd(), and itk::ImageConstIterator< TImage >::operator=(). |
|
Definition at line 318 of file itkImageConstIterator.h. Referenced by itk::ImageIterator< TImage >::GetImage(), itk::ImageConstIterator< TImage >::ImageConstIterator(), itk::ImageRegionConstIterator< TImage >::operator++(), itk::ImageRegionConstIterator< TImage >::operator--(), and itk::ImageConstIterator< TImage >::operator=(). |
|
|
Definition at line 327 of file itkImageConstIterator.h. Referenced by itk::ImageConstIterator< TImage >::GetRegion(), itk::ImageConstIterator< TImage >::ImageConstIterator(), itk::ImageConstIterator< TImage >::operator=(), itk::ImageRegionIterator< TImage >::Set(), and itk::ImageIterator< TImage >::Set(). |
|