ITK
4.6.0
Insight Segmentation and Registration Toolkit
|
#include <itkImageConstIteratorWithOnlyIndex.h>
A base class for multi-dimensional iterators templated over image type that are designed to provide only index information, and no pixel access.
ImageConstIteratorWithOnlyIndex is a templated class to represent a multi-dimensional iterator, and is templated over the dimension of the image.
The "WithOnlyIndex" family of iterators differs from the "WithIndex" family of iterators in that only index information is available. The iterator does not access image data at all, and thus can be safely used with images of type ImageBase.
ImageConstIteratorWithOnlyIndex is a base class for the "WithOnlyIndex" family of ITK image iterators, which are designed to efficiently keep track of the image index position of the iterator during increment and decrement operations. This iterator is a base class and provides only the basic construction and comparison operations. It does not provide mechanisms for moving the iterator. A subclass of ImageConstIteratorWithOnlyIndex must be used to move the iterator.
ImageConstIteratorWithOnlyIndex 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 region, and the start index of the region. To gain access to this information, ImageConstIteratorWithOnlyIndex holds a reference to the image over which it is traversing.
Definition at line 95 of file itkImageConstIteratorWithOnlyIndex.h.
Public Types | |
typedef TImage | ImageType |
typedef TImage::IndexType | IndexType |
typedef IndexType::IndexValueType | IndexValueType |
typedef TImage::OffsetType | OffsetType |
typedef OffsetType::OffsetValueType | OffsetValueType |
typedef TImage::RegionType | RegionType |
typedef ImageConstIteratorWithOnlyIndex | Self |
typedef TImage::SizeType | SizeType |
typedef SizeType::SizeValueType | SizeValueType |
Public Member Functions | |
const IndexType & | GetIndex () const |
const RegionType & | GetRegion () const |
void | GoToBegin (void) |
void | GoToReverseBegin (void) |
ImageConstIteratorWithOnlyIndex () | |
ImageConstIteratorWithOnlyIndex (const Self &it) | |
ImageConstIteratorWithOnlyIndex (const TImage *ptr, const RegionType ®ion) | |
bool | IsAtEnd (void) const |
bool | IsAtReverseEnd (void) const |
itkLegacyMacro (Self Begin(void) const) | |
itkLegacyMacro (Self End(void) const) | |
bool | operator!= (const Self &it) const |
bool | operator< (const Self &it) const |
bool | operator<= (const Self &it) const |
Self & | operator= (const Self &it) |
bool | operator== (const Self &it) const |
bool | operator> (const Self &it) const |
bool | operator>= (const Self &it) const |
bool | Remaining () |
void | SetIndex (const IndexType &ind) |
virtual | ~ImageConstIteratorWithOnlyIndex () |
Static Public Member Functions | |
static unsigned int | GetImageDimension () |
Static Public Attributes | |
static const unsigned int | ImageDimension = TImage::ImageDimension |
Protected Attributes | |
IndexType | m_BeginIndex |
IndexType | m_EndIndex |
TImage::ConstPointer | m_Image |
OffsetValueType | m_OffsetTable [ImageDimension+1] |
IndexType | m_PositionIndex |
RegionType | m_Region |
bool | m_Remaining |
typedef TImage itk::ImageConstIteratorWithOnlyIndex< TImage >::ImageType |
Image typedef support.
Definition at line 119 of file itkImageConstIteratorWithOnlyIndex.h.
typedef TImage::IndexType itk::ImageConstIteratorWithOnlyIndex< TImage >::IndexType |
Index typedef support.
Definition at line 108 of file itkImageConstIteratorWithOnlyIndex.h.
typedef IndexType::IndexValueType itk::ImageConstIteratorWithOnlyIndex< TImage >::IndexValueType |
Definition at line 109 of file itkImageConstIteratorWithOnlyIndex.h.
typedef TImage::OffsetType itk::ImageConstIteratorWithOnlyIndex< TImage >::OffsetType |
Type of the Offset taken from the image
Definition at line 122 of file itkImageConstIteratorWithOnlyIndex.h.
typedef OffsetType::OffsetValueType itk::ImageConstIteratorWithOnlyIndex< TImage >::OffsetValueType |
Definition at line 123 of file itkImageConstIteratorWithOnlyIndex.h.
typedef TImage::RegionType itk::ImageConstIteratorWithOnlyIndex< TImage >::RegionType |
Region typedef support.
Definition at line 116 of file itkImageConstIteratorWithOnlyIndex.h.
typedef ImageConstIteratorWithOnlyIndex itk::ImageConstIteratorWithOnlyIndex< TImage >::Self |
Standard class typedefs.
Definition at line 99 of file itkImageConstIteratorWithOnlyIndex.h.
typedef TImage::SizeType itk::ImageConstIteratorWithOnlyIndex< TImage >::SizeType |
Size typedef support.
Definition at line 112 of file itkImageConstIteratorWithOnlyIndex.h.
typedef SizeType::SizeValueType itk::ImageConstIteratorWithOnlyIndex< TImage >::SizeValueType |
Definition at line 113 of file itkImageConstIteratorWithOnlyIndex.h.
itk::ImageConstIteratorWithOnlyIndex< TImage >::ImageConstIteratorWithOnlyIndex | ( | ) |
Default Constructor. Need to provide a default constructor since we provide a copy constructor.
itk::ImageConstIteratorWithOnlyIndex< TImage >::ImageConstIteratorWithOnlyIndex | ( | const Self & | it | ) |
Copy Constructor. The copy constructor is provided to make sure the handle to the image is properly reference counted.
itk::ImageConstIteratorWithOnlyIndex< TImage >::ImageConstIteratorWithOnlyIndex | ( | const TImage * | ptr, |
const RegionType & | region | ||
) |
Constructor establishes an iterator to walk a particular image and a particular region of that image.
|
inlinevirtual |
Default Destructor.
Definition at line 138 of file itkImageConstIteratorWithOnlyIndex.h.
|
inlinestatic |
Get the dimension (size) of the index.
Definition at line 145 of file itkImageConstIteratorWithOnlyIndex.h.
References itk::ImageConstIteratorWithOnlyIndex< TImage >::ImageDimension.
|
inline |
Get the index. This provides a read only reference to the index.
Definition at line 210 of file itkImageConstIteratorWithOnlyIndex.h.
References itk::ImageConstIteratorWithOnlyIndex< TImage >::m_PositionIndex.
|
inline |
Get the region that this iterator walks. ImageIterators know the beginning and the end of the region of the image to iterate over.
Definition at line 217 of file itkImageConstIteratorWithOnlyIndex.h.
References itk::ImageConstIteratorWithOnlyIndex< TImage >::m_Region.
void itk::ImageConstIteratorWithOnlyIndex< TImage >::GoToBegin | ( | void | ) |
Move an iterator to the beginning of the region.
void itk::ImageConstIteratorWithOnlyIndex< TImage >::GoToReverseBegin | ( | void | ) |
Move an iterator to the End of the region.
|
inline |
Is the iterator at the end of the region?
Definition at line 250 of file itkImageConstIteratorWithOnlyIndex.h.
References itk::ImageConstIteratorWithOnlyIndex< TImage >::m_Remaining.
|
inline |
Is the iterator at the beginning of the region?
Definition at line 244 of file itkImageConstIteratorWithOnlyIndex.h.
References itk::ImageConstIteratorWithOnlyIndex< TImage >::m_Remaining.
itk::ImageConstIteratorWithOnlyIndex< TImage >::itkLegacyMacro | ( | Self Begin(void) | const | ) |
Move an iterator to the beginning of the region.
itk::ImageConstIteratorWithOnlyIndex< TImage >::itkLegacyMacro | ( | Self End(void) | const | ) |
Move an iterator to the End of the region.
|
inline |
Comparison operator. Two iterators are the same if they "point to" the same memory location
Definition at line 153 of file itkImageConstIteratorWithOnlyIndex.h.
References itk::ImageConstIteratorWithOnlyIndex< TImage >::m_PositionIndex.
|
inline |
Comparison operator. An iterator is "less than" another if it "points to" a lower memory location.
Definition at line 181 of file itkImageConstIteratorWithOnlyIndex.h.
References itk::ImageConstIteratorWithOnlyIndex< TImage >::m_PositionIndex.
|
inline |
Comparison operator. An iterator is "less than" another if it "points to" a lower memory location.
Definition at line 171 of file itkImageConstIteratorWithOnlyIndex.h.
References itk::ImageConstIteratorWithOnlyIndex< TImage >::m_PositionIndex.
Self& itk::ImageConstIteratorWithOnlyIndex< TImage >::operator= | ( | const Self & | it | ) |
operator= is provided to make sure the handle to the image is properly reference counted.
Referenced by itk::ImageRandomConstIteratorWithOnlyIndex< TImage >::ImageRandomConstIteratorWithOnlyIndex(), and itk::ImageRegionConstIteratorWithOnlyIndex< TImage >::ImageRegionConstIteratorWithOnlyIndex().
|
inline |
Comparison operator. Two iterators are the same if they "point to" the same memory location
Definition at line 162 of file itkImageConstIteratorWithOnlyIndex.h.
References itk::ImageConstIteratorWithOnlyIndex< TImage >::m_PositionIndex.
|
inline |
Comparison operator. An iterator is "greater than" another if it "points to" a higher location.
Definition at line 201 of file itkImageConstIteratorWithOnlyIndex.h.
References itk::ImageConstIteratorWithOnlyIndex< TImage >::m_PositionIndex.
|
inline |
Comparison operator. An iterator is "greater than" another if it "points to" a higher location.
Definition at line 191 of file itkImageConstIteratorWithOnlyIndex.h.
References itk::ImageConstIteratorWithOnlyIndex< TImage >::m_PositionIndex.
|
inline |
Are there data remaining in the region ?
Definition at line 256 of file itkImageConstIteratorWithOnlyIndex.h.
References itk::ImageConstIteratorWithOnlyIndex< TImage >::m_Remaining.
|
inline |
Set the index. No bounds checking is performed.
Definition at line 224 of file itkImageConstIteratorWithOnlyIndex.h.
References itk::ImageConstIteratorWithOnlyIndex< TImage >::m_PositionIndex.
|
static |
Dimension of the image that 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 105 of file itkImageConstIteratorWithOnlyIndex.h.
Referenced by itk::ImageConstIteratorWithOnlyIndex< TImage >::GetImageDimension().
|
protected |
Definition at line 265 of file itkImageConstIteratorWithOnlyIndex.h.
|
protected |
Definition at line 266 of file itkImageConstIteratorWithOnlyIndex.h.
|
protected |
Definition at line 262 of file itkImageConstIteratorWithOnlyIndex.h.
|
protected |
Definition at line 272 of file itkImageConstIteratorWithOnlyIndex.h.
|
protected |
Definition at line 264 of file itkImageConstIteratorWithOnlyIndex.h.
Referenced by itk::ImageConstIteratorWithOnlyIndex< TImage >::GetIndex(), itk::ImageConstIteratorWithOnlyIndex< TImage >::operator!=(), itk::ImageConstIteratorWithOnlyIndex< TImage >::operator<(), itk::ImageConstIteratorWithOnlyIndex< TImage >::operator<=(), itk::ImageConstIteratorWithOnlyIndex< TImage >::operator==(), itk::ImageConstIteratorWithOnlyIndex< TImage >::operator>(), itk::ImageConstIteratorWithOnlyIndex< TImage >::operator>=(), and itk::ImageConstIteratorWithOnlyIndex< TImage >::SetIndex().
|
protected |
Definition at line 270 of file itkImageConstIteratorWithOnlyIndex.h.
Referenced by itk::ImageConstIteratorWithOnlyIndex< TImage >::GetRegion().
|
protected |