#include <itkShapedNeighborhoodIterator.h>
A neighborhood iterator which can take on an arbitrary shape.
where radius, image, and region are as described in NeighborhoodIterator.
Once a neighborhood location has been activated, iteration (operator++, operator--, operator+=, operator-=) will update the value at the active location. Note that values at inactive locations will NOT be valid if queried.
A second way to access active shaped neighborhood values is through a ShapedNeighborhoodIterator::Iterator or ConstShapedNeighborhoodIterator::ConstIterator. The following example demonstrates the use of these iterators.
You can also iterate backward through the neighborhood active list.
The Get() Set() syntax was chosen versus defining operator* for these iterators because lvalue vs. rvalue context information is needed to determine whether bounds checking must take place.
Definition at line 149 of file itkShapedNeighborhoodIterator.h.
Classes | |
struct | Iterator |
Static Public Attributes | |
static constexpr unsigned int | Dimension = TImage::ImageDimension |
![]() | |
static constexpr unsigned int | Dimension = TImage::ImageDimension |
Protected Attributes | |
friend | Superclass |
![]() | |
IndexListType | m_ActiveIndexList {} |
bool | m_CenterIsActive { false } |
Friends | |
struct | ConstIterator |
Additional Inherited Members | |
![]() | |
void | ActivateIndex (NeighborIndexType) |
void | DeactivateIndex (NeighborIndexType) |
void | SetCenterPixel (const PixelType &p) |
void | SetPixel (const OffsetType o, const PixelType &v) |
void | SetPixel (const unsigned int n, const PixelType &v) |
void | SetPixel (const unsigned int n, const PixelType &v, bool &status) |
using itk::ShapedNeighborhoodIterator< TImage, TBoundaryCondition >::InternalPixelType = typename TImage::InternalPixelType |
Extract image type information.
Definition at line 154 of file itkShapedNeighborhoodIterator.h.
using itk::ShapedNeighborhoodIterator< TImage, TBoundaryCondition >::OffsetValueType = typename OffsetType::OffsetValueType |
Definition at line 166 of file itkShapedNeighborhoodIterator.h.
using itk::ShapedNeighborhoodIterator< TImage, TBoundaryCondition >::PixelType = typename TImage::PixelType |
Definition at line 155 of file itkShapedNeighborhoodIterator.h.
using itk::ShapedNeighborhoodIterator< TImage, TBoundaryCondition >::Self = ShapedNeighborhoodIterator |
Standard class type aliases.
Definition at line 161 of file itkShapedNeighborhoodIterator.h.
using itk::ShapedNeighborhoodIterator< TImage, TBoundaryCondition >::Superclass = ConstShapedNeighborhoodIterator<TImage, TBoundaryCondition> |
Definition at line 162 of file itkShapedNeighborhoodIterator.h.
|
default |
Default constructor
|
overridedefault |
Virtual destructor
|
delete |
Copy constructor
|
inline |
Constructor which establishes the region size, neighborhood, and image over which to walk.
Definition at line 222 of file itkShapedNeighborhoodIterator.h.
|
inline |
Returns a const iterator for the neighborhood which points to the first pixel in the neighborhood.
Definition at line 244 of file itkShapedNeighborhoodIterator.h.
|
inline |
Returns a const iterator for the neighborhood which points to the first pixel in the neighborhood.
Definition at line 239 of file itkConstShapedNeighborhoodIterator.h.
|
inline |
Returns a const iterator for the neighborhood which points to the first pixel in the neighborhood.
Definition at line 249 of file itkShapedNeighborhoodIterator.h.
|
inline |
Returns a const iterator for the neighborhood which points to the last pixel in the neighborhood.
Definition at line 247 of file itkConstShapedNeighborhoodIterator.h.
|
inline |
Assignment operator
Definition at line 234 of file itkShapedNeighborhoodIterator.h.
( | const PixelType & | p | ) |
Returns the central pixel of the neighborhood.
( | const OffsetType | o, | |
const PixelType & | v ) |
Set the pixel at offset o from the neighborhood center
( | const unsigned int | n, | |
const PixelType & | v ) |
Set the pixel at the ith location.
( | const unsigned int | n, | |
const PixelType & | v, | ||
bool & | status ) |
Special SetPixel method which quietly ignores out-of-bounds attempts. Sets status TRUE if pixel has been set, FALSE otherwise.
|
friend |
Definition at line 417 of file itkConstShapedNeighborhoodIterator.h.
|
staticconstexpr |
Save the image dimension.
Definition at line 158 of file itkShapedNeighborhoodIterator.h.
|
protected |
Definition at line 259 of file itkShapedNeighborhoodIterator.h.