Iterator that walks a Bresenham line through an ND image. More...
#include <itkLineIterator.h>
Iterator that walks a Bresenham line through an ND image.
LineIterator 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 52 of file itkLineIterator.h.
typedef Superclass::AccessorType itk::LineIterator< TImage >::AccessorType |
Accessor type that convert data between internal and external representations.
Reimplemented from itk::LineConstIterator< TImage >.
Definition at line 82 of file itkLineIterator.h.
typedef Superclass::ImageType itk::LineIterator< TImage >::ImageType |
Image typedef support.
Reimplemented from itk::LineConstIterator< TImage >.
Definition at line 77 of file itkLineIterator.h.
typedef Superclass::IndexType itk::LineIterator< TImage >::IndexType |
Inherit types from the superclass
Reimplemented from itk::LineConstIterator< TImage >.
Definition at line 70 of file itkLineIterator.h.
typedef Superclass::IndexValueType itk::LineIterator< TImage >::IndexValueType |
Reimplemented from itk::LineConstIterator< TImage >.
Definition at line 71 of file itkLineIterator.h.
typedef Superclass::InternalPixelType itk::LineIterator< TImage >::InternalPixelType |
Internal Pixel Type
Reimplemented from itk::LineConstIterator< TImage >.
Definition at line 80 of file itkLineIterator.h.
typedef Superclass::OffsetType itk::LineIterator< TImage >::OffsetType |
Offset typedef support.
Reimplemented from itk::LineConstIterator< TImage >.
Definition at line 72 of file itkLineIterator.h.
typedef Superclass::OffsetValueType itk::LineIterator< TImage >::OffsetValueType |
Reimplemented from itk::LineConstIterator< TImage >.
Definition at line 73 of file itkLineIterator.h.
typedef Superclass::PixelContainer itk::LineIterator< 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 from itk::LineConstIterator< TImage >.
Definition at line 78 of file itkLineIterator.h.
typedef Superclass::PixelContainerPointer itk::LineIterator< TImage >::PixelContainerPointer |
Reimplemented from itk::LineConstIterator< TImage >.
Definition at line 79 of file itkLineIterator.h.
typedef Superclass::PixelType itk::LineIterator< TImage >::PixelType |
External Pixel Type
Reimplemented from itk::LineConstIterator< TImage >.
Definition at line 81 of file itkLineIterator.h.
typedef TImage::PointType itk::LineConstIterator< TImage >::PointType [inherited] |
Origin typedef support
Definition at line 83 of file itkLineConstIterator.h.
typedef Superclass::RegionType itk::LineIterator< TImage >::RegionType |
Region typedef support
Reimplemented from itk::LineConstIterator< TImage >.
Definition at line 76 of file itkLineIterator.h.
typedef LineIterator itk::LineIterator< TImage >::Self |
Standard class typedefs.
Reimplemented from itk::LineConstIterator< TImage >.
Definition at line 57 of file itkLineIterator.h.
typedef Superclass::SizeType itk::LineIterator< TImage >::SizeType |
Size typedef support.
Reimplemented from itk::LineConstIterator< TImage >.
Definition at line 74 of file itkLineIterator.h.
typedef Superclass::SizeValueType itk::LineIterator< TImage >::SizeValueType |
Reimplemented from itk::LineConstIterator< TImage >.
Definition at line 75 of file itkLineIterator.h.
typedef TImage::SpacingType itk::LineConstIterator< TImage >::SpacingType [inherited] |
Spacing typedef support
Definition at line 80 of file itkLineConstIterator.h.
typedef LineConstIterator<TImage> itk::LineIterator< TImage >::Superclass |
Define the superclass
Definition at line 67 of file itkLineIterator.h.
itk::LineIterator< TImage >::LineIterator | ( | ImageType * | imagePtr, | |
const IndexType & | firstIndex, | |||
const IndexType & | lastIndex | |||
) |
Constructor establishes an iterator to walk along a path
virtual itk::LineIterator< TImage >::~LineIterator | ( | ) | [inline, virtual] |
Default Destructor.
Definition at line 116 of file itkLineIterator.h.
const PixelType& itk::LineConstIterator< TImage >::Get | ( | void | ) | const [inline, inherited] |
Get the pixel value
Definition at line 120 of file itkLineConstIterator.h.
static unsigned int itk::LineConstIterator< TImage >::GetImageIteratorDimension | ( | ) | [inline, static, inherited] |
Get the dimension (size) of the index.
Definition at line 108 of file itkLineConstIterator.h.
References HardConnectedComponentImageFilter::ImageDimension.
const IndexType itk::LineConstIterator< TImage >::GetIndex | ( | void | ) | [inline, inherited] |
Get the index. This provides a read only reference to the index.
Definition at line 114 of file itkLineConstIterator.h.
virtual const char* itk::LineIterator< TImage >::GetNameOfClass | ( | ) | const [virtual] |
Run-time type information (and related methods).
Reimplemented from itk::LineConstIterator< TImage >.
void itk::LineConstIterator< TImage >::GoToBegin | ( | ) | [inherited] |
Move an iterator to the beginning of the line.
bool itk::LineConstIterator< TImage >::IsAtEnd | ( | void | ) | [inline, inherited] |
Is the iterator at the end of the line?
Definition at line 126 of file itkLineConstIterator.h.
void itk::LineConstIterator< TImage >::operator++ | ( | ) | [inherited] |
Walk forward along the line to the next index in the image.
Self& itk::LineIterator< TImage >::operator= | ( | const Self & | it | ) |
operator= is provided to make sure the handle to the image is properly reference counted.
void itk::LineIterator< TImage >::Set | ( | const PixelType & | value | ) | [inline] |
Set the pixel value
Definition at line 88 of file itkLineIterator.h.
const PixelType& itk::LineIterator< TImage >::Value | ( | void | ) | [inline] |
Return a reference to the pixel This method will provide the fastest access to pixel data, but it will NOT support ImageAdaptors.
Definition at line 102 of file itkLineIterator.h.
const unsigned int itk::LineIterator< TImage >::ImageIteratorDimension = TImage::ImageDimension [static] |
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 from itk::LineConstIterator< TImage >.
Definition at line 64 of file itkLineIterator.h.
IndexType itk::LineConstIterator< TImage >::m_AccumulateError [protected, inherited] |
Definition at line 169 of file itkLineConstIterator.h.
IndexType itk::LineConstIterator< TImage >::m_CurrentImageIndex [protected, inherited] |
Start, end and current ND index position in the image of the line
Definition at line 159 of file itkLineConstIterator.h.
IndexType itk::LineConstIterator< TImage >::m_EndIndex [protected, inherited] |
Definition at line 162 of file itkLineConstIterator.h.
ImageType::ConstWeakPointer itk::LineConstIterator< TImage >::m_Image [protected, inherited] |
Smart pointer to the source image.
Definition at line 145 of file itkLineConstIterator.h.
IndexType itk::LineConstIterator< TImage >::m_IncrementError [protected, inherited] |
Definition at line 173 of file itkLineConstIterator.h.
bool itk::LineConstIterator< TImage >::m_IsAtEnd [protected, inherited] |
Is the iterator at the end of its walk?
Definition at line 156 of file itkLineConstIterator.h.
IndexType itk::LineConstIterator< TImage >::m_LastIndex [protected, inherited] |
Definition at line 161 of file itkLineConstIterator.h.
unsigned int itk::LineConstIterator< TImage >::m_MainDirection [protected, inherited] |
Variables that drive the Bresenham-Algorithm
Definition at line 166 of file itkLineConstIterator.h.
IndexType itk::LineConstIterator< TImage >::m_MaximalError [protected, inherited] |
Definition at line 177 of file itkLineConstIterator.h.
IndexType itk::LineConstIterator< TImage >::m_OverflowIncrement [protected, inherited] |
Definition at line 180 of file itkLineConstIterator.h.
IndexType itk::LineConstIterator< TImage >::m_ReduceErrorAfterIncrement [protected, inherited] |
Definition at line 184 of file itkLineConstIterator.h.
RegionType itk::LineConstIterator< TImage >::m_Region [protected, inherited] |
Region type to iterate over.
Definition at line 153 of file itkLineConstIterator.h.
IndexType itk::LineConstIterator< TImage >::m_StartIndex [protected, inherited] |
Definition at line 160 of file itkLineConstIterator.h.