ITK
4.6.0
Insight Segmentation and Registration Toolkit
|
#include <itkImageConstIterator.h>
A multi-dimensional image iterator templated over image type.
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.
Definition at line 84 of file itkImageConstIterator.h.
Public Types | |
typedef TImage::AccessorFunctorType | AccessorFunctorType |
typedef TImage::AccessorType | AccessorType |
typedef TImage | ImageType |
typedef TImage::IndexType | IndexType |
typedef TImage::InternalPixelType | InternalPixelType |
typedef TImage::OffsetType | OffsetType |
typedef TImage::PixelContainer | PixelContainer |
typedef PixelContainer::Pointer | PixelContainerPointer |
typedef TImage::PixelType | PixelType |
typedef TImage::RegionType | RegionType |
typedef ImageConstIterator | Self |
typedef TImage::SizeType | SizeType |
Public Member Functions | |
ImageConstIterator (const Self &it) | |
virtual | ~ImageConstIterator () |
ImageConstIterator () | |
Static Public Attributes | |
static const unsigned int | ImageIteratorDimension = TImage::ImageDimension |
TImage::ConstWeakPointer | m_Image |
RegionType | m_Region |
OffsetValueType | m_Offset |
OffsetValueType | m_BeginOffset |
OffsetValueType | m_EndOffset |
const InternalPixelType * | m_Buffer |
AccessorType | m_PixelAccessor |
AccessorFunctorType | m_PixelAccessorFunctor |
ImageConstIterator (const ImageType *ptr, const RegionType ®ion) | |
Self & | operator= (const Self &it) |
virtual void | SetRegion (const RegionType ®ion) |
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 |
bool | operator> (const Self &it) const |
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 |
itkLegacyMacro (Self Begin(void) const) | |
void | GoToBegin () |
itkLegacyMacro (Self End(void) const) | |
void | GoToEnd () |
bool | IsAtBegin (void) const |
bool | IsAtEnd (void) const |
static unsigned int | GetImageIteratorDimension () |
typedef TImage::AccessorFunctorType itk::ImageConstIterator< TImage >::AccessorFunctorType |
Definition at line 127 of file itkImageConstIterator.h.
typedef TImage::AccessorType itk::ImageConstIterator< TImage >::AccessorType |
Accessor type that convert data between internal and external representations.
Definition at line 126 of file itkImageConstIterator.h.
typedef TImage itk::ImageConstIterator< TImage >::ImageType |
Image typedef support.
Definition at line 110 of file itkImageConstIterator.h.
typedef TImage::IndexType itk::ImageConstIterator< TImage >::IndexType |
Index typedef support.
Definition at line 98 of file itkImageConstIterator.h.
typedef TImage::InternalPixelType itk::ImageConstIterator< TImage >::InternalPixelType |
Internal Pixel Type
Definition at line 119 of file itkImageConstIterator.h.
typedef TImage::OffsetType itk::ImageConstIterator< TImage >::OffsetType |
Offset typedef support.
Definition at line 104 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.
Definition at line 115 of file itkImageConstIterator.h.
typedef PixelContainer::Pointer itk::ImageConstIterator< TImage >::PixelContainerPointer |
Definition at line 116 of file itkImageConstIterator.h.
typedef TImage::PixelType itk::ImageConstIterator< TImage >::PixelType |
External Pixel Type
Definition at line 122 of file itkImageConstIterator.h.
typedef TImage::RegionType itk::ImageConstIterator< TImage >::RegionType |
Region typedef support.
Definition at line 107 of file itkImageConstIterator.h.
typedef ImageConstIterator itk::ImageConstIterator< TImage >::Self |
Standard class typedefs.
Definition at line 88 of file itkImageConstIterator.h.
typedef TImage::SizeType itk::ImageConstIterator< TImage >::SizeType |
Size typedef support.
Definition at line 101 of file itkImageConstIterator.h.
|
inline |
Default Constructor. Need to provide a default constructor since we provide a copy constructor.
Definition at line 131 of file itkImageConstIterator.h.
|
inlinevirtual |
Default Destructor.
Definition at line 146 of file itkImageConstIterator.h.
|
inline |
Copy Constructor. The copy constructor is provided to make sure the handle to the image is properly reference counted.
Definition at line 150 of file itkImageConstIterator.h.
|
inline |
Constructor establishes an iterator to walk a particular image and a particular region of that image.
Definition at line 167 of file itkImageConstIterator.h.
|
inline |
Get the pixel value
Definition at line 324 of file itkImageConstIterator.h.
Referenced by itk::Statistics::ImageToListSampleAdaptor< TImage >::ConstIterator::GetMeasurementVector(), and itk::GradientRecursiveGaussianImageFilter< TInputImage, TOutputImage >::TransformOutputPixel().
|
inline |
Get the image that this iterator walks.
Definition at line 320 of file itkImageConstIterator.h.
Referenced by itk::ImageReverseConstIterator< TImage >::ImageReverseConstIterator(), itk::ImageReverseConstIterator< TImage >::operator=(), itk::GradientImageFilter< TInputImage, TOperatorValueType, TOutputValueType, TOutputImageType >::SetOutputPixel(), and itk::GradientRecursiveGaussianImageFilter< TInputImage, TOutputImage >::TransformOutputPixel().
|
inlinestatic |
Get the dimension (size) of the index.
Definition at line 241 of file itkImageConstIterator.h.
|
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 306 of file itkImageConstIterator.h.
Referenced by itk::ImageRegionConstIterator< ImageType >::ImageRegionConstIterator(), itk::ImageReverseConstIterator< TImage >::ImageReverseConstIterator(), itk::ImageScanlineConstIterator< TImage >::ImageScanlineConstIterator(), and itk::ImageReverseConstIterator< TImage >::operator=().
|
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 316 of file itkImageConstIterator.h.
Referenced by itk::ImageReverseConstIterator< TImage >::ImageReverseConstIterator(), and itk::ImageReverseConstIterator< TImage >::operator=().
|
inline |
Move an iterator to the beginning of the region. "Begin" is defined as the first pixel in the region.
Definition at line 341 of file itkImageConstIterator.h.
Referenced by itk::ImageScanlineConstIterator< TImage >::GoToBegin(), and itk::ImageRegionConstIterator< ImageType >::GoToBegin().
|
inline |
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 354 of file itkImageConstIterator.h.
Referenced by itk::ImageScanlineConstIterator< TImage >::GoToEnd(), and itk::ImageRegionConstIterator< ImageType >::GoToEnd().
|
inline |
Is the iterator at the beginning of the region? "Begin" is defined as the first pixel in the region.
Definition at line 361 of file itkImageConstIterator.h.
|
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 368 of file itkImageConstIterator.h.
itk::ImageConstIterator< TImage >::itkLegacyMacro | ( | Self Begin(void) | const | ) |
Return an iterator for the beginning of the region. "Begin" is defined as the first pixel in the region.
itk::ImageConstIterator< TImage >::itkLegacyMacro | ( | Self 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.
|
inline |
Comparison operator. Two iterators are the same if they "point to" the same memory location
Definition at line 247 of file itkImageConstIterator.h.
|
inline |
Comparison operator. An iterator is "less than" another if it "points to" a lower memory location.
Definition at line 275 of file itkImageConstIterator.h.
|
inline |
Comparison operator. An iterator is "less than" another if it "points to" a lower memory location.
Definition at line 265 of file itkImageConstIterator.h.
|
inline |
operator= is provided to make sure the handle to the image is properly reference counted.
Definition at line 183 of file itkImageConstIterator.h.
Referenced by itk::ImageRegionConstIterator< ImageType >::ImageRegionConstIterator(), and itk::ImageScanlineConstIterator< TImage >::ImageScanlineConstIterator().
|
inline |
Comparison operator. Two iterators are the same if they "point to" the same memory location
Definition at line 256 of file itkImageConstIterator.h.
|
inline |
Comparison operator. An iterator is "greater than" another if it "points to" a higher location.
Definition at line 295 of file itkImageConstIterator.h.
|
inline |
Comparison operator. An iterator is "greater than" another if it "points to" a higher location.
Definition at line 285 of file itkImageConstIterator.h.
|
inlinevirtual |
Set the index. No bounds checking is performed.
Reimplemented in itk::ImageRegionConstIterator< TImage >, itk::ImageRegionConstIterator< ImageType >, and itk::ImageScanlineConstIterator< TImage >.
Definition at line 311 of file itkImageConstIterator.h.
Referenced by itk::ImageScanlineConstIterator< TImage >::SetIndex(), and itk::ImageRegionConstIterator< ImageType >::SetIndex().
|
inlinevirtual |
Set the region of the image to iterate over.
Definition at line 203 of file itkImageConstIterator.h.
Referenced by itk::ImageConstIterator< ImageType >::ImageConstIterator().
|
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 330 of file itkImageConstIterator.h.
|
static |
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 95 of file itkImageConstIterator.h.
|
protected |
Constructor establishes an iterator to walk a particular image and a particular region of that image.
Definition at line 379 of file itkImageConstIterator.h.
Referenced by itk::ImageScanlineConstIterator< TImage >::GoToBegin(), itk::ImageRegionConstIterator< ImageType >::GoToBegin(), itk::ImageConstIterator< ImageType >::GoToBegin(), itk::ImageConstIterator< ImageType >::ImageConstIterator(), itk::ImageRegionConstIterator< ImageType >::ImageRegionConstIterator(), itk::ImageScanlineConstIterator< TImage >::ImageScanlineConstIterator(), itk::ImageConstIterator< ImageType >::IsAtBegin(), itk::ImageConstIterator< ImageType >::operator=(), and itk::ImageConstIterator< ImageType >::SetRegion().
|
protected |
Constructor establishes an iterator to walk a particular image and a particular region of that image.
Definition at line 382 of file itkImageConstIterator.h.
Referenced by itk::ImageConstIterator< ImageType >::Get(), itk::ImageConstIterator< ImageType >::ImageConstIterator(), itk::ImageConstIterator< ImageType >::operator!=(), itk::ImageConstIterator< ImageType >::operator<(), itk::ImageConstIterator< ImageType >::operator<=(), itk::ImageConstIterator< ImageType >::operator=(), itk::ImageConstIterator< ImageType >::operator==(), itk::ImageConstIterator< ImageType >::operator>(), itk::ImageConstIterator< ImageType >::operator>=(), itk::ImageScanlineIterator< TImage >::Set(), itk::ImageRegionIterator< TImage >::Set(), itk::ImageIterator< TImage >::Set(), itk::ImageScanlineIterator< TImage >::Value(), itk::ImageRegionIterator< TImage >::Value(), itk::ImageIterator< TImage >::Value(), and itk::ImageConstIterator< ImageType >::Value().
|
protected |
Constructor establishes an iterator to walk a particular image and a particular region of that image.
Definition at line 380 of file itkImageConstIterator.h.
Referenced by itk::ImageScanlineConstIterator< TImage >::GoToEnd(), itk::ImageRegionConstIterator< ImageType >::GoToEnd(), itk::ImageConstIterator< ImageType >::GoToEnd(), itk::ImageConstIterator< ImageType >::ImageConstIterator(), itk::ImageConstIterator< ImageType >::IsAtEnd(), itk::ImageConstIterator< ImageType >::operator=(), and itk::ImageConstIterator< ImageType >::SetRegion().
|
protected |
Constructor establishes an iterator to walk a particular image and a particular region of that image.
Definition at line 374 of file itkImageConstIterator.h.
Referenced by itk::ImageIterator< TImage >::GetImage(), itk::ImageConstIterator< ImageType >::GetImage(), itk::ImageConstIterator< ImageType >::GetIndex(), itk::ImageConstIterator< ImageType >::ImageConstIterator(), itk::ImageConstIterator< ImageType >::operator=(), itk::ImageConstIterator< ImageType >::SetIndex(), and itk::ImageConstIterator< ImageType >::SetRegion().
|
protected |
Constructor establishes an iterator to walk a particular image and a particular region of that image.
Definition at line 378 of file itkImageConstIterator.h.
Referenced by itk::ImageConstIterator< ImageType >::Get(), itk::ImageConstIterator< ImageType >::GetIndex(), itk::ImageConstIterator< ImageType >::GoToBegin(), itk::ImageScanlineConstIterator< TImage >::GoToBeginOfLine(), itk::ImageConstIterator< ImageType >::GoToEnd(), itk::ImageScanlineConstIterator< TImage >::GoToEndOfLine(), itk::ImageConstIterator< ImageType >::ImageConstIterator(), itk::ImageRegionConstIterator< ImageType >::ImageRegionConstIterator(), itk::ImageScanlineConstIterator< TImage >::ImageScanlineConstIterator(), itk::ImageConstIterator< ImageType >::IsAtBegin(), itk::ImageConstIterator< ImageType >::IsAtEnd(), itk::ImageScanlineConstIterator< TImage >::IsAtEndOfLine(), itk::ImageConstIterator< ImageType >::operator!=(), itk::ImageScanlineConstIterator< TImage >::operator++(), itk::ImageRegionConstIterator< ImageType >::operator++(), itk::ImageScanlineConstIterator< TImage >::operator--(), itk::ImageRegionConstIterator< ImageType >::operator--(), itk::ImageConstIterator< ImageType >::operator<(), itk::ImageConstIterator< ImageType >::operator<=(), itk::ImageConstIterator< ImageType >::operator=(), itk::ImageConstIterator< ImageType >::operator==(), itk::ImageConstIterator< ImageType >::operator>(), itk::ImageConstIterator< ImageType >::operator>=(), itk::ImageScanlineIterator< TImage >::Set(), itk::ImageRegionIterator< TImage >::Set(), itk::ImageIterator< TImage >::Set(), itk::ImageScanlineConstIterator< TImage >::SetIndex(), itk::ImageRegionConstIterator< ImageType >::SetIndex(), itk::ImageConstIterator< ImageType >::SetIndex(), itk::ImageConstIterator< ImageType >::SetRegion(), itk::ImageScanlineIterator< TImage >::Value(), itk::ImageRegionIterator< TImage >::Value(), itk::ImageIterator< TImage >::Value(), and itk::ImageConstIterator< ImageType >::Value().
|
protected |
Constructor establishes an iterator to walk a particular image and a particular region of that image.
Definition at line 384 of file itkImageConstIterator.h.
Referenced by itk::ImageConstIterator< ImageType >::ImageConstIterator(), and itk::ImageConstIterator< ImageType >::operator=().
|
protected |
Constructor establishes an iterator to walk a particular image and a particular region of that image.
Definition at line 385 of file itkImageConstIterator.h.
Referenced by itk::ImageConstIterator< ImageType >::Get(), itk::ImageConstIterator< ImageType >::ImageConstIterator(), itk::ImageConstIterator< ImageType >::operator=(), itk::ImageScanlineIterator< TImage >::Set(), itk::ImageRegionIterator< TImage >::Set(), and itk::ImageIterator< TImage >::Set().
|
protected |
Constructor establishes an iterator to walk a particular image and a particular region of that image.
Definition at line 376 of file itkImageConstIterator.h.
Referenced by itk::ImageConstIterator< ImageType >::GetRegion(), itk::ImageScanlineConstIterator< TImage >::GoToBegin(), itk::ImageRegionConstIterator< ImageType >::GoToBegin(), itk::ImageScanlineConstIterator< TImage >::GoToEnd(), itk::ImageRegionConstIterator< ImageType >::GoToEnd(), itk::ImageConstIterator< ImageType >::ImageConstIterator(), itk::ImageRegionConstIterator< ImageType >::ImageRegionConstIterator(), itk::ImageScanlineConstIterator< TImage >::ImageScanlineConstIterator(), itk::ImageConstIterator< ImageType >::operator=(), itk::ImageScanlineConstIterator< TImage >::SetIndex(), itk::ImageRegionConstIterator< ImageType >::SetIndex(), and itk::ImageConstIterator< ImageType >::SetRegion().