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

itk::NeighborhoodIterator< TImage, TBoundaryCondition > Class Template Reference
[Image IteratorsOperators]

#include <itkNeighborhoodIterator.h>

Inheritance diagram for itk::NeighborhoodIterator< TImage, TBoundaryCondition >:

Inheritance graph
[legend]
Collaboration diagram for itk::NeighborhoodIterator< TImage, TBoundaryCondition >:

Collaboration graph
[legend]
List of all members.

Detailed Description

template<class TImage, class TBoundaryCondition = ZeroFluxNeumannBoundaryCondition<TImage>>
class itk::NeighborhoodIterator< TImage, TBoundaryCondition >

Defines iteration of a local N-dimensional neighborhood of pixels across an itk::Image.

This class is a loose extension of the Standard Template Library (STL) bi-directional iterator concept to masks of pixel neighborhoods within itk::Image objects. This NeighborhoodIterator base class defines simple forward and reverse iteration of an N-dimensional neighborhood mask across an image. Elements within the mask can be accessed like elements within an array.

NeighborhoodIterators are designed to encapsulate some of the complexity of working with image neighborhoods, complexity that would otherwise have to be managed at the algorithmic level. Use NeighborhoodIterators to simplify writing algorithms that perform geometrically localized operations on images (for example, convolution and morphological operations).

To motivate the discussion of NeighborhoodIterators and their use in Itk, consider the following code that takes directional derivatives at each point in an image.

 itk::NeighborhoodInnerProduct<ImageType> IP;

 itk::DerivativeOperator<ImageType> operator;
  operator->SetOrder(1);
  operator->SetDirection(0);
  operator->CreateDirectional();

 itk::NeighborhoodIterator<ImageType>
   iterator(operator->GetRadius(), myImage, myImage->GetRequestedRegion());

 iterator.SetToBegin();
 while ( ! iterator.IsAtEnd() )
 {
   std::cout << "Derivative at index " << iterator.GetIndex() << is <<
     IP(iterator, operator) << std::endl;
   ++iterator;
 } 

Most of the work for the programmer in the code above is in setting up for the iteration. There are three steps. First an inner product function object is created which will be used to effect convolution with the derivative kernel. Setting up the derivative kernel, DerivativeOperator, involves setting the order and direction of the derivative. Finally, we create an iterator over the RequestedRegion of the itk::Image (see Image) using the radius of the derivative kernel as the size.

Itk iterators only loosely follow STL conventions. Notice that instead of asking myImage for myImage.begin() and myImage.end(), iterator.SetToBegin() and iterator.IsAtEnd() are called. Itk iterators are typically more complex objects than traditional, pointer-style STL iterators, and the increased overhead required to conform to the complete STL API is not always justified.

The API for creating and manipulating a NeighborhoodIterator mimics that of the itk::ImageIterators. Like the itk::ImageIterator, a ConstNeighborhoodIterator is defined on a region of interest in an itk::Image. Iteration is constrained within that region of interest.

A NeighborhoodIterator is constructed as a container of pointers (offsets) to a geometric neighborhood of image pixels. As the central pixel position in the mask is moved around the image, the neighboring pixel pointers (offsets) are moved accordingly.

A pixel neighborhood is defined as a central pixel location and an N-dimensional radius extending outward from that location.

Pixels in a neighborhood can be accessed through a NeighborhoodIterator like elements in an array. For example, a 2D neighborhood with radius 2x1 has indices:

 0  1  2  3  4
 5  6  7  8  9
 10 11 12 13 14

Now suppose a NeighborhoodIterator with the above dimensions is constructed and positioned over a neighborhood of values in an Image:

 1.2 1.3 1.8 1.4 1.1
 1.8 1.1 0.7 1.0 1.0
 2.1 1.9 1.7 1.4 2.0

Shown below is some sample pixel access code and the values that it returns.

 ::size_t c = (::size_t) (iterator.Size() / 2); // get offset of center pixel
 ::size_t s = iterator.GetStride(1);            // y-dimension step size

 std::cout << iterator.GetPixel(7)      << std::endl;
 std::cout << iterator.GetCenterPixel() << std::endl;
 std::cout << iterator.GetPixel(c)      << std::endl;
 std::cout << iterator.GetPixel(c-1)    << std::endl;
 std::cout << iterator.GetPixel(c-s)    << std::endl;
 std::cout << iterator.GetPixel(c-s-1)  << std::endl; 
 std::cout << *iterator[c]              << std::endl;

Results:

 0.7
 0.7
 0.7
 1.1
 1.8
 1.3
 0.7

Use of GetPixel() is preferred over the *iterator[] form, and can be used without loss of efficiency in most cases. Some variations (subclasses) of NeighborhoodIterators may exist which do not support the latter API. Corresponding SetPixel() methods exist to modify pixel values in non-const NeighborhoodIterators.

NeighborhoodIterators are "bidirectional iterators". They move only in two directions through the data set. These directions correspond to the layout of the image data in memory and not to spatial directions of the N-dimensional itk::Image. Iteration always proceeds along the fastest increasing dimension (as defined by the layout of the image data) . For itk::Image this is the first dimension specified (i.e. for 3-dimensional (x,y,z) NeighborhoodIterator proceeds along the x-dimension) (For random access iteration through N-dimensional indicies, use RandomAccessNeighborhoodIterator.)

Each subclass of a ConstNeighborhoodIterator may also define its own mechanism for iteration through an image. In general, the Iterator does not directly keep track of its spatial location in the image, but uses a set of internal loop variables and offsets to trigger wraps at itk::Image region boundaries, and to identify the end of the itk::Image region.

Todo:
Better support for regions with negative indicies.
Todo:
Add Begin() and End() methods?
See also:
DerivativeOperator

NeighborhoodInnerProduct

MORE INFORMATION
For a complete description of the ITK Image Iterators and their API, please see the Iterators chapter in the ITK Software Guide. The ITK Software Guide is available in print and as a free .pdf download from http://www.itk.org.
See also:
ImageConstIterator

ConditionalConstIterator

ConstNeighborhoodIterator

ConstShapedNeighborhoodIterator

ConstSliceIterator

CorrespondenceDataStructureIterator

FloodFilledFunctionConditionalConstIterator

FloodFilledImageFunctionConditionalConstIterator

FloodFilledImageFunctionConditionalIterator

FloodFilledSpatialFunctionConditionalConstIterator

FloodFilledSpatialFunctionConditionalIterator

ImageConstIterator

ImageConstIteratorWithIndex

ImageIterator

ImageIteratorWithIndex

ImageLinearConstIteratorWithIndex

ImageLinearIteratorWithIndex

ImageRandomConstIteratorWithIndex

ImageRandomIteratorWithIndex

ImageRegionConstIterator

ImageRegionConstIteratorWithIndex

ImageRegionExclusionConstIteratorWithIndex

ImageRegionExclusionIteratorWithIndex

ImageRegionIterator

ImageRegionIteratorWithIndex

ImageRegionReverseConstIterator

ImageRegionReverseIterator

ImageReverseConstIterator

ImageReverseIterator

ImageSliceConstIteratorWithIndex

ImageSliceIteratorWithIndex

NeighborhoodIterator

PathConstIterator

PathIterator

ShapedNeighborhoodIterator

SliceIterator

ImageConstIteratorWithIndex

Examples:

Testing/Code/Common/itkVectorImageTest.cxx.

Definition at line 212 of file itkNeighborhoodIterator.h.

Public Types

typedef NeighborhoodAllocator<
TImage::InternalPixelType * > 
AllocatorType
typedef TBoundaryCondition BoundaryConditionType
typedef Superclass::ConstIterator ConstIterator
typedef ImageBoundaryCondition<
ImageType > const * 
ImageBoundaryConditionConstPointerType
typedef Superclass::ImageBoundaryConditionPointerType ImageBoundaryConditionPointerType
typedef Superclass::ImageType ImageType
typedef Superclass::IndexType IndexType
typedef Superclass::InternalPixelType InternalPixelType
typedef Superclass::Iterator Iterator
typedef ImageType::NeighborhoodAccessorFunctorType NeighborhoodAccessorFunctorType
typedef Superclass::NeighborhoodType NeighborhoodType
typedef Superclass::OffsetType OffsetType
typedef OffsetType::OffsetValueType OffsetValueType
typedef Superclass::PixelType PixelType
typedef Superclass::RadiusType RadiusType
typedef Superclass::RegionType RegionType
typedef NeighborhoodIterator Self
typedef Superclass::SizeType SizeType
typedef Superclass::SizeValueType SizeValueType
typedef SliceIterator< TImage::InternalPixelType *,
Self
SliceIteratorType
typedef ConstNeighborhoodIterator<
TImage, TBoundaryCondition > 
Superclass
typedef IndexType::IndexValueType IndexValueType

Public Member Functions

ConstIterator Begin () const
Iterator Begin ()
OffsetType ComputeInternalIndex (unsigned int n) const
ConstIterator End () const
Iterator End ()
IndexType GetBeginIndex () const
long GetBound (unsigned int n) const
IndexType GetBound () const
const BoundaryConditionTypeGetBoundaryCondition () const
RegionType GetBoundingBoxAsImageRegion () const
const AllocatorTypeGetBufferReference () const
AllocatorTypeGetBufferReference ()
unsigned int GetCenterNeighborhoodIndex () const
PixelType GetCenterPixel () const
const InternalPixelTypeGetCenterPointer () const
InternalPixelTypeGetCenterPointer ()
TImage::InternalPixelType * GetCenterValue () const
TImage::InternalPixelType *& GetElement (unsigned int i)
const ImageTypeGetImagePointer (void) const
virtual IndexType GetIndex (const unsigned i) const
virtual IndexType GetIndex (const OffsetType &o) const
virtual IndexType GetIndex (void) const
virtual NeighborhoodType GetNeighborhood () const
virtual unsigned int GetNeighborhoodIndex (const OffsetType &) const
virtual PixelType GetNext (const unsigned axis) const
virtual PixelType GetNext (const unsigned axis, const unsigned i) const
OffsetType GetOffset (unsigned int i) const
virtual PixelType GetPixel (const OffsetType &o, bool &IsInBounds) const
virtual PixelType GetPixel (const unsigned i, bool &IsInBounds) const
virtual PixelType GetPrevious (const unsigned axis) const
virtual PixelType GetPrevious (const unsigned axis, const unsigned i) const
unsigned long GetRadius (const unsigned long n) const
const SizeType GetRadius () const
RegionType GetRegion () const
SizeType GetSize () const
unsigned long GetSize (const unsigned long n) const
std::slice GetSlice (unsigned int) const
unsigned GetStride (const unsigned axis) const
OffsetValueType GetWrapOffset (unsigned int n) const
OffsetType GetWrapOffset () const
virtual void GoToBegin ()
virtual void GoToEnd ()
bool InBounds () const
virtual void Initialize (const SizeType &radius, const ImageType *ptr, const RegionType &region)
virtual bool IsAtBegin () const
 itkStaticConstMacro (NeighborhoodDimension, unsigned int, VDimension)
 itkStaticConstMacro (Dimension, unsigned int, TImage::ImageDimension)
 NeighborhoodIterator (const SizeType &radius, ImageType *ptr, const RegionType &region)
 NeighborhoodIterator (const NeighborhoodIterator &n)
 NeighborhoodIterator ()
bool operator!= (const Self &other) const
bool operator!= (const Self &it) const
Selfoperator++ ()
Selfoperator+= (const OffsetType &)
OffsetType operator- (const Self &b)
Selfoperator-- ()
Selfoperator-= (const OffsetType &)
bool operator< (const Self &it) const
bool operator<= (const Self &it) const
bool operator== (const Self &other) const
bool operator== (const Self &it) const
bool operator> (const Self &it) const
bool operator>= (const Self &it) const
const TImage::InternalPixelType *& operator[] (const OffsetType &o) const
TImage::InternalPixelType *& operator[] (const OffsetType &o)
const TImage::InternalPixelType *& operator[] (unsigned int i) const
TImage::InternalPixelType *& operator[] (unsigned int i)
virtual void OverrideBoundaryCondition (const ImageBoundaryConditionPointerType i)
void Print (std::ostream &os) const
virtual void PrintSelf (std::ostream &, Indent) const
virtual void ResetBoundaryCondition ()
void SetBoundaryCondition (const TBoundaryCondition &c)
virtual void SetCenterPixel (const PixelType &p)
virtual void SetNeighborhood (const NeighborhoodType &)
virtual void SetNext (const unsigned axis, const PixelType &v)
virtual void SetNext (const unsigned axis, const unsigned i, const PixelType &v)
virtual void SetPixel (const unsigned i, const PixelType &v, bool &status)
virtual void SetPrevious (const unsigned axis, const PixelType &v)
virtual void SetPrevious (const unsigned axis, const unsigned i, const PixelType &v)
void SetRadius (const unsigned long)
void SetRadius (const unsigned long *rad)
void SetRadius (const SizeType &)
unsigned int Size () const
bool GetNeedToUseBoundaryCondition () const
void NeedToUseBoundaryConditionOff ()
void NeedToUseBoundaryConditionOn ()
void SetNeedToUseBoundaryCondition (bool b)
virtual PixelType GetPixel (const OffsetType &o) const
virtual PixelType GetPixel (const unsigned i) const
virtual bool IsAtEnd () const
Selfoperator= (const Self &orig)
void SetLocation (const IndexType &position)
virtual void SetPixel (const OffsetType o, const PixelType &v)
virtual void SetPixel (const unsigned i, const PixelType &v)

Protected Member Functions

virtual void Allocate (unsigned int i)
virtual void ComputeNeighborhoodOffsetTable ()
virtual void ComputeNeighborhoodStrideTable ()
virtual void SetBeginIndex (const IndexType &start)
virtual void SetBound (const SizeType &)
virtual void SetEndIndex ()
virtual void SetLoop (const IndexType &p)
virtual void SetPixelPointers (const IndexType &)
void SetSize ()

Protected Attributes

const InternalPixelTypem_Begin
IndexType m_BeginIndex
IndexType m_Bound
ImageBoundaryConditionPointerType m_BoundaryCondition
ImageType::ConstWeakPointer m_ConstImage
const InternalPixelTypem_End
IndexType m_EndIndex
bool m_InBounds [Dimension]
IndexType m_InnerBoundsHigh
IndexType m_InnerBoundsLow
TBoundaryCondition m_InternalBoundaryCondition
bool m_IsInBounds
bool m_IsInBoundsValid
IndexType m_Loop
bool m_NeedToUseBoundaryCondition
NeighborhoodAccessorFunctorType m_NeighborhoodAccessorFunctor
RegionType m_Region
OffsetType m_WrapOffset


Member Typedef Documentation

typedef NeighborhoodAllocator<TImage::InternalPixelType * > itk::Neighborhood< TImage::InternalPixelType * , VDimension, NeighborhoodAllocator<TImage::InternalPixelType * > >::AllocatorType [inherited]

External support for allocator type.

Definition at line 61 of file itkNeighborhood.h.

template<class TImage, class TBoundaryCondition = ZeroFluxNeumannBoundaryCondition<TImage>>
typedef TBoundaryCondition itk::ConstNeighborhoodIterator< TImage, TBoundaryCondition >::BoundaryConditionType [inherited]

Typedef for boundary condition type.

Reimplemented in itk::ConstShapedNeighborhoodIterator< TImage, TBoundaryCondition >, and itk::ShapedNeighborhoodIterator< TImage, TBoundaryCondition >.

Definition at line 94 of file itkConstNeighborhoodIterator.h.

template<class TImage, class TBoundaryCondition = ZeroFluxNeumannBoundaryCondition<TImage>>
typedef Superclass::ConstIterator itk::NeighborhoodIterator< TImage, TBoundaryCondition >::ConstIterator

Reimplemented from itk::ConstNeighborhoodIterator< TImage, TBoundaryCondition >.

Reimplemented in itk::ConstShapedNeighborhoodIterator< TImage, TBoundaryCondition >, and itk::ShapedNeighborhoodIterator< TImage, TBoundaryCondition >.

Definition at line 232 of file itkNeighborhoodIterator.h.

template<class TImage, class TBoundaryCondition = ZeroFluxNeumannBoundaryCondition<TImage>>
typedef ImageBoundaryCondition<ImageType> const* itk::ConstNeighborhoodIterator< TImage, TBoundaryCondition >::ImageBoundaryConditionConstPointerType [inherited]

Definition at line 99 of file itkConstNeighborhoodIterator.h.

template<class TImage, class TBoundaryCondition = ZeroFluxNeumannBoundaryCondition<TImage>>
typedef Superclass::ImageBoundaryConditionPointerType itk::NeighborhoodIterator< TImage, TBoundaryCondition >::ImageBoundaryConditionPointerType

Typedef for generic boundary condition pointer

Reimplemented from itk::ConstNeighborhoodIterator< TImage, TBoundaryCondition >.

Reimplemented in itk::ConstShapedNeighborhoodIterator< TImage, TBoundaryCondition >, and itk::ShapedNeighborhoodIterator< TImage, TBoundaryCondition >.

Definition at line 234 of file itkNeighborhoodIterator.h.

template<class TImage, class TBoundaryCondition = ZeroFluxNeumannBoundaryCondition<TImage>>
typedef Superclass::ImageType itk::NeighborhoodIterator< TImage, TBoundaryCondition >::ImageType

Typedef support for common objects

Reimplemented from itk::ConstNeighborhoodIterator< TImage, TBoundaryCondition >.

Reimplemented in itk::ConstShapedNeighborhoodIterator< TImage, TBoundaryCondition >, and itk::ShapedNeighborhoodIterator< TImage, TBoundaryCondition >.

Definition at line 224 of file itkNeighborhoodIterator.h.

template<class TImage, class TBoundaryCondition = ZeroFluxNeumannBoundaryCondition<TImage>>
typedef Superclass::IndexType itk::NeighborhoodIterator< TImage, TBoundaryCondition >::IndexType

Typedef support for common objects

Reimplemented from itk::ConstNeighborhoodIterator< TImage, TBoundaryCondition >.

Reimplemented in itk::ConstShapedNeighborhoodIterator< TImage, TBoundaryCondition >, and itk::ShapedNeighborhoodIterator< TImage, TBoundaryCondition >.

Definition at line 226 of file itkNeighborhoodIterator.h.

template<class TImage, class TBoundaryCondition = ZeroFluxNeumannBoundaryCondition<TImage>>
typedef IndexType::IndexValueType itk::ConstNeighborhoodIterator< TImage, TBoundaryCondition >::IndexValueType [inherited]

Typedef support for common objects

Reimplemented in itk::ConstShapedNeighborhoodIterator< TImage, TBoundaryCondition >, and itk::ShapedNeighborhoodIterator< TImage, TBoundaryCondition >.

Definition at line 82 of file itkConstNeighborhoodIterator.h.

template<class TImage, class TBoundaryCondition = ZeroFluxNeumannBoundaryCondition<TImage>>
typedef Superclass::InternalPixelType itk::NeighborhoodIterator< TImage, TBoundaryCondition >::InternalPixelType

Extract typedefs from superclass.

Reimplemented from itk::ConstNeighborhoodIterator< TImage, TBoundaryCondition >.

Reimplemented in itk::ConstShapedNeighborhoodIterator< TImage, TBoundaryCondition >, and itk::ShapedNeighborhoodIterator< TImage, TBoundaryCondition >.

Definition at line 221 of file itkNeighborhoodIterator.h.

template<class TImage, class TBoundaryCondition = ZeroFluxNeumannBoundaryCondition<TImage>>
typedef Superclass::Iterator itk::NeighborhoodIterator< TImage, TBoundaryCondition >::Iterator

Iterator typedef support. Note the naming is intentional, i.e., iterator and const_iterator, because the allocator may be a vnl object or other type, which uses this form.

Reimplemented from itk::ConstNeighborhoodIterator< TImage, TBoundaryCondition >.

Definition at line 231 of file itkNeighborhoodIterator.h.

template<class TImage, class TBoundaryCondition = ZeroFluxNeumannBoundaryCondition<TImage>>
typedef ImageType::NeighborhoodAccessorFunctorType itk::ConstNeighborhoodIterator< TImage, TBoundaryCondition >::NeighborhoodAccessorFunctorType [inherited]

Typedef for the functor used to access neighborhoods of pixel pointers. This is obtained as a trait from the image and is different for Image and VectorImage.

Definition at line 91 of file itkConstNeighborhoodIterator.h.

template<class TImage, class TBoundaryCondition = ZeroFluxNeumannBoundaryCondition<TImage>>
typedef Superclass::NeighborhoodType itk::NeighborhoodIterator< TImage, TBoundaryCondition >::NeighborhoodType

Typedef support for common objects

Reimplemented from itk::ConstNeighborhoodIterator< TImage, TBoundaryCondition >.

Reimplemented in itk::ConstShapedNeighborhoodIterator< TImage, TBoundaryCondition >, and itk::ShapedNeighborhoodIterator< TImage, TBoundaryCondition >.

Definition at line 230 of file itkNeighborhoodIterator.h.

template<class TImage, class TBoundaryCondition = ZeroFluxNeumannBoundaryCondition<TImage>>
typedef Superclass::OffsetType itk::NeighborhoodIterator< TImage, TBoundaryCondition >::OffsetType

Inherit typedefs from superclass

Reimplemented from itk::ConstNeighborhoodIterator< TImage, TBoundaryCondition >.

Reimplemented in itk::ConstShapedNeighborhoodIterator< TImage, TBoundaryCondition >, and itk::ShapedNeighborhoodIterator< TImage, TBoundaryCondition >.

Definition at line 227 of file itkNeighborhoodIterator.h.

template<class TImage, class TBoundaryCondition = ZeroFluxNeumannBoundaryCondition<TImage>>
typedef OffsetType::OffsetValueType itk::NeighborhoodIterator< TImage, TBoundaryCondition >::OffsetValueType

Reimplemented from itk::ConstNeighborhoodIterator< TImage, TBoundaryCondition >.

Reimplemented in itk::ConstShapedNeighborhoodIterator< TImage, TBoundaryCondition >, and itk::ShapedNeighborhoodIterator< TImage, TBoundaryCondition >.

Definition at line 228 of file itkNeighborhoodIterator.h.

template<class TImage, class TBoundaryCondition = ZeroFluxNeumannBoundaryCondition<TImage>>
typedef Superclass::PixelType itk::NeighborhoodIterator< TImage, TBoundaryCondition >::PixelType

External support for pixel type.

Reimplemented from itk::ConstNeighborhoodIterator< TImage, TBoundaryCondition >.

Reimplemented in itk::ConstShapedNeighborhoodIterator< TImage, TBoundaryCondition >, and itk::ShapedNeighborhoodIterator< TImage, TBoundaryCondition >.

Definition at line 222 of file itkNeighborhoodIterator.h.

template<class TImage, class TBoundaryCondition = ZeroFluxNeumannBoundaryCondition<TImage>>
typedef Superclass::RadiusType itk::NeighborhoodIterator< TImage, TBoundaryCondition >::RadiusType

Radius typedef support.

Reimplemented from itk::ConstNeighborhoodIterator< TImage, TBoundaryCondition >.

Reimplemented in itk::ConstShapedNeighborhoodIterator< TImage, TBoundaryCondition >, and itk::ShapedNeighborhoodIterator< TImage, TBoundaryCondition >.

Definition at line 229 of file itkNeighborhoodIterator.h.

template<class TImage, class TBoundaryCondition = ZeroFluxNeumannBoundaryCondition<TImage>>
typedef Superclass::RegionType itk::NeighborhoodIterator< TImage, TBoundaryCondition >::RegionType

Typedef support for common objects

Reimplemented from itk::ConstNeighborhoodIterator< TImage, TBoundaryCondition >.

Reimplemented in itk::ConstShapedNeighborhoodIterator< TImage, TBoundaryCondition >, and itk::ShapedNeighborhoodIterator< TImage, TBoundaryCondition >.

Definition at line 225 of file itkNeighborhoodIterator.h.

template<class TImage, class TBoundaryCondition = ZeroFluxNeumannBoundaryCondition<TImage>>
typedef NeighborhoodIterator itk::NeighborhoodIterator< TImage, TBoundaryCondition >::Self

Standard class typedefs.

Reimplemented from itk::ConstNeighborhoodIterator< TImage, TBoundaryCondition >.

Reimplemented in itk::ConstShapedNeighborhoodIterator< TImage, TBoundaryCondition >, and itk::ShapedNeighborhoodIterator< TImage, TBoundaryCondition >.

Definition at line 217 of file itkNeighborhoodIterator.h.

template<class TImage, class TBoundaryCondition = ZeroFluxNeumannBoundaryCondition<TImage>>
typedef Superclass::SizeType itk::NeighborhoodIterator< TImage, TBoundaryCondition >::SizeType

Size and value typedef support.

Reimplemented from itk::ConstNeighborhoodIterator< TImage, TBoundaryCondition >.

Reimplemented in itk::ConstShapedNeighborhoodIterator< TImage, TBoundaryCondition >, and itk::ShapedNeighborhoodIterator< TImage, TBoundaryCondition >.

Definition at line 223 of file itkNeighborhoodIterator.h.

template<class TImage, class TBoundaryCondition = ZeroFluxNeumannBoundaryCondition<TImage>>
typedef Superclass::SizeValueType itk::ConstNeighborhoodIterator< TImage, TBoundaryCondition >::SizeValueType [inherited]

Reimplemented from itk::Neighborhood< TImage::InternalPixelType *,::itk::GetImageDimension< TImage >::ImageDimension >.

Reimplemented in itk::ConstShapedNeighborhoodIterator< TImage, TBoundaryCondition >, and itk::ShapedNeighborhoodIterator< TImage, TBoundaryCondition >.

Definition at line 74 of file itkConstNeighborhoodIterator.h.

typedef SliceIterator<TImage::InternalPixelType * , Self> itk::Neighborhood< TImage::InternalPixelType * , VDimension, NeighborhoodAllocator<TImage::InternalPixelType * > >::SliceIteratorType [inherited]

External slice iterator type typedef support.

Definition at line 86 of file itkNeighborhood.h.

template<class TImage, class TBoundaryCondition = ZeroFluxNeumannBoundaryCondition<TImage>>
typedef ConstNeighborhoodIterator<TImage,TBoundaryCondition> itk::NeighborhoodIterator< TImage, TBoundaryCondition >::Superclass

Reimplemented from itk::ConstNeighborhoodIterator< TImage, TBoundaryCondition >.

Reimplemented in itk::ConstShapedNeighborhoodIterator< TImage, TBoundaryCondition >, and itk::ShapedNeighborhoodIterator< TImage, TBoundaryCondition >.

Definition at line 218 of file itkNeighborhoodIterator.h.


Constructor & Destructor Documentation

template<class TImage, class TBoundaryCondition = ZeroFluxNeumannBoundaryCondition<TImage>>
itk::NeighborhoodIterator< TImage, TBoundaryCondition >::NeighborhoodIterator (  )  [inline]

Default constructor.

Definition at line 237 of file itkNeighborhoodIterator.h.

template<class TImage, class TBoundaryCondition = ZeroFluxNeumannBoundaryCondition<TImage>>
itk::NeighborhoodIterator< TImage, TBoundaryCondition >::NeighborhoodIterator ( const NeighborhoodIterator< TImage, TBoundaryCondition > &  n  )  [inline]

Copy constructor

Definition at line 240 of file itkNeighborhoodIterator.h.

template<class TImage, class TBoundaryCondition = ZeroFluxNeumannBoundaryCondition<TImage>>
itk::NeighborhoodIterator< TImage, TBoundaryCondition >::NeighborhoodIterator ( const SizeType radius,
ImageType ptr,
const RegionType region 
) [inline]

Constructor which establishes the region size, neighborhood, and image over which to walk.

Definition at line 253 of file itkNeighborhoodIterator.h.


Member Function Documentation

virtual void itk::Neighborhood< TImage::InternalPixelType * , VDimension, NeighborhoodAllocator<TImage::InternalPixelType * > >::Allocate ( unsigned int  i  )  [inline, protected, virtual, inherited]

Allocates the neighborhood's memory buffer.

Definition at line 228 of file itkNeighborhood.h.

ConstIterator itk::Neighborhood< TImage::InternalPixelType * , VDimension, NeighborhoodAllocator<TImage::InternalPixelType * > >::Begin ( void   )  const [inline, inherited]

Reimplemented in itk::ConstShapedNeighborhoodIterator< TImage, TBoundaryCondition >.

Definition at line 148 of file itkNeighborhood.h.

Iterator itk::Neighborhood< TImage::InternalPixelType * , VDimension, NeighborhoodAllocator<TImage::InternalPixelType * > >::Begin ( void   )  [inline, inherited]

Reimplemented in itk::ShapedNeighborhoodIterator< TImage, TBoundaryCondition >.

Definition at line 144 of file itkNeighborhood.h.

template<class TImage, class TBoundaryCondition = ZeroFluxNeumannBoundaryCondition<TImage>>
OffsetType itk::ConstNeighborhoodIterator< TImage, TBoundaryCondition >::ComputeInternalIndex ( unsigned int  n  )  const [inherited]

Computes the internal, N-d offset of a pixel array position n from (0,0, ..., 0) in the "upper-left" corner of the neighborhood.

virtual void itk::Neighborhood< TImage::InternalPixelType * , VDimension, NeighborhoodAllocator<TImage::InternalPixelType * > >::ComputeNeighborhoodOffsetTable (  )  [protected, virtual, inherited]

Fills entries into the offset lookup table. Called once on initialization.

virtual void itk::Neighborhood< TImage::InternalPixelType * , VDimension, NeighborhoodAllocator<TImage::InternalPixelType * > >::ComputeNeighborhoodStrideTable (  )  [protected, virtual, inherited]

Computes the entries for the stride table

ConstIterator itk::Neighborhood< TImage::InternalPixelType * , VDimension, NeighborhoodAllocator<TImage::InternalPixelType * > >::End ( void   )  const [inline, inherited]

Reimplemented in itk::ConstShapedNeighborhoodIterator< TImage, TBoundaryCondition >, and itk::ShapedNeighborhoodIterator< TImage, TBoundaryCondition >.

Definition at line 146 of file itkNeighborhood.h.

Iterator itk::Neighborhood< TImage::InternalPixelType * , VDimension, NeighborhoodAllocator<TImage::InternalPixelType * > >::End ( void   )  [inline, inherited]

STL-style iterator support.

Reimplemented in itk::ShapedNeighborhoodIterator< TImage, TBoundaryCondition >.

Definition at line 142 of file itkNeighborhood.h.

template<class TImage, class TBoundaryCondition = ZeroFluxNeumannBoundaryCondition<TImage>>
IndexType itk::ConstNeighborhoodIterator< TImage, TBoundaryCondition >::GetBeginIndex (  )  const [inline, inherited]

Returns the N-dimensional starting index of the iterator's position on the image.

Definition at line 247 of file itkConstNeighborhoodIterator.h.

template<class TImage, class TBoundaryCondition = ZeroFluxNeumannBoundaryCondition<TImage>>
long itk::ConstNeighborhoodIterator< TImage, TBoundaryCondition >::GetBound ( unsigned int  n  )  const [inline, inherited]

Returns the loop bound used to define the edge of a single dimension in the itk::Image region.

Definition at line 141 of file itkConstNeighborhoodIterator.h.

template<class TImage, class TBoundaryCondition = ZeroFluxNeumannBoundaryCondition<TImage>>
IndexType itk::ConstNeighborhoodIterator< TImage, TBoundaryCondition >::GetBound (  )  const [inline, inherited]

Returns the array of upper loop bounds used during iteration.

Definition at line 136 of file itkConstNeighborhoodIterator.h.

template<class TImage, class TBoundaryCondition = ZeroFluxNeumannBoundaryCondition<TImage>>
const BoundaryConditionType* itk::ConstNeighborhoodIterator< TImage, TBoundaryCondition >::GetBoundaryCondition (  )  const [inline, inherited]

Definition at line 402 of file itkConstNeighborhoodIterator.h.

template<class TImage, class TBoundaryCondition = ZeroFluxNeumannBoundaryCondition<TImage>>
RegionType itk::ConstNeighborhoodIterator< TImage, TBoundaryCondition >::GetBoundingBoxAsImageRegion (  )  const [inherited]

Returns a bounding box for the region spanned by this neighborhood represented by an itk::ImageRegion

const AllocatorType& itk::Neighborhood< TImage::InternalPixelType * , VDimension, NeighborhoodAllocator<TImage::InternalPixelType * > >::GetBufferReference (  )  const [inline, inherited]

Definition at line 195 of file itkNeighborhood.h.

AllocatorType& itk::Neighborhood< TImage::InternalPixelType * , VDimension, NeighborhoodAllocator<TImage::InternalPixelType * > >::GetBufferReference (  )  [inline, inherited]

Returns a reference to the data buffer structure.

Definition at line 193 of file itkNeighborhood.h.

unsigned int itk::Neighborhood< TImage::InternalPixelType * , VDimension, NeighborhoodAllocator<TImage::InternalPixelType * > >::GetCenterNeighborhoodIndex (  )  const [inline, inherited]

Definition at line 213 of file itkNeighborhood.h.

template<class TImage, class TBoundaryCondition = ZeroFluxNeumannBoundaryCondition<TImage>>
PixelType itk::ConstNeighborhoodIterator< TImage, TBoundaryCondition >::GetCenterPixel (  )  const [inline, inherited]

Returns the pixel referenced at the center of the ConstNeighborhoodIterator.

Definition at line 150 of file itkConstNeighborhoodIterator.h.

template<class TImage, class TBoundaryCondition = ZeroFluxNeumannBoundaryCondition<TImage>>
const InternalPixelType* itk::ConstNeighborhoodIterator< TImage, TBoundaryCondition >::GetCenterPointer (  )  const [inline, inherited]

Returns the pointer to the center pixel of the neighborhood.

Definition at line 145 of file itkConstNeighborhoodIterator.h.

Referenced by itk::ConstNeighborhoodIterator< TImage, TBoundaryCondition >::operator!=(), itk::ConstNeighborhoodIterator< TImage, TBoundaryCondition >::operator<(), itk::ConstNeighborhoodIterator< TImage, TBoundaryCondition >::operator<=(), itk::ConstNeighborhoodIterator< TImage, TBoundaryCondition >::operator==(), itk::ConstNeighborhoodIterator< TImage, TBoundaryCondition >::operator>(), and itk::ConstNeighborhoodIterator< TImage, TBoundaryCondition >::operator>=().

template<class TImage, class TBoundaryCondition = ZeroFluxNeumannBoundaryCondition<TImage>>
InternalPixelType* itk::NeighborhoodIterator< TImage, TBoundaryCondition >::GetCenterPointer (  )  [inline]

Returns the central memory pointer of the neighborhood.

Definition at line 261 of file itkNeighborhoodIterator.h.

TImage::InternalPixelType * itk::Neighborhood< TImage::InternalPixelType * , VDimension, NeighborhoodAllocator<TImage::InternalPixelType * > >::GetCenterValue (  )  const [inline, inherited]

Returns the element at the center of the neighborhood.

Definition at line 166 of file itkNeighborhood.h.

TImage::InternalPixelType * & itk::Neighborhood< TImage::InternalPixelType * , VDimension, NeighborhoodAllocator<TImage::InternalPixelType * > >::GetElement ( unsigned int  i  )  [inline, inherited]

Definition at line 161 of file itkNeighborhood.h.

template<class TImage, class TBoundaryCondition = ZeroFluxNeumannBoundaryCondition<TImage>>
const ImageType* itk::ConstNeighborhoodIterator< TImage, TBoundaryCondition >::GetImagePointer ( void   )  const [inline, inherited]

Returns a smartpointer to the image on which this iterator operates.

Definition at line 154 of file itkConstNeighborhoodIterator.h.

template<class TImage, class TBoundaryCondition = ZeroFluxNeumannBoundaryCondition<TImage>>
virtual IndexType itk::ConstNeighborhoodIterator< TImage, TBoundaryCondition >::GetIndex