ITK
4.13.0
Insight Segmentation and Registration Toolkit
|
#include <itkPathConstIterator.h>
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 indices 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 indices are coincident. When starting and ending indices 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.
Definition at line 75 of file itkPathConstIterator.h.
Public Types | |
typedef TImage::AccessorType | AccessorType |
typedef TImage | ImageType |
typedef TImage::IndexType | IndexType |
typedef TImage::InternalPixelType | InternalPixelType |
typedef TImage::OffsetType | OffsetType |
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::SpacingType | SpacingType |
Public Member Functions | |
const PixelType & | Get (void) const |
const IndexType | GetIndex () |
const PathInputType | GetPathPosition () |
void | GoToBegin () |
bool | IsAtEnd () |
itkTypeMacroNoParent (PathConstIterator) | |
void | operator++ () |
Self & | operator= (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 () |
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 SizeValueType * | m_ImageSize |
SpacingType | m_ImageSpacing |
bool | m_IsAtEnd |
PathType::ConstPointer | m_Path |
RegionType | m_Region |
bool | m_VisitStartIndexAsLastIndexIfClosed |
OffsetType | m_ZeroOffset |
typedef TImage::AccessorType itk::PathConstIterator< TImage, TPath >::AccessorType |
Accessor type that convert data between internal and external representations.
Definition at line 124 of file itkPathConstIterator.h.
typedef TImage itk::PathConstIterator< TImage, TPath >::ImageType |
Image typedef support.
Definition at line 108 of file itkPathConstIterator.h.
typedef TImage::IndexType itk::PathConstIterator< TImage, TPath >::IndexType |
Index typedef support.
Definition at line 90 of file itkPathConstIterator.h.
typedef TImage::InternalPixelType itk::PathConstIterator< TImage, TPath >::InternalPixelType |
Internal Pixel Type
Definition at line 117 of file itkPathConstIterator.h.
typedef TImage::OffsetType itk::PathConstIterator< TImage, TPath >::OffsetType |
Offset typedef support.
Definition at line 93 of file itkPathConstIterator.h.
typedef PathType::InputType itk::PathConstIterator< TImage, TPath >::PathInputType |
Path 1D Input Type
Definition at line 130 of file itkPathConstIterator.h.
typedef PathType::OutputType itk::PathConstIterator< TImage, TPath >::PathOutputType |
Path ND Output Type, which is not necessarily an index type
Definition at line 133 of file itkPathConstIterator.h.
typedef TPath itk::PathConstIterator< TImage, TPath >::PathType |
Path typedef support
Definition at line 127 of file itkPathConstIterator.h.
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.
Definition at line 113 of file itkPathConstIterator.h.
typedef PixelContainer::Pointer itk::PathConstIterator< TImage, TPath >::PixelContainerPointer |
Definition at line 114 of file itkPathConstIterator.h.
typedef TImage::PixelType itk::PathConstIterator< TImage, TPath >::PixelType |
External Pixel Type
Definition at line 120 of file itkPathConstIterator.h.
typedef TImage::PointType itk::PathConstIterator< TImage, TPath >::PointType |
Origin typedef support
Definition at line 105 of file itkPathConstIterator.h.
typedef TImage::RegionType itk::PathConstIterator< TImage, TPath >::RegionType |
Region typedef support
Definition at line 99 of file itkPathConstIterator.h.
typedef PathConstIterator itk::PathConstIterator< TImage, TPath >::Self |
Standard class typedefs.
Definition at line 80 of file itkPathConstIterator.h.
typedef TImage::SizeType itk::PathConstIterator< TImage, TPath >::SizeType |
Size typedef support.
Definition at line 96 of file itkPathConstIterator.h.
typedef TImage::SpacingType itk::PathConstIterator< TImage, TPath >::SpacingType |
Spacing typedef support
Definition at line 102 of file itkPathConstIterator.h.
itk::PathConstIterator< TImage, TPath >::PathConstIterator | ( | const ImageType * | imagePtr, |
const PathType * | pathPtr | ||
) |
Constructor establishes an iterator to walk along a path
|
inlinevirtual |
Default Destructor.
Definition at line 197 of file itkPathConstIterator.h.
|
inline |
Get the pixel value
Definition at line 157 of file itkPathConstIterator.h.
|
inlinestatic |
Get the dimension (size) of the index.
Definition at line 139 of file itkPathConstIterator.h.
|
inline |
Get the index. This provides a read only reference to the index.
Definition at line 151 of file itkPathConstIterator.h.
|
inline |
Get the input. This provides a read only reference to the input.
Definition at line 145 of file itkPathConstIterator.h.
void itk::PathConstIterator< TImage, TPath >::GoToBegin | ( | ) |
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.
|
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 165 of file itkPathConstIterator.h.
itk::PathConstIterator< TImage, TPath >::itkTypeMacroNoParent | ( | PathConstIterator< TImage, TPath > | ) |
Run-time type information (and related methods).
void itk::PathConstIterator< TImage, TPath >::operator++ | ( | ) |
Walk forward along the path to the next index in the image.
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.
|
inlinevirtual |
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 174 of file itkPathConstIterator.h.
|
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 87 of file itkPathConstIterator.h.
|
protected |
Current ND index position in the image of the path
Definition at line 234 of file itkPathConstIterator.h.
|
protected |
Current 1D position along the path, such as time or arc length
Definition at line 231 of file itkPathConstIterator.h.
|
protected |
Smart pointer to the source image.
Definition at line 204 of file itkPathConstIterator.h.
|
protected |
The origin of the source image
Definition at line 213 of file itkPathConstIterator.h.
|
protected |
Size of the source image
Definition at line 219 of file itkPathConstIterator.h.
|
protected |
The spacing of the source image
Definition at line 216 of file itkPathConstIterator.h.
|
protected |
Is the iterator at the end of its walk?
Definition at line 228 of file itkPathConstIterator.h.
|
protected |
Smart pointer to the path we're following
Definition at line 207 of file itkPathConstIterator.h.
|
protected |
Region type to iterate over.
Definition at line 210 of file itkPathConstIterator.h.
|
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 225 of file itkPathConstIterator.h.
|
protected |
Definition at line 201 of file itkPathConstIterator.h.