Orfeo Toolbox  4.2
Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Attributes | List of all members
itk::PathIterator< TImage, TPath > Class Template Reference

PathIterator iterates (traces) over a path through an image. More...

#include <itkPathIterator.h>

+ Inheritance diagram for itk::PathIterator< TImage, TPath >:
+ Collaboration diagram for itk::PathIterator< TImage, TPath >:

Public Types

typedef Superclass::AccessorType AccessorType
 
typedef Superclass::ImageType ImageType
 
typedef Superclass::IndexType IndexType
 
typedef
Superclass::InternalPixelType 
InternalPixelType
 
typedef Superclass::OffsetType OffsetType
 
typedef Superclass::PathInputType PathInputType
 
typedef Superclass::PathOutputType PathOutputType
 
typedef Superclass::PathType PathType
 
typedef Superclass::PixelContainer PixelContainer
 
typedef
Superclass::PixelContainerPointer 
PixelContainerPointer
 
typedef Superclass::PixelType PixelType
 
typedef TImage::PointType PointType
 
typedef TImage::RegionType RegionType
 
typedef PathIterator Self
 
typedef Superclass::SizeType SizeType
 
typedef TImage::SpacingType SpacingType
 
typedef PathConstIterator
< TImage, TPath > 
Superclass
 

Public Member Functions

 PathIterator (ImageType *imagePtr, const PathType *pathPtr)
 
virtual ~PathIterator ()
 
const PixelTypeGet (void) const
 
const IndexType GetIndex ()
 
virtual const char * GetNameOfClass () const
 
const PathInputType GetPathPosition ()
 
void GoToBegin ()
 
bool IsAtEnd ()
 
void operator++ ()
 
Selfoperator= (const Self &it)
 
void Set (const PixelType &value)
 
PixelTypeValue (void)
 
virtual void VisitStartIndexAsLastIndexIfClosed (bool flag)
 

Static Public Member Functions

static unsigned int GetImageIteratorDimension ()
 

Static Public Attributes

static const unsigned int ImageIteratorDimension = TImage::ImageDimension
 

Protected Attributes

IndexType m_CurrentImageIndex
 
PathInputType m_CurrentPathPosition
 
ImageType::ConstWeakPointer m_Image
 
PointType m_ImageOrigin
 
const SizeValueTypem_ImageSize
 
SpacingType m_ImageSpacing
 
bool m_IsAtEnd
 
PathType::ConstPointer m_Path
 
RegionType m_Region
 
bool m_VisitStartIndexAsLastIndexIfClosed
 
OffsetType m_ZeroOffset
 

Detailed Description

template<typename TImage, typename TPath>
class itk::PathIterator< TImage, TPath >

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

This iterator visits only those indices of the image which are overlapped by the path. All indices are visited in path order. If a path crosses itself at an index, that index of the image will be visited twice. This class add write-access to the functionality of the PathConstIterator.

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
ShapedNeighborhoodIterator
SliceIterator
ImageConstIteratorWithIndex

Definition at line 68 of file itkPathIterator.h.

Member Typedef Documentation

template<typename TImage, typename TPath>
typedef Superclass::AccessorType itk::PathIterator< TImage, TPath >::AccessorType

Definition at line 93 of file itkPathIterator.h.

template<typename TImage, typename TPath>
typedef Superclass::ImageType itk::PathIterator< TImage, TPath >::ImageType

Definition at line 88 of file itkPathIterator.h.

template<typename TImage, typename TPath>
typedef Superclass::IndexType itk::PathIterator< TImage, TPath >::IndexType

Inherit types from the superclass

Definition at line 85 of file itkPathIterator.h.

template<typename TImage, typename TPath>
typedef Superclass::InternalPixelType itk::PathIterator< TImage, TPath >::InternalPixelType

Definition at line 91 of file itkPathIterator.h.

template<typename TImage, typename TPath>
typedef Superclass::OffsetType itk::PathIterator< TImage, TPath >::OffsetType

Definition at line 86 of file itkPathIterator.h.

template<typename TImage, typename TPath>
typedef Superclass::PathInputType itk::PathIterator< TImage, TPath >::PathInputType

Definition at line 95 of file itkPathIterator.h.

template<typename TImage, typename TPath>
typedef Superclass::PathOutputType itk::PathIterator< TImage, TPath >::PathOutputType

Definition at line 96 of file itkPathIterator.h.

template<typename TImage, typename TPath>
typedef Superclass::PathType itk::PathIterator< TImage, TPath >::PathType

Definition at line 94 of file itkPathIterator.h.

template<typename TImage, typename TPath>
typedef Superclass::PixelContainer itk::PathIterator< TImage, TPath >::PixelContainer

Definition at line 89 of file itkPathIterator.h.

template<typename TImage, typename TPath>
typedef Superclass::PixelContainerPointer itk::PathIterator< TImage, TPath >::PixelContainerPointer

Definition at line 90 of file itkPathIterator.h.

template<typename TImage, typename TPath>
typedef Superclass::PixelType itk::PathIterator< TImage, TPath >::PixelType

Definition at line 92 of file itkPathIterator.h.

template<typename TImage , typename TPath >
typedef TImage::PointType itk::PathConstIterator< TImage, TPath >::PointType
inherited

Origin typedef support

Definition at line 104 of file itkPathConstIterator.h.

template<typename TImage , typename TPath >
typedef TImage::RegionType itk::PathConstIterator< TImage, TPath >::RegionType
inherited

Region typedef support

Definition at line 98 of file itkPathConstIterator.h.

template<typename TImage, typename TPath>
typedef PathIterator itk::PathIterator< TImage, TPath >::Self

Standard class typedefs.

Definition at line 72 of file itkPathIterator.h.

template<typename TImage, typename TPath>
typedef Superclass::SizeType itk::PathIterator< TImage, TPath >::SizeType

Definition at line 87 of file itkPathIterator.h.

template<typename TImage , typename TPath >
typedef TImage::SpacingType itk::PathConstIterator< TImage, TPath >::SpacingType
inherited

Spacing typedef support

Definition at line 101 of file itkPathConstIterator.h.

template<typename TImage, typename TPath>
typedef PathConstIterator< TImage, TPath > itk::PathIterator< TImage, TPath >::Superclass

Define the superclass

Definition at line 82 of file itkPathIterator.h.

Constructor & Destructor Documentation

template<typename TImage , typename TPath >
itk::PathIterator< TImage, TPath >::PathIterator ( ImageType imagePtr,
const PathType pathPtr 
)

Constructor establishes an iterator to walk along a path

Definition at line 28 of file itkPathIterator.hxx.

template<typename TImage, typename TPath>
virtual itk::PathIterator< TImage, TPath >::~PathIterator ( )
inlinevirtual

Default Destructor.

Definition at line 128 of file itkPathIterator.h.

Member Function Documentation

template<typename TImage , typename TPath >
const PixelType& itk::PathConstIterator< TImage, TPath >::Get ( void  ) const
inlineinherited
template<typename TImage , typename TPath >
static unsigned int itk::PathConstIterator< TImage, TPath >::GetImageIteratorDimension ( )
inlinestaticinherited

Get the dimension (size) of the index.

Definition at line 138 of file itkPathConstIterator.h.

template<typename TImage , typename TPath >
const IndexType itk::PathConstIterator< TImage, TPath >::GetIndex ( void  )
inlineinherited

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

Definition at line 150 of file itkPathConstIterator.h.

References itk::PathConstIterator< TImage, TPath >::m_CurrentImageIndex.

template<typename TImage, typename TPath>
virtual const char* itk::PathIterator< TImage, TPath >::GetNameOfClass ( ) const
virtual

Run-time type information (and related methods).

Reimplemented from itk::PathConstIterator< TImage, TPath >.

template<typename TImage , typename TPath >
const PathInputType itk::PathConstIterator< TImage, TPath >::GetPathPosition ( )
inlineinherited

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

Definition at line 144 of file itkPathConstIterator.h.

References itk::PathConstIterator< TImage, TPath >::m_CurrentPathPosition.

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

Move an iterator to the beginning of the path. If the starting and ending indices 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.

Definition at line 68 of file itkPathConstIterator.hxx.

Referenced by itk::PathToImageFilter< TInputPath, TOutputImage >::GenerateData().

template<typename TImage , typename TPath >
bool itk::PathConstIterator< TImage, TPath >::IsAtEnd ( void  )
inlineinherited

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 164 of file itkPathConstIterator.h.

References itk::PathConstIterator< TImage, TPath >::m_IsAtEnd.

Referenced by itk::PathToImageFilter< TInputPath, TOutputImage >::GenerateData().

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

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

Definition at line 92 of file itkPathConstIterator.hxx.

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

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

Definition at line 35 of file itkPathIterator.hxx.

References itk::PathConstIterator< TImage, TPath >::operator=().

template<typename TImage, typename TPath>
void itk::PathIterator< TImage, TPath >::Set ( const PixelType value)
inline
template<typename TImage, typename TPath>
PixelType& itk::PathIterator< TImage, TPath >::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 115 of file itkPathIterator.h.

template<typename TImage , typename TPath >
virtual void itk::PathConstIterator< TImage, TPath >::VisitStartIndexAsLastIndexIfClosed ( bool  flag)
inlinevirtualinherited

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 173 of file itkPathConstIterator.h.

References itk::PathConstIterator< TImage, TPath >::m_VisitStartIndexAsLastIndexIfClosed.

Member Data Documentation

template<typename TImage, typename TPath>
const unsigned int itk::PathIterator< TImage, TPath >::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.

Definition at line 79 of file itkPathIterator.h.

template<typename TImage , typename TPath >
IndexType itk::PathConstIterator< TImage, TPath >::m_CurrentImageIndex
protectedinherited
template<typename TImage , typename TPath >
PathInputType itk::PathConstIterator< TImage, TPath >::m_CurrentPathPosition
protectedinherited

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

Definition at line 230 of file itkPathConstIterator.h.

Referenced by itk::PathConstIterator< TImage, TPath >::GetPathPosition(), and itk::PathConstIterator< TImage, TPath >::operator=().

template<typename TImage , typename TPath >
ImageType::ConstWeakPointer itk::PathConstIterator< TImage, TPath >::m_Image
protectedinherited
template<typename TImage , typename TPath >
PointType itk::PathConstIterator< TImage, TPath >::m_ImageOrigin
protectedinherited

The origin of the source image

Definition at line 212 of file itkPathConstIterator.h.

Referenced by itk::PathConstIterator< TImage, TPath >::operator=().

template<typename TImage , typename TPath >
const SizeValueType* itk::PathConstIterator< TImage, TPath >::m_ImageSize
protectedinherited

Size of the source image

Definition at line 218 of file itkPathConstIterator.h.

Referenced by itk::PathConstIterator< TImage, TPath >::operator=().

template<typename TImage , typename TPath >
SpacingType itk::PathConstIterator< TImage, TPath >::m_ImageSpacing
protectedinherited

The spacing of the source image

Definition at line 215 of file itkPathConstIterator.h.

Referenced by itk::PathConstIterator< TImage, TPath >::operator=().

template<typename TImage , typename TPath >
bool itk::PathConstIterator< TImage, TPath >::m_IsAtEnd
protectedinherited

Is the iterator at the end of its walk?

Definition at line 227 of file itkPathConstIterator.h.

Referenced by itk::PathConstIterator< TImage, TPath >::IsAtEnd().

template<typename TImage , typename TPath >
PathType::ConstPointer itk::PathConstIterator< TImage, TPath >::m_Path
protectedinherited

Smart pointer to the path we're following

Definition at line 206 of file itkPathConstIterator.h.

Referenced by itk::PathConstIterator< TImage, TPath >::operator=().

template<typename TImage , typename TPath >
RegionType itk::PathConstIterator< TImage, TPath >::m_Region
protectedinherited

Region type to iterate over.

Definition at line 209 of file itkPathConstIterator.h.

Referenced by itk::PathConstIterator< TImage, TPath >::operator=().

template<typename TImage , typename TPath >
bool itk::PathConstIterator< TImage, TPath >::m_VisitStartIndexAsLastIndexIfClosed
protectedinherited

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 224 of file itkPathConstIterator.h.

Referenced by itk::PathConstIterator< TImage, TPath >::operator=(), and itk::PathConstIterator< TImage, TPath >::VisitStartIndexAsLastIndexIfClosed().

template<typename TImage , typename TPath >
OffsetType itk::PathConstIterator< TImage, TPath >::m_ZeroOffset
protectedinherited

Definition at line 200 of file itkPathConstIterator.h.


The documentation for this class was generated from the following files:

Generated at Sat Aug 30 2014 17:46:54 for Orfeo Toolbox with doxygen 1.8.3.1