#include <itkConstNeighborhoodIteratorWithOnlyIndex.h>
Index-only version of ConstNeighborhoodIterator, defining iteration of a local N-dimensional neighborhood of indices across an itk::Image or itk::ImageBase.
ConstNeighborhoodIteratorWithOnlyIndex implements the index-only methods of NeighborhoodIterator. No image data is accessed, so this iterator can be used with type itk::ImageBase. It serves as a base class from which other iterators can be derived. See NeighborhoodIterator for more complete information.
The parent class itk::Neighborhood is declared with 'char' as its first template parameter, because the pixel type is not used in this class.
Other index-only iterators:
Other iterators:
Definition at line 62 of file itkConstNeighborhoodIteratorWithOnlyIndex.h.
Inheritance diagram for itk::ConstNeighborhoodIteratorWithOnlyIndex< TImage >:
Collaboration diagram for itk::ConstNeighborhoodIteratorWithOnlyIndex< TImage >:Public Types | |
| using | ConstIterator |
| using | DimensionValueType = unsigned int |
| using | DummyNeighborhoodPixelType = int8_t |
| using | ImageType = TImage |
| using | IndexType = Index<Self::Dimension> |
| using | Iterator |
| using | NeighborhoodType = Neighborhood<DummyNeighborhoodPixelType, Self::Dimension> |
| using | NeighborIndexType = typename NeighborhoodType::NeighborIndexType |
| using | OffsetType |
| using | RadiusType |
| using | RegionType = typename TImage::RegionType |
| using | Self = ConstNeighborhoodIteratorWithOnlyIndex |
| using | SizeType |
| using | Superclass = Neighborhood<DummyNeighborhoodPixelType, Self::Dimension> |
Public Types inherited from itk::Neighborhood< int8_t, TImage::ImageDimension > | |
| using | AllocatorType |
| using | ConstIterator |
| using | DimensionValueType |
| using | Iterator |
| using | NeighborIndexType |
| using | OffsetType |
| using | PixelType |
| using | RadiusType |
| using | Self |
| using | SizeType |
| using | SizeValueType |
| using | SliceIteratorType |
Static Public Attributes | |
| static constexpr DimensionValueType | Dimension = TImage::ImageDimension |
Static Public Attributes inherited from itk::Neighborhood< int8_t, TImage::ImageDimension > | |
| static constexpr unsigned int | NeighborhoodDimension |
Protected Member Functions | |
| void | SetBeginIndex (const IndexType &start) |
| void | SetBound (const SizeType &) |
| void | SetEndIndex () |
| void | SetLoop (const IndexType &p) |
Protected Member Functions inherited from itk::Neighborhood< int8_t, TImage::ImageDimension > | |
| virtual void | Allocate (NeighborIndexType i) |
| virtual void | ComputeNeighborhoodOffsetTable () |
| virtual void | ComputeNeighborhoodStrideTable () |
| void | SetSize () |
Protected Attributes | |
| IndexType | m_BeginIndex { { 0 } } |
| IndexType | m_Bound { { 0 } } |
| ImageType::ConstPointer | m_ConstImage {} |
| IndexType | m_EndIndex { { 0 } } |
| bool | m_InBounds [Dimension] { false } |
| IndexType | m_InnerBoundsHigh {} |
| IndexType | m_InnerBoundsLow {} |
| bool | m_IsInBounds { false } |
| bool | m_IsInBoundsValid { false } |
| IndexType | m_Loop { { 0 } } |
| bool | m_NeedToUseBoundaryCondition { false } |
| RegionType | m_Region {} |
| using itk::Neighborhood< DummyNeighborhoodPixelType, VDimension, NeighborhoodAllocator<DummyNeighborhoodPixelType> >::ConstIterator |
Definition at line 76 of file itkNeighborhood.h.
| using itk::ConstNeighborhoodIteratorWithOnlyIndex< TImage >::DimensionValueType = unsigned int |
Type used to refer to space dimensions
Definition at line 68 of file itkConstNeighborhoodIteratorWithOnlyIndex.h.
| using itk::ConstNeighborhoodIteratorWithOnlyIndex< TImage >::DummyNeighborhoodPixelType = int8_t |
Definition at line 73 of file itkConstNeighborhoodIteratorWithOnlyIndex.h.
| using itk::ConstNeighborhoodIteratorWithOnlyIndex< TImage >::ImageType = TImage |
Typedef support for common objects
Definition at line 87 of file itkConstNeighborhoodIteratorWithOnlyIndex.h.
| using itk::ConstNeighborhoodIteratorWithOnlyIndex< TImage >::IndexType = Index<Self::Dimension> |
Definition at line 89 of file itkConstNeighborhoodIteratorWithOnlyIndex.h.
| using itk::Neighborhood< DummyNeighborhoodPixelType, VDimension, NeighborhoodAllocator<DummyNeighborhoodPixelType> >::Iterator |
Iterator type alias support Note the naming is intentional, i.e., AllocatorType::iterator and AllocatorType::const_iterator, because the allocator may be a vnl object or other type, which uses this form.
Definition at line 75 of file itkNeighborhood.h.
| using itk::ConstNeighborhoodIteratorWithOnlyIndex< TImage >::NeighborhoodType = Neighborhood<DummyNeighborhoodPixelType, Self::Dimension> |
Definition at line 90 of file itkConstNeighborhoodIteratorWithOnlyIndex.h.
| using itk::ConstNeighborhoodIteratorWithOnlyIndex< TImage >::NeighborIndexType = typename NeighborhoodType::NeighborIndexType |
Type used to refer to the elements in the list of neighbor pixels.
Definition at line 93 of file itkConstNeighborhoodIteratorWithOnlyIndex.h.
| using itk::Neighborhood< DummyNeighborhoodPixelType, VDimension, NeighborhoodAllocator<DummyNeighborhoodPixelType> >::OffsetType |
Offset type used to reference neighbor locations
Definition at line 86 of file itkNeighborhood.h.
| using itk::Neighborhood< DummyNeighborhoodPixelType, VDimension, NeighborhoodAllocator<DummyNeighborhoodPixelType> >::RadiusType |
Radius type alias support
Definition at line 83 of file itkNeighborhood.h.
| using itk::ConstNeighborhoodIteratorWithOnlyIndex< TImage >::RegionType = typename TImage::RegionType |
Definition at line 88 of file itkConstNeighborhoodIteratorWithOnlyIndex.h.
| using itk::ConstNeighborhoodIteratorWithOnlyIndex< TImage >::Self = ConstNeighborhoodIteratorWithOnlyIndex |
Standard class type aliases.
Definition at line 76 of file itkConstNeighborhoodIteratorWithOnlyIndex.h.
| using itk::Neighborhood< DummyNeighborhoodPixelType, VDimension, NeighborhoodAllocator<DummyNeighborhoodPixelType> >::SizeType |
Size and value type alias support
Definition at line 79 of file itkNeighborhood.h.
| using itk::ConstNeighborhoodIteratorWithOnlyIndex< TImage >::Superclass = Neighborhood<DummyNeighborhoodPixelType, Self::Dimension> |
Definition at line 77 of file itkConstNeighborhoodIteratorWithOnlyIndex.h.
|
default |
Default constructor
Referenced by ITK_DEFAULT_COPY_AND_MOVE().
|
overridedefault |
Virtual destructor
| itk::ConstNeighborhoodIteratorWithOnlyIndex< TImage >::ConstNeighborhoodIteratorWithOnlyIndex | ( | const SizeType & | radius, |
| const TImage * | ptr, | ||
| const RegionType & | region ) |
Constructor which establishes the region size, neighborhood, and image over which to walk.
| OffsetType itk::ConstNeighborhoodIteratorWithOnlyIndex< TImage >::ComputeInternalIndex | ( | NeighborIndexType | n | ) | const |
Computes the internal, N-d offset of a pixel array position n from (0,0, ..., 0) in the "upper-left" corner of the neighborhood.
|
inline |
Returns the N-dimensional starting index of the iterator's position on the image.
Definition at line 170 of file itkConstNeighborhoodIteratorWithOnlyIndex.h.
References m_BeginIndex.
|
inline |
Returns the array of upper loop bounds used during iteration.
Definition at line 116 of file itkConstNeighborhoodIteratorWithOnlyIndex.h.
References m_Bound.
|
inline |
Returns the loop bound used to define the edge of a single dimension in the itk::Image region.
Definition at line 124 of file itkConstNeighborhoodIteratorWithOnlyIndex.h.
References m_Bound.
| RegionType itk::ConstNeighborhoodIteratorWithOnlyIndex< TImage >::GetBoundingBoxAsImageRegion | ( | ) | const |
Returns a bounding box for the region spanned by this neighborhood represented by an itk::ImageRegion
|
inline |
Returns a smartpointer to the image on which this iterator operates.
Definition at line 131 of file itkConstNeighborhoodIteratorWithOnlyIndex.h.
References m_ConstImage.
|
inline |
Returns the N-dimensional index of the iterator's position in the image.
Definition at line 139 of file itkConstNeighborhoodIteratorWithOnlyIndex.h.
References m_Loop.
Referenced by GetIndex(), GetIndex(), IsAtBegin(), and operator==().
|
inline |
Returns the image index for neighbor pixel at offset o from the center of the neighborhood.
Definition at line 147 of file itkConstNeighborhoodIteratorWithOnlyIndex.h.
References GetIndex().
|
inline |
Returns the image index for neighbor pixel at index i in the neighborhood.
Definition at line 155 of file itkConstNeighborhoodIteratorWithOnlyIndex.h.
References GetIndex(), and itk::Neighborhood< int8_t, TImage::ImageDimension >::GetOffset().
|
inline |
Definition at line 333 of file itkConstNeighborhoodIteratorWithOnlyIndex.h.
References m_NeedToUseBoundaryCondition.
|
inline |
Returns the region of iteration.
Definition at line 162 of file itkConstNeighborhoodIteratorWithOnlyIndex.h.
References m_Region.
| void itk::ConstNeighborhoodIteratorWithOnlyIndex< TImage >::GoToBegin | ( | ) |
Method for rewinding the iterator to its beginning image index.
| void itk::ConstNeighborhoodIteratorWithOnlyIndex< TImage >::GoToEnd | ( | ) |
Method for sending the iterator to one past the last index in its region.
| bool itk::ConstNeighborhoodIteratorWithOnlyIndex< TImage >::InBounds | ( | ) | const |
Returns false if the iterator overlaps region boundaries, true otherwise. Also updates an internal boolean array indicating which of the iterator's faces are out of bounds.
| bool itk::ConstNeighborhoodIteratorWithOnlyIndex< TImage >::IndexInBounds | ( | const NeighborIndexType | n, |
| OffsetType & | internalIndex, | ||
| OffsetType & | offset ) const |
Returns true if the neighborhood index is within region boundaries, false otherwise. If false, then internalIndex and offset are calculated. Otherwise their values are left unchanged. Also updates an internal boolean array indicating which of the iterator's faces are out of bounds.
| n | - linear neighborhood index. |
| internalIndex | - calculated for index n only when the neighborhood is not completely within region boundaries. |
| offset | - per-dimension offsets for index n to nearest boundary index, calculate only when the neighborhood is not completely within region boundaries. |
| void itk::ConstNeighborhoodIteratorWithOnlyIndex< TImage >::Initialize | ( | const SizeType & | radius, |
| const ImageType * | ptr, | ||
| const RegionType & | region ) |
Initializes the iterator to walk a particular image and a particular region of that image.
|
inline |
Virtual method for determining whether the iterator is at the beginning of its iteration region.
Definition at line 197 of file itkConstNeighborhoodIteratorWithOnlyIndex.h.
References GetIndex(), and m_BeginIndex.
| bool itk::ConstNeighborhoodIteratorWithOnlyIndex< TImage >::IsAtEnd | ( | ) | const |
Virtual method for determining whether the iterator has reached the end of its iteration region.
| itk::ConstNeighborhoodIteratorWithOnlyIndex< TImage >::ITK_DEFAULT_COPY_AND_MOVE | ( | ConstNeighborhoodIteratorWithOnlyIndex< TImage > | ) |
References ConstNeighborhoodIteratorWithOnlyIndex().
| itk::ConstNeighborhoodIteratorWithOnlyIndex< TImage >::ITK_UNEQUAL_OPERATOR_MEMBER_FUNCTION | ( | Self | ) |
|
inline |
Definition at line 321 of file itkConstNeighborhoodIteratorWithOnlyIndex.h.
References SetNeedToUseBoundaryCondition().
|
inline |
Definition at line 315 of file itkConstNeighborhoodIteratorWithOnlyIndex.h.
References SetNeedToUseBoundaryCondition().
| Self & itk::ConstNeighborhoodIteratorWithOnlyIndex< TImage >::operator++ | ( | ) |
Increments the pointers in the ConstNeighborhoodIteratorWithOnlyIndex, wraps across boundaries automatically, accounting for the disparity in the buffer size and the region size of the image.
| Self & itk::ConstNeighborhoodIteratorWithOnlyIndex< TImage >::operator+= | ( | const OffsetType & | ) |
Addition of an itk::Offset. Note that this method does not do any bounds checking. Adding an offset that moves the iterator out of its assigned region will produce undefined results.
|
inline |
Distance between two iterators
Definition at line 288 of file itkConstNeighborhoodIteratorWithOnlyIndex.h.
References m_Loop.
| Self & itk::ConstNeighborhoodIteratorWithOnlyIndex< TImage >::operator-- | ( | ) |
Decrements the pointers in the ConstNeighborhoodIteratorWithOnlyIndex, wraps across boundaries automatically, accounting for the disparity in the buffer size and the region size of the image.
| Self & itk::ConstNeighborhoodIteratorWithOnlyIndex< TImage >::operator-= | ( | const OffsetType & | ) |
Subtraction of an itk::Offset. Note that this method does not do any bounds checking. Subtracting an offset that moves the iterator out of its assigned region will produce undefined results.
| bool itk::ConstNeighborhoodIteratorWithOnlyIndex< TImage >::operator< | ( | const Self & | it | ) | const |
Returns a boolean < comparison of the current location/index of two ConstNeighborhoodIteratorWithOnlyIndexs of like dimensionality. The radii of the iterators are ignored. The comparison progresses by dimension starting from the greatest.
References operator<().
Referenced by operator<().
| bool itk::ConstNeighborhoodIteratorWithOnlyIndex< TImage >::operator<= | ( | const Self & | it | ) | const |
Returns a boolean <= comparison of the current location/index of two ConstNeighborhoodIteratorWithOnlyIndexs of like dimensionality. The radii of the iterators are ignored. The comparison progresses by dimension starting from the greatest.
References operator<=().
Referenced by operator<=().
|
inline |
Returns a boolean == comparison of the current location/index of two ConstNeighborhoodIteratorWithOnlyIndexs of like dimensionality. The radii of the iterators are ignored.
Definition at line 225 of file itkConstNeighborhoodIteratorWithOnlyIndex.h.
References GetIndex().
| bool itk::ConstNeighborhoodIteratorWithOnlyIndex< TImage >::operator> | ( | const Self & | it | ) | const |
Returns a boolean > comparison of the current location/index of two ConstNeighborhoodIteratorWithOnlyIndexs of like dimensionality. The radii of the iterators are ignored. The comparison progresses by dimension starting from the greatest.
| bool itk::ConstNeighborhoodIteratorWithOnlyIndex< TImage >::operator>= | ( | const Self & | it | ) | const |
Returns a boolean >= comparison of the current location/index of two ConstNeighborhoodIteratorWithOnlyIndexs of like dimensionality. The radii of the iterators are ignored. The comparison progresses by dimension starting from the greatest.
|
overridevirtual |
Standard itk print method
Reimplemented from itk::Neighborhood< int8_t, TImage::ImageDimension >.
|
inlineprotected |
Default method for setting the first index of the iteration region.
Definition at line 357 of file itkConstNeighborhoodIteratorWithOnlyIndex.h.
References m_BeginIndex.
|
protected |
Virtual method for setting internal loop boundaries. This method must be defined in each subclass because each subclass may handle loop boundaries differently.
|
protected |
Default method for setting the last index of the iteration region.
|
inline |
This method positions the iterator at an indexed location in the image. SetLocation should NOT be used to update the position of the iterator during iteration, only for initializing it to a position prior to iteration. This method is not optimized for speed.
Definition at line 269 of file itkConstNeighborhoodIteratorWithOnlyIndex.h.
References SetLoop().
|
inlineprotected |
Default method for setting the coordinate location of the iterator. Loop indices correspond to the actual Image region index.
Definition at line 342 of file itkConstNeighborhoodIteratorWithOnlyIndex.h.
References m_IsInBoundsValid, and m_Loop.
Referenced by SetLocation().
|
inline |
Definition at line 327 of file itkConstNeighborhoodIteratorWithOnlyIndex.h.
References m_NeedToUseBoundaryCondition.
Referenced by NeedToUseBoundaryConditionOff(), and NeedToUseBoundaryConditionOn().
|
staticconstexpr |
Save the image dimension.
Definition at line 71 of file itkConstNeighborhoodIteratorWithOnlyIndex.h.
|
protected |
The starting index for iteration within the itk::Image region on which this ConstNeighborhoodIteratorWithOnlyIndex is defined.
Definition at line 369 of file itkConstNeighborhoodIteratorWithOnlyIndex.h.
Referenced by GetBeginIndex(), IsAtBegin(), and SetBeginIndex().
|
protected |
An array of upper looping boundaries used during iteration.
Definition at line 372 of file itkConstNeighborhoodIteratorWithOnlyIndex.h.
Referenced by GetBound(), and GetBound().
|
protected |
The image on which iteration is defined.
Definition at line 375 of file itkConstNeighborhoodIteratorWithOnlyIndex.h.
Referenced by GetImagePointer().
|
protected |
The end index for iteration within the itk::Image region on which this ConstNeighborhoodIteratorWithOnlyIndex is defined.
Definition at line 379 of file itkConstNeighborhoodIteratorWithOnlyIndex.h.
|
mutableprotected |
Denotes which of the iterators dimensional sides spill outside region of interest boundaries. By default false for each dimension.
Definition at line 389 of file itkConstNeighborhoodIteratorWithOnlyIndex.h.
|
protected |
Upper threshold of in-bounds loop counter values.
Definition at line 403 of file itkConstNeighborhoodIteratorWithOnlyIndex.h.
|
protected |
Lower threshold of in-bounds loop counter values.
Definition at line 400 of file itkConstNeighborhoodIteratorWithOnlyIndex.h.
|
mutableprotected |
Denotes if iterator is entirely within bounds
Definition at line 392 of file itkConstNeighborhoodIteratorWithOnlyIndex.h.
|
mutableprotected |
Is the m_InBounds and m_IsInBounds variables up to date? Set to false whenever the iterator is repositioned. Set to true within InBounds().
Definition at line 397 of file itkConstNeighborhoodIteratorWithOnlyIndex.h.
Referenced by SetLoop().
|
protected |
Array of loop counters used during iteration.
Definition at line 382 of file itkConstNeighborhoodIteratorWithOnlyIndex.h.
Referenced by GetIndex(), operator-(), and SetLoop().
|
protected |
Does the specified region need to worry about boundary conditions?
Definition at line 406 of file itkConstNeighborhoodIteratorWithOnlyIndex.h.
Referenced by GetNeedToUseBoundaryCondition(), and SetNeedToUseBoundaryCondition().
|
protected |
The region over which iteration is defined.
Definition at line 385 of file itkConstNeighborhoodIteratorWithOnlyIndex.h.
Referenced by GetRegion().