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

itk::PathConstIterator< TImage, TPath > Class Template Reference
[Path Representation ObjectsImage Iterators]

#include <itkPathConstIterator.h>

Inheritance diagram for itk::PathConstIterator< TImage, TPath >:

Inheritance graph
[legend]
List of all members.

Detailed Description

template<class TImage, class TPath>
class itk::PathConstIterator< TImage, TPath >

PathConstIterator iterates (traces) over a path through an image.

This iterator visits only those indices of the image that are overlapped by a specified 1D path. All indicies are visited in path order. If a path crosses itself at an index, that index of the image will be visited twice. An exception to this rule is that if the path is closed, i.e. its starting and ending indicies are coincident. When starting and ending indicies are coincident, GoToBegin() will go to the second index, since the "first" index will be visited later as the "last" index. This is so that paths (especially parametric paths) can be properly closed, without double-visiting the starting/ending point. This behavior can be overridden by calling VisitStartIndexAsLastIndexIfClosed(false) before calling GoToBegin(). This class is the const version of the PathIterator, and for this reason it doesn't support the Set() method.

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

PathIterator

ShapedNeighborhoodIterator

SliceIterator

ImageConstIteratorWithIndex

Definition at line 73 of file itkPathConstIterator.h.

Public Types

typedef TImage::AccessorType AccessorType
typedef TImage ImageType
typedef TImage::IndexType IndexType
typedef TImage::IndexValueType IndexValueType
typedef TImage::InternalPixelType InternalPixelType
typedef TImage::OffsetType OffsetType
typedef TImage::OffsetValueType OffsetValueType
typedef PathType::InputType PathInputType
typedef PathType::OutputType PathOutputType
typedef TPath PathType
typedef TImage::PixelContainer PixelContainer
typedef PixelContainer::Pointer PixelContainerPointer
typedef TImage::PixelType PixelType
typedef TImage::PointType PointType
typedef TImage::RegionType RegionType
typedef PathConstIterator Self
typedef TImage::SizeType SizeType
typedef TImage::SizeValueType SizeValueType
typedef TImage::SpacingType SpacingType

Public Member Functions

const PixelTypeGet (void) const
const IndexType GetIndex ()
virtual const char * GetNameOfClass () const
const PathInputType GetPathPosition ()
void GoToBegin ()
bool IsAtEnd ()
 itkStaticConstMacro (ImageIteratorDimension, unsigned int, TImage::ImageDimension)
void operator++ ()
Selfoperator= (const Self &it)
 PathConstIterator (const ImageType *imagePtr, const PathType *pathPtr)
virtual void VisitStartIndexAsLastIndexIfClosed (bool flag)
virtual ~PathConstIterator ()

Static Public Member Functions

static unsigned int GetImageIteratorDimension ()

Protected Attributes

IndexType m_CurrentImageIndex
PathInputType m_CurrentPathPosition
ImageType::ConstWeakPointer m_Image
PointType m_ImageOrigin
const unsigned long int * m_ImageSize
SpacingType m_ImageSpacing
bool m_IsAtEnd
PathType::ConstPointer m_Path
RegionType m_Region
bool m_VisitStartIndexAsLastIndexIfClosed
OffsetType m_ZeroOffset


Member Typedef Documentation

template<class TImage, class TPath>
typedef TImage::AccessorType itk::PathConstIterator< TImage, TPath >::AccessorType

Accessor type that convert data between internal and external representations.

Reimplemented in itk::PathIterator< TImage, TPath >.

Definition at line 125 of file itkPathConstIterator.h.

template<class TImage, class TPath>
typedef TImage itk::PathConstIterator< TImage, TPath >::ImageType

Image typedef support.

Reimplemented in itk::PathIterator< TImage, TPath >.

Definition at line 109 of file itkPathConstIterator.h.

template<class TImage, class TPath>
typedef TImage::IndexType itk::PathConstIterator< TImage, TPath >::IndexType

Index typedef support.

Reimplemented in itk::PathIterator< TImage, TPath >.

Definition at line 88 of file itkPathConstIterator.h.

template<class TImage, class TPath>
typedef TImage::IndexValueType itk::PathConstIterator< TImage, TPath >::IndexValueType

Reimplemented in itk::PathIterator< TImage, TPath >.

Definition at line 89 of file itkPathConstIterator.h.

template<class TImage, class TPath>
typedef TImage::InternalPixelType itk::PathConstIterator< TImage, TPath >::InternalPixelType

Internal Pixel Type

Reimplemented in itk::PathIterator< TImage, TPath >.

Definition at line 118 of file itkPathConstIterator.h.

template<class TImage, class TPath>
typedef TImage::OffsetType itk::PathConstIterator< TImage, TPath >::OffsetType

Offset typedef support.

Reimplemented in itk::PathIterator< TImage, TPath >.

Definition at line 92 of file itkPathConstIterator.h.

template<class TImage, class TPath>
typedef TImage::OffsetValueType itk::PathConstIterator< TImage, TPath >::OffsetValueType

Reimplemented in itk::PathIterator< TImage, TPath >.

Definition at line 93 of file itkPathConstIterator.h.

template<class TImage, class TPath>
typedef PathType::InputType itk::PathConstIterator< TImage, TPath >::PathInputType

Path 1D Input Type

Reimplemented in itk::PathIterator< TImage, TPath >.

Definition at line 131 of file itkPathConstIterator.h.

template<class TImage, class TPath>
typedef PathType::OutputType itk::PathConstIterator< TImage, TPath >::PathOutputType

Path ND Output Type, which is not necessarily an index type

Reimplemented in itk::PathIterator< TImage, TPath >.

Definition at line 134 of file itkPathConstIterator.h.

template<class TImage, class TPath>
typedef TPath itk::PathConstIterator< TImage, TPath >::PathType

Path typedef support

Reimplemented in itk::PathIterator< TImage, TPath >.

Definition at line 128 of file itkPathConstIterator.h.

template<class TImage, class TPath>
typedef TImage::PixelContainer itk::PathConstIterator< TImage, TPath >::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::PathIterator< TImage, TPath >.

Definition at line 114 of file itkPathConstIterator.h.

template<class TImage, class TPath>
typedef PixelContainer::Pointer itk::PathConstIterator< TImage, TPath >::PixelContainerPointer

Reimplemented in itk::PathIterator< TImage, TPath >.

Definition at line 115 of file itkPathConstIterator.h.

template<class TImage, class TPath>
typedef TImage::PixelType itk::PathConstIterator< TImage, TPath >::PixelType

External Pixel Type

Reimplemented in itk::PathIterator< TImage, TPath >.

Definition at line 121 of file itkPathConstIterator.h.

template<class TImage, class TPath>
typedef TImage::PointType itk::PathConstIterator< TImage, TPath >::PointType

Origin typedef support

Definition at line 106 of file itkPathConstIterator.h.

template<class TImage, class TPath>
typedef TImage::RegionType itk::PathConstIterator< TImage, TPath >::RegionType

Region typedef support

Reimplemented in itk::PathIterator< TImage, TPath >.

Definition at line 100 of file itkPathConstIterator.h.

template<class TImage, class TPath>
typedef PathConstIterator itk::PathConstIterator< TImage, TPath >::Self

Standard class typedefs.

Reimplemented in itk::PathIterator< TImage, TPath >.

Definition at line 78 of file itkPathConstIterator.h.

template<class TImage, class TPath>
typedef TImage::SizeType itk::PathConstIterator< TImage, TPath >::SizeType

Size typedef support.

Reimplemented in itk::PathIterator< TImage, TPath >.

Definition at line 96 of file itkPathConstIterator.h.

template<class TImage, class TPath>
typedef TImage::SizeValueType itk::PathConstIterator< TImage, TPath >::SizeValueType

Reimplemented in itk::PathIterator< TImage, TPath >.

Definition at line 97 of file itkPathConstIterator.h.

template<class TImage, class TPath>
typedef TImage::SpacingType itk::PathConstIterator< TImage, TPath >::SpacingType

Spacing typedef support

Definition at line 103 of file itkPathConstIterator.h.


Constructor & Destructor Documentation

template<class TImage, class TPath>
itk::PathConstIterator< TImage, TPath >::PathConstIterator ( const ImageType imagePtr,
const PathType pathPtr 
)

Constructor establishes an iterator to walk along a path

template<class TImage, class TPath>
virtual itk::PathConstIterator< TImage, TPath >::~PathConstIterator (  )  [inline, virtual]

Default Destructor.

Definition at line 198 of file itkPathConstIterator.h.


Member Function Documentation

template<class TImage, class TPath>
const PixelType& itk::PathConstIterator< TImage, TPath >::Get ( void   )  const [inline]

Get the pixel value

Definition at line 158 of file itkPathConstIterator.h.

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

Get the dimension (size) of the index.

Definition at line 140 of file itkPathConstIterator.h.

template<class TImage, class TPath>
const IndexType itk::PathConstIterator< TImage, TPath >::GetIndex ( void   )  [inline]

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

Definition at line 152 of file itkPathConstIterator.h.

template<class TImage, class TPath>
virtual const char* itk::PathConstIterator< TImage, TPath >::GetNameOfClass (  )  const [virtual]

Run-time type information (and related methods).

Reimplemented in itk::PathIterator< TImage, TPath >.

template<class TImage, class TPath>
const PathInputType itk::PathConstIterator< TImage, TPath >::GetPathPosition (  )  [inline]

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

Definition at line 146 of file itkPathConstIterator.h.

template<class TImage, class TPath>
void itk::PathConstIterator< TImage, TPath >::GoToBegin (  ) 

Move an iterator to the beginning of the path. If the starting and ending indicies of the path are coincident, then move to the 2'nd index of the path, since the 1'st index will be visited later as the last index. However, if m_VisitStartIndexAsLastIndexIfClosed is false, then GoToBegin() will always move to the 1'st index.

template<class TImage, class TPath>
bool itk::PathConstIterator< TImage, TPath >::IsAtEnd ( void   )  [inline]

Is the iterator at the end of the path? Note that for a closed path, it may be possible to increment back to the start of the path.

Definition at line 166 of file itkPathConstIterator.h.

template<class TImage, class TPath>
itk::PathConstIterator< TImage, TPath >::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::PathIterator< TImage, TPath >.

template<class TImage, class TPath>
void itk::PathConstIterator< TImage, TPath >::operator++ (  ) 

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

template<class TImage, class TPath>
Self& itk::PathConstIterator< TImage, TPath >::operator= ( const Self it  ) 

operator= is provided to make sure the handles to the image and path are properly reference counted.

Reimplemented in itk::PathIterator< TImage, TPath >.

template<class TImage, class TPath>
virtual void itk::PathConstIterator< TImage, TPath >::VisitStartIndexAsLastIndexIfClosed ( bool  flag  )  [inline, virtual]

Should GoToBegin() initially skip the first index of a closed path so that the first index will only be visited once--at the end of the path? If set to false, then GoToBegin() will always move to the 1'st index. The constructor presets m_VisitStartIndexAsLastIndexIfClosed to true.

Definition at line 175 of file itkPathConstIterator.h.


Member Data Documentation

template<class TImage, class TPath>
IndexType itk::PathConstIterator< TImage, TPath >::m_CurrentImageIndex [protected]

Current ND index position in the image of the path

Definition at line 235 of file itkPathConstIterator.h.

template<class TImage, class TPath>
PathInputType itk::PathConstIterator< TImage, TPath >::m_CurrentPathPosition [protected]

Current 1D position along the path, such as time or arc length

Definition at line 232 of file itkPathConstIterator.h.

template<class TImage, class TPath>
ImageType::ConstWeakPointer itk::PathConstIterator< TImage, TPath >::m_Image [protected]

Smart pointer to the source image.

Definition at line 205 of file itkPathConstIterator.h.

template<class TImage, class TPath>
PointType itk::PathConstIterator< TImage, TPath >::m_ImageOrigin [protected]

The origin of the source image

Definition at line 214 of file itkPathConstIterator.h.

template<class TImage, class TPath>
const unsigned long int* itk::PathConstIterator< TImage, TPath >::m_ImageSize [protected]

Size of the source image

Definition at line 220 of file itkPathConstIterator.h.

template<class TImage, class TPath>
SpacingType itk::PathConstIterator< TImage, TPath >::m_ImageSpacing [protected]

The spacing of the source image

Definition at line 217 of file itkPathConstIterator.h.

template<class TImage, class TPath>
bool itk::PathConstIterator< TImage, TPath >::m_IsAtEnd [protected]

Is the iterator at the end of its walk?

Definition at line 229 of file itkPathConstIterator.h.

template<class TImage, class TPath>
PathType::ConstPointer itk::PathConstIterator< TImage, TPath >::m_Path [protected]

Smart pointer to the path we're following

Definition at line 208 of file itkPathConstIterator.h.

template<class TImage, class TPath>
RegionType itk::PathConstIterator< TImage, TPath >::m_Region [protected]

Region type to iterate over.

Definition at line 211 of file itkPathConstIterator.h.

template<class TImage, class TPath>
bool itk::PathConstIterator< TImage, TPath >::m_VisitStartIndexAsLastIndexIfClosed [protected]

Should GoToBegin() initially skip the first index of a closed path so that the first index will only be visited once--at the end of the path? If false, then GoToBegin() will always move to the 1'st index. The default value is true, which is set the constructor.

Definition at line 226 of file itkPathConstIterator.h.

template<class TImage, class TPath>
OffsetType itk::PathConstIterator< TImage, TPath >::m_ZeroOffset [protected]

Definition at line 198 of file itkPathConstIterator.h.


The documentation for this class was generated from the following file:
Generated at Wed Jul 30 08:24:54 2008 for ITK by doxygen 1.5.1 written by Dimitri van Heesch, © 1997-2000