Main Page   Groups   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Concepts

itk::LineConstIterator< TImage > Class Template Reference

Iterator that walks a Bresenham line through an ND image. More...

#include <itkLineConstIterator.h>

Inheritance diagram for itk::LineConstIterator< TImage >:

Inheritance graph
[legend]
List of all members.

Public Types

typedef LineConstIterator Self
typedef TImage::IndexType IndexType
typedef TImage::IndexValueType IndexValueType
typedef TImage::OffsetType OffsetType
typedef TImage::OffsetValueType OffsetValueType
typedef TImage::SizeType SizeType
typedef TImage::SizeValueType SizeValueType
typedef TImage::RegionType RegionType
typedef TImage::SpacingType SpacingType
typedef TImage::PointType PointType
typedef TImage ImageType
typedef TImage::PixelContainer PixelContainer
typedef PixelContainer::Pointer PixelContainerPointer
typedef TImage::InternalPixelType InternalPixelType
typedef TImage::PixelType PixelType
typedef TImage::AccessorType AccessorType

Public Member Functions

 itkStaticConstMacro (ImageIteratorDimension, unsigned int, TImage::ImageDimension)
virtual const char * GetNameOfClass () const
const IndexType GetIndex ()
const PixelTypeGet (void) const
bool IsAtEnd ()
void GoToBegin ()
void operator++ ()
Selfoperator= (const Self &it)
 LineConstIterator (const ImageType *imagePtr, const IndexType &firstIndex, const IndexType &lastIndex)
virtual ~LineConstIterator ()

Static Public Member Functions

unsigned int GetImageIteratorDimension ()

Protected Attributes

ImageType::ConstWeakPointer m_Image
RegionType m_Region
bool m_IsAtEnd
IndexType m_CurrentImageIndex
IndexType m_StartIndex
IndexType m_LastIndex
IndexType m_EndIndex
unsigned int m_MainDirection
IndexType m_AccumulateError
IndexType m_IncrementError
IndexType m_MaximalError
IndexType m_OverflowIncrement
IndexType m_ReduceErrorAfterIncrement

Detailed Description

template<class TImage>
class itk::LineConstIterator< TImage >

Iterator that walks a Bresenham line through an ND image.

LineConstIterator is an iterator that walks a Bresenham line through an image. The iterator is constructed similar to other image iterators except for instead of specifying a region to traverse, you specify two indices. The interval specified by the two indices is closed. So, a line iterator specified with the same start and end index will visit exactly one pixel.

 LineConstIterator<ImageType> it(image, I1, I2);
 while (!it.IsAtEnd())
 {
    // visits at least 1 pixel
 }

This class was contributed by Benjamin King, Experimentelle Radiologie, Medizinische Hochschule Hannover.

Definition at line 50 of file itkLineConstIterator.h.


Member Typedef Documentation

template<class TImage>
typedef TImage::AccessorType itk::LineConstIterator< TImage >::AccessorType
 

Accessor type that convert data between internal and external representations.

Reimplemented in itk::LineIterator< TImage >.

Definition at line 102 of file itkLineConstIterator.h.

template<class TImage>
typedef TImage itk::LineConstIterator< TImage >::ImageType
 

Image typedef support.

Reimplemented in itk::LineIterator< TImage >.

Definition at line 86 of file itkLineConstIterator.h.

template<class TImage>
typedef TImage::IndexType itk::LineConstIterator< TImage >::IndexType
 

Index typedef support.

Reimplemented in itk::LineIterator< TImage >.

Definition at line 65 of file itkLineConstIterator.h.

template<class TImage>
typedef TImage::IndexValueType itk::LineConstIterator< TImage >::IndexValueType
 

Reimplemented in itk::LineIterator< TImage >.

Definition at line 66 of file itkLineConstIterator.h.

template<class TImage>
typedef TImage::InternalPixelType itk::LineConstIterator< TImage >::InternalPixelType
 

Internal Pixel Type

Reimplemented in itk::LineIterator< TImage >.

Definition at line 95 of file itkLineConstIterator.h.

template<class TImage>
typedef TImage::OffsetType itk::LineConstIterator< TImage >::OffsetType
 

Offset typedef support.

Reimplemented in itk::LineIterator< TImage >.

Definition at line 69 of file itkLineConstIterator.h.

template<class TImage>
typedef TImage::OffsetValueType itk::LineConstIterator< TImage >::OffsetValueType
 

Reimplemented in itk::LineIterator< TImage >.

Definition at line 70 of file itkLineConstIterator.h.

template<class TImage>
typedef TImage::PixelContainer itk::LineConstIterator< 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::LineIterator< TImage >.

Definition at line 91 of file itkLineConstIterator.h.

template<class TImage>
typedef PixelContainer::Pointer itk::LineConstIterator< TImage >::PixelContainerPointer
 

Reimplemented in itk::LineIterator< TImage >.

Definition at line 92 of file itkLineConstIterator.h.

template<class TImage>
typedef TImage::PixelType itk::LineConstIterator< TImage >::PixelType
 

External Pixel Type

Reimplemented in itk::LineIterator< TImage >.

Definition at line 98 of file itkLineConstIterator.h.

template<class TImage>
typedef TImage::PointType itk::LineConstIterator< TImage >::PointType
 

Origin typedef support

Definition at line 83 of file itkLineConstIterator.h.

template<class TImage>
typedef TImage::RegionType itk::LineConstIterator< TImage >::RegionType
 

Region typedef support

Reimplemented in itk::LineIterator< TImage >.

Definition at line 77 of file itkLineConstIterator.h.

template<class TImage>
typedef LineConstIterator itk::LineConstIterator< TImage >::Self
 

Standard class typedefs.

Reimplemented in itk::LineIterator< TImage >.

Definition at line 55 of file itkLineConstIterator.h.

template<class TImage>
typedef TImage::SizeType itk::LineConstIterator< TImage >::SizeType
 

Size typedef support.

Reimplemented in itk::LineIterator< TImage >.

Definition at line 73 of file itkLineConstIterator.h.

template<class TImage>
typedef TImage::SizeValueType itk::LineConstIterator< TImage >::SizeValueType
 

Reimplemented in itk::LineIterator< TImage >.

Definition at line 74 of file itkLineConstIterator.h.

template<class TImage>
typedef TImage::SpacingType itk::LineConstIterator< TImage >::SpacingType
 

Spacing typedef support

Definition at line 80 of file itkLineConstIterator.h.


Constructor & Destructor Documentation

template<class TImage>
itk::LineConstIterator< TImage >::LineConstIterator const ImageType imagePtr,
const IndexType firstIndex,
const IndexType lastIndex
 

Constructor establishes an iterator to walk along a line

template<class TImage>
virtual itk::LineConstIterator< TImage >::~LineConstIterator  )  [inline, virtual]
 

Default Destructor.

Definition at line 145 of file itkLineConstIterator.h.


Member Function Documentation

template<class TImage>
const PixelType& itk::LineConstIterator< TImage >::Get void   )  const [inline]
 

Get the pixel value

Definition at line 120 of file itkLineConstIterator.h.

template<class TImage>
unsigned int itk::LineConstIterator< TImage >::GetImageIteratorDimension  )  [inline, static]
 

Get the dimension (size) of the index.

Definition at line 108 of file itkLineConstIterator.h.

template<class TImage>
const IndexType itk::LineConstIterator< TImage >::GetIndex void   )  [inline]
 

Get the index. This provides a read only reference to the index.

Definition at line 114 of file itkLineConstIterator.h.

template<class TImage>
virtual const char* itk::LineConstIterator< TImage >::GetNameOfClass  )  const [virtual]
 

Run-time type information (and related methods).

Reimplemented in itk::LineIterator< TImage >.

template<class TImage>
void itk::LineConstIterator< TImage >::GoToBegin  ) 
 

Move an iterator to the beginning of the line.

template<class TImage>
bool itk::LineConstIterator< TImage >::IsAtEnd void   )  [inline]
 

Is the iterator at the end of the line?

Definition at line 126 of file itkLineConstIterator.h.

template<class TImage>
itk::LineConstIterator< TImage >::itkStaticConstMacro ImageIteratorDimension  ,
unsigned  int,
TImage::ImageDimension 
 

Dimension of the image the iterator walks. This constant is needed so that 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::LineIterator< TImage >.

template<class TImage>
void itk::LineConstIterator< TImage >::operator++  ) 
 

Walk forward along the line to the next index in the image.

template<class TImage>
Self& itk::LineConstIterator< TImage >::operator= const Self it  ) 
 

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

Reimplemented in itk::LineIterator< TImage >.


Member Data Documentation

template<class TImage>
IndexType itk::LineConstIterator< TImage >::m_AccumulateError [protected]
 

Definition at line 169 of file itkLineConstIterator.h.

template<class TImage>
IndexType itk::LineConstIterator< TImage >::m_CurrentImageIndex [protected]
 

Start, end and current ND index position in the image of the line

Definition at line 159 of file itkLineConstIterator.h.

template<class TImage>
IndexType itk::LineConstIterator< TImage >::m_EndIndex [protected]
 

Definition at line 162 of file itkLineConstIterator.h.

template<class TImage>
ImageType::ConstWeakPointer itk::LineConstIterator< TImage >::m_Image [protected]
 

Smart pointer to the source image.

Definition at line 150 of file itkLineConstIterator.h.

template<class TImage>
IndexType itk::LineConstIterator< TImage >::m_IncrementError [protected]
 

Definition at line 173 of file itkLineConstIterator.h.

template<class TImage>
bool itk::LineConstIterator< TImage >::m_IsAtEnd [protected]
 

Is the iterator at the end of its walk?

Definition at line 156 of file itkLineConstIterator.h.

template<class TImage>
IndexType itk::LineConstIterator< TImage >::m_LastIndex [protected]
 

Definition at line 161 of file itkLineConstIterator.h.

template<class TImage>
unsigned int itk::LineConstIterator< TImage >::m_MainDirection [protected]
 

Variables that drive the Bresenham-Algorithm

Definition at line 166 of file itkLineConstIterator.h.

template<class TImage>
IndexType itk::LineConstIterator< TImage >::m_MaximalError [protected]
 

Definition at line 177 of file itkLineConstIterator.h.

template<class TImage>
IndexType itk::LineConstIterator< TImage >::m_OverflowIncrement [protected]
 

Definition at line 180 of file itkLineConstIterator.h.

template<class TImage>
IndexType itk::LineConstIterator< TImage >::m_ReduceErrorAfterIncrement [protected]
 

Definition at line 184 of file itkLineConstIterator.h.

template<class TImage>
RegionType itk::LineConstIterator< TImage >::m_Region [protected]
 

Region type to iterate over.

Definition at line 153 of file itkLineConstIterator.h.

template<class TImage>
IndexType itk::LineConstIterator< TImage >::m_StartIndex [protected]
 

Definition at line 160 of file itkLineConstIterator.h.


The documentation for this class was generated from the following file:
Generated at Thu May 25 01:40:11 2006 for ITK by doxygen 1.3.5 written by Dimitri van Heesch, © 1997-2000