ITK
5.0.0
Insight Segmentation and Registration Toolkit
|
#include <itkConstShapedNeighborhoodIterator.h>
Const version of ShapedNeighborhoodIterator, defining iteration of a local N-dimensional neighborhood of pixels across an itk::Image.
ConstShapedNeighborhoodIterator implements the read-only methods of ShapedNeighborhoodIterator. A "shaped" neighborhood iterator is one that allows you to specify which neighbor elements are active and which are inactive. See ShapedNeighborhoodIterator for more information.
Definition at line 73 of file itkConstShapedNeighborhoodIterator.h.
Classes | |
struct | ConstIterator |
Public Types | |
using | BoundaryConditionType = TBoundaryCondition |
using | ImageBoundaryConditionPointerType = ImageBoundaryCondition< ImageType > * |
using | ImageType = TImage |
using | IndexListConstIterator = typename IndexListType::const_iterator |
using | IndexListIterator = typename IndexListType::iterator |
using | IndexListType = std::list< NeighborIndexType > |
using | IndexType = Index< Self::Dimension > |
using | IndexValueType = typename IndexType::IndexValueType |
using | InternalPixelType = typename TImage::InternalPixelType |
using | NeighborhoodType = Neighborhood< PixelType, Self::Dimension > |
using | NeighborIndexType = typename NeighborhoodType::NeighborIndexType |
using | OffsetType = typename Superclass::OffsetType |
using | OffsetValueType = typename OffsetType::OffsetValueType |
using | PixelType = typename TImage::PixelType |
using | RadiusType = typename Superclass::RadiusType |
using | RegionType = typename TImage::RegionType |
using | Self = ConstShapedNeighborhoodIterator |
using | SizeType = typename Superclass::SizeType |
using | SizeValueType = typename SizeType::SizeValueType |
using | Superclass = NeighborhoodIterator< TImage, TBoundaryCondition > |
Public Member Functions | |
void | CreateActiveListFromNeighborhood (const NeighborhoodType &) |
const IndexListType & | GetActiveIndexList () const |
IndexListType::size_type | GetActiveIndexListSize () const |
Self & | operator++ () |
Self & | operator+= (const OffsetType &) |
Self & | operator-- () |
Self & | operator-= (const OffsetType &) |
ConstIterator | Begin () const |
ConstIterator | End () const |
ConstShapedNeighborhoodIterator ()=default | |
~ConstShapedNeighborhoodIterator () override=default | |
ConstShapedNeighborhoodIterator (const SizeType &radius, const ImageType *ptr, const RegionType ®ion) | |
Self & | operator= (const Self &orig) |
void | PrintSelf (std::ostream &, Indent) const override |
ITK_ITERATOR_VIRTUAL void | ActivateOffset (const OffsetType &off) ITK_ITERATOR_FINAL |
ITK_ITERATOR_VIRTUAL void | DeactivateOffset (const OffsetType &off) ITK_ITERATOR_FINAL |
template<typename TOffsets > | |
void | ActivateOffsets (const TOffsets &offsets) |
ITK_ITERATOR_VIRTUAL void | ClearActiveList () ITK_ITERATOR_FINAL |
Static Public Attributes | |
static constexpr unsigned int | Dimension = TImage::ImageDimension |
Protected Member Functions | |
ITK_ITERATOR_VIRTUAL void | ActivateIndex (NeighborIndexType) ITK_ITERATOR_FINAL |
ITK_ITERATOR_VIRTUAL void | DeactivateIndex (NeighborIndexType) ITK_ITERATOR_FINAL |
Protected Attributes | |
IndexListType | m_ActiveIndexList |
bool | m_CenterIsActive { false } |
Private Member Functions | |
ConstShapedNeighborhoodIterator (const ConstShapedNeighborhoodIterator &)=delete | |
Private Member Functions inherited from itk::NeighborhoodIterator< TImage, TBoundaryCondition > | |
InternalPixelType * | GetCenterPointer () |
NeighborhoodIterator () | |
NeighborhoodIterator (const NeighborhoodIterator &n) | |
NeighborhoodIterator (const SizeType &radius, ImageType *ptr, const RegionType ®ion) | |
void | PrintSelf (std::ostream &, Indent) const |
ITK_ITERATOR_VIRTUAL void | SetCenterPixel (const PixelType &p) ITK_ITERATOR_FINAL |
ITK_ITERATOR_VIRTUAL void | SetNeighborhood (const NeighborhoodType &) ITK_ITERATOR_FINAL |
ITK_ITERATOR_VIRTUAL void | SetNext (const unsigned axis, const unsigned i, const PixelType &v) ITK_ITERATOR_FINAL |
ITK_ITERATOR_VIRTUAL void | SetNext (const unsigned axis, const PixelType &v) ITK_ITERATOR_FINAL |
ITK_ITERATOR_VIRTUAL void | SetPixel (const unsigned i, const PixelType &v, bool &status) ITK_ITERATOR_FINAL |
ITK_ITERATOR_VIRTUAL void | SetPixel (const unsigned i, const PixelType &v) ITK_ITERATOR_FINAL |
ITK_ITERATOR_VIRTUAL void | SetPrevious (const unsigned axis, const unsigned i, const PixelType &v) ITK_ITERATOR_FINAL |
Self & | operator= (const Self &orig) |
ITK_ITERATOR_VIRTUAL void | SetPixel (const OffsetType o, const PixelType &v) ITK_ITERATOR_FINAL |
ITK_ITERATOR_VIRTUAL void | SetPrevious (const unsigned axis, const PixelType &v) ITK_ITERATOR_FINAL |
Private Member Functions inherited from itk::ConstNeighborhoodIterator< TImage, TBoundaryCondition > | |
OffsetType | ComputeInternalIndex (const NeighborIndexType n) const |
ConstNeighborhoodIterator () | |
ConstNeighborhoodIterator (const ConstNeighborhoodIterator &) | |
IndexType | GetBeginIndex () const |
IndexType | GetBound () const |
IndexValueType | GetBound (NeighborIndexType n) const |
ImageBoundaryConditionPointerType | GetBoundaryCondition () const |
RegionType | GetBoundingBoxAsImageRegion () const |
PixelType | GetCenterPixel () const |
const InternalPixelType * | GetCenterPointer () const |
IndexType | GetFastIndexPlusOffset (const OffsetType &o) const |
const ImageType * | GetImagePointer () const |
ITK_ITERATOR_VIRTUAL IndexType | GetIndex () const ITK_ITERATOR_FINAL |
ITK_ITERATOR_VIRTUAL IndexType | GetIndex (const OffsetType &o) const ITK_ITERATOR_FINAL |
ITK_ITERATOR_VIRTUAL IndexType | GetIndex (NeighborIndexType i) const ITK_ITERATOR_FINAL |
bool | GetNeedToUseBoundaryCondition () const |
ITK_ITERATOR_VIRTUAL NeighborhoodType | GetNeighborhood () const ITK_ITERATOR_FINAL |
ITK_ITERATOR_VIRTUAL PixelType | GetNext (const unsigned axis, NeighborIndexType i) const ITK_ITERATOR_FINAL |
ITK_ITERATOR_VIRTUAL PixelType | GetNext (const unsigned axis) const ITK_ITERATOR_FINAL |
ITK_ITERATOR_VIRTUAL PixelType | GetPixel (const NeighborIndexType i) const ITK_ITERATOR_FINAL |
ITK_ITERATOR_VIRTUAL PixelType | GetPixel (NeighborIndexType i, bool &IsInBounds) const ITK_ITERATOR_FINAL |
ITK_ITERATOR_VIRTUAL PixelType | GetPixel (const OffsetType &o) const ITK_ITERATOR_FINAL |
ITK_ITERATOR_VIRTUAL PixelType | GetPixel (const OffsetType &o, bool &IsInBounds) const ITK_ITERATOR_FINAL |
ITK_ITERATOR_VIRTUAL PixelType | GetPrevious (const unsigned axis, NeighborIndexType i) const ITK_ITERATOR_FINAL |
ITK_ITERATOR_VIRTUAL PixelType | GetPrevious (const unsigned axis) const ITK_ITERATOR_FINAL |
RegionType | GetRegion () const |
OffsetType | GetWrapOffset () const |
OffsetValueType | GetWrapOffset (NeighborIndexType n) const |
ITK_ITERATOR_VIRTUAL void | GoToBegin () ITK_ITERATOR_FINAL |
ITK_ITERATOR_VIRTUAL void | GoToEnd () ITK_ITERATOR_FINAL |
bool | InBounds () const |
bool | IndexInBounds (const NeighborIndexType n, OffsetType &internalIndex, OffsetType &offset) const |
bool | IndexInBounds (const NeighborIndexType n) const |
ITK_ITERATOR_VIRTUAL void | Initialize (const SizeType &radius, const ImageType *ptr, const RegionType ®ion) ITK_ITERATOR_FINAL |
ITK_ITERATOR_VIRTUAL bool | IsAtBegin () const ITK_ITERATOR_FINAL |
void | NeedToUseBoundaryConditionOff () |
void | NeedToUseBoundaryConditionOn () |
bool | operator!= (const Self &it) const |
Self & | operator++ () |
Self & | operator+= (const OffsetType &) |
OffsetType | operator- (const Self &b) |
Self & | operator-- () |
Self & | operator-= (const OffsetType &) |
bool | operator< (const Self &it) const |
bool | operator<= (const Self &it) const |
Self & | operator= (const Self &orig) |
bool | operator== (const Self &it) const |
bool | operator> (const Self &it) const |
bool | operator>= (const Self &it) const |
ITK_ITERATOR_VIRTUAL void | OverrideBoundaryCondition (const ImageBoundaryConditionPointerType i) ITK_ITERATOR_FINAL |
ITK_ITERATOR_VIRTUAL void | ResetBoundaryCondition () ITK_ITERATOR_FINAL |
void | SetBoundaryCondition (const TBoundaryCondition &c) |
void | SetNeedToUseBoundaryCondition (bool b) |
ITK_ITERATOR_VIRTUAL void | SetRegion (const RegionType ®ion) ITK_ITERATOR_FINAL |
~ConstNeighborhoodIterator () override=default | |
ConstNeighborhoodIterator (const SizeType &radius, const ImageType *ptr, const RegionType ®ion) | |
ITK_ITERATOR_VIRTUAL bool | IsAtEnd () const ITK_ITERATOR_FINAL |
void | SetLocation (const IndexType &position) |
ITK_ITERATOR_VIRTUAL void | SetBeginIndex (const IndexType &start) ITK_ITERATOR_FINAL |
ITK_ITERATOR_VIRTUAL void | SetBound (const SizeType &) ITK_ITERATOR_FINAL |
ITK_ITERATOR_VIRTUAL void | SetEndIndex () ITK_ITERATOR_FINAL |
ITK_ITERATOR_VIRTUAL void | SetLoop (const IndexType &p) ITK_ITERATOR_FINAL |
ITK_ITERATOR_VIRTUAL void | SetPixelPointers (const IndexType &) ITK_ITERATOR_FINAL |
Private Member Functions inherited from itk::Neighborhood< TImage::InternalPixelType *, TImage::ImageDimension > | |
NeighborIndexType | GetCenterNeighborhoodIndex () const |
TImage::InternalPixelType * | GetCenterValue () const |
virtual NeighborIndexType | GetNeighborhoodIndex (const OffsetType &) const |
OffsetType | GetOffset (NeighborIndexType i) const |
const SizeType | GetRadius () const |
SizeValueType | GetRadius (DimensionValueType n) const |
SizeValueType | GetSize (DimensionValueType n) const |
SizeType | GetSize () const |
std::slice | GetSlice (unsigned int) const |
OffsetValueType | GetStride (DimensionValueType axis) const |
itkTypeMacroNoParent (Neighborhood) | |
Neighborhood (const Self &other) | |
Neighborhood (Self &&)=default | |
bool | operator!= (const Self &other) const |
Self & | operator= (const Self &other) |
Self & | operator= (Self &&)=default |
bool | operator== (const Self &other) const |
void | Print (std::ostream &os) const |
void | SetRadius (const SizeType &) |
void | SetRadius (const SizeValueType) |
NeighborIndexType | Size () const |
virtual | ~Neighborhood ()=default |
Neighborhood () | |
Iterator | End () |
ConstIterator | End () const |
Iterator | Begin () |
ConstIterator | Begin () const |
TImage::InternalPixelType *& | operator[] (NeighborIndexType i) |
const TImage::InternalPixelType *& | operator[] (NeighborIndexType i) const |
TImage::InternalPixelType *& | GetElement (NeighborIndexType i) |
TImage::InternalPixelType *& | operator[] (const OffsetType &o) |
const TImage::InternalPixelType *& | operator[] (const OffsetType &o) const |
void | SetRadius (const SizeValueType *rad) |
AllocatorType & | GetBufferReference () |
const AllocatorType & | GetBufferReference () const |
virtual void | Allocate (NeighborIndexType i) |
virtual void | ComputeNeighborhoodOffsetTable () |
virtual void | ComputeNeighborhoodStrideTable () |
void | SetSize () |
Friends | |
struct | ConstIterator |
using itk::ConstShapedNeighborhoodIterator< TImage, TBoundaryCondition >::BoundaryConditionType = TBoundaryCondition |
Typedef for boundary condition type.
Definition at line 113 of file itkConstShapedNeighborhoodIterator.h.
using itk::ConstShapedNeighborhoodIterator< TImage, TBoundaryCondition >::ImageBoundaryConditionPointerType = ImageBoundaryCondition<ImageType> * |
Typedef for generic boundary condition pointer
Definition at line 116 of file itkConstShapedNeighborhoodIterator.h.
using itk::ConstShapedNeighborhoodIterator< TImage, TBoundaryCondition >::ImageType = TImage |
Typedef support for common objects
Definition at line 97 of file itkConstShapedNeighborhoodIterator.h.
using itk::ConstShapedNeighborhoodIterator< TImage, TBoundaryCondition >::IndexListConstIterator = typename IndexListType::const_iterator |
Definition at line 110 of file itkConstShapedNeighborhoodIterator.h.
using itk::ConstShapedNeighborhoodIterator< TImage, TBoundaryCondition >::IndexListIterator = typename IndexListType::iterator |
Definition at line 109 of file itkConstShapedNeighborhoodIterator.h.
using itk::ConstShapedNeighborhoodIterator< TImage, TBoundaryCondition >::IndexListType = std::list< NeighborIndexType > |
An stl storage container type that can be sorted. The type used for the list of active offsets in the neighborhood.
Definition at line 107 of file itkConstShapedNeighborhoodIterator.h.
using itk::ConstShapedNeighborhoodIterator< TImage, TBoundaryCondition >::IndexType = Index< Self::Dimension > |
Definition at line 99 of file itkConstShapedNeighborhoodIterator.h.
using itk::ConstShapedNeighborhoodIterator< TImage, TBoundaryCondition >::IndexValueType = typename IndexType::IndexValueType |
Definition at line 100 of file itkConstShapedNeighborhoodIterator.h.
using itk::ConstShapedNeighborhoodIterator< TImage, TBoundaryCondition >::InternalPixelType = typename TImage::InternalPixelType |
Extract image type information.
Definition at line 79 of file itkConstShapedNeighborhoodIterator.h.
using itk::ConstShapedNeighborhoodIterator< TImage, TBoundaryCondition >::NeighborhoodType = Neighborhood< PixelType, Self::Dimension > |
Definition at line 101 of file itkConstShapedNeighborhoodIterator.h.
using itk::ConstShapedNeighborhoodIterator< TImage, TBoundaryCondition >::NeighborIndexType = typename NeighborhoodType::NeighborIndexType |
Definition at line 103 of file itkConstShapedNeighborhoodIterator.h.
using itk::ConstShapedNeighborhoodIterator< TImage, TBoundaryCondition >::OffsetType = typename Superclass::OffsetType |
Inherit type alias from superclass
Definition at line 90 of file itkConstShapedNeighborhoodIterator.h.
using itk::ConstShapedNeighborhoodIterator< TImage, TBoundaryCondition >::OffsetValueType = typename OffsetType::OffsetValueType |
Definition at line 91 of file itkConstShapedNeighborhoodIterator.h.
using itk::ConstShapedNeighborhoodIterator< TImage, TBoundaryCondition >::PixelType = typename TImage::PixelType |
Definition at line 80 of file itkConstShapedNeighborhoodIterator.h.
using itk::ConstShapedNeighborhoodIterator< TImage, TBoundaryCondition >::RadiusType = typename Superclass::RadiusType |
Definition at line 92 of file itkConstShapedNeighborhoodIterator.h.
using itk::ConstShapedNeighborhoodIterator< TImage, TBoundaryCondition >::RegionType = typename TImage::RegionType |
Definition at line 98 of file itkConstShapedNeighborhoodIterator.h.
using itk::ConstShapedNeighborhoodIterator< TImage, TBoundaryCondition >::Self = ConstShapedNeighborhoodIterator |
Standard class type aliases.
Definition at line 86 of file itkConstShapedNeighborhoodIterator.h.
using itk::ConstShapedNeighborhoodIterator< TImage, TBoundaryCondition >::SizeType = typename Superclass::SizeType |
Definition at line 93 of file itkConstShapedNeighborhoodIterator.h.
using itk::ConstShapedNeighborhoodIterator< TImage, TBoundaryCondition >::SizeValueType = typename SizeType::SizeValueType |
Definition at line 94 of file itkConstShapedNeighborhoodIterator.h.
using itk::ConstShapedNeighborhoodIterator< TImage, TBoundaryCondition >::Superclass = NeighborhoodIterator< TImage, TBoundaryCondition > |
Definition at line 87 of file itkConstShapedNeighborhoodIterator.h.
|
default |
Default constructor
|
overridedefault |
Virtual destructor
|
inline |
Constructor which establishes the region size, neighborhood, and image over which to walk.
Definition at line 232 of file itkConstShapedNeighborhoodIterator.h.
|
privatedelete |
Copy constructor
|
protected |
Class is protected here so that it is not publicly accessible, but can be accessed by subclasses.. Add/Remove a neighborhood index to/from the active. Locations in the active list are the only accessible elements in the neighborhood. The argument is an index location calculated as an offset into a linear array which represents the image region defined by the radius of this iterator, with the smallest dimension as the fastest increasing index.
|
inline |
Add/Remove a neighborhood offset (from the center of the neighborhood) to/from the active list. Active list offsets are the only locations updated and accessible through the iterator.
Definition at line 297 of file itkConstShapedNeighborhoodIterator.h.
|
inline |
Activates a whole range of offsets, for example, an std::vector<OffsetType>, which could be from Experimental::GenerateImageNeighborhoodOffsets(shape).
Definition at line 306 of file itkConstShapedNeighborhoodIterator.h.
|
inline |
Returns a const iterator for the neighborhood which points to the first pixel in the neighborhood.
Definition at line 216 of file itkConstShapedNeighborhoodIterator.h.
|
inline |
Removes all active pixels from this neighborhood.
Definition at line 316 of file itkConstShapedNeighborhoodIterator.h.
void itk::ConstShapedNeighborhoodIterator< TImage, TBoundaryCondition >::CreateActiveListFromNeighborhood | ( | const NeighborhoodType & | ) |
Add non-zero neighborhood offsets to the active list. The radius of the neighborhood must match the radius of the shaped iterator
|
protected |
|
inline |
Returns a const iterator for the neighborhood which points to the first pixel in the neighborhood.
Definition at line 299 of file itkConstShapedNeighborhoodIterator.h.
|
inline |
Returns a const iterator for the neighborhood which points to the last pixel in the neighborhood.
Definition at line 221 of file itkConstShapedNeighborhoodIterator.h.
|
inline |
Returns the list of active indices in the neighborhood
Definition at line 324 of file itkConstShapedNeighborhoodIterator.h.
|
inline |
Returns the size of the list of active neighborhood indices.
Definition at line 328 of file itkConstShapedNeighborhoodIterator.h.
Self& itk::ConstShapedNeighborhoodIterator< TImage, TBoundaryCondition >::operator++ | ( | ) |
Reimplements the operator++ method so that only active pixel locations are updated.
Self& itk::ConstShapedNeighborhoodIterator< TImage, TBoundaryCondition >::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.
Self& itk::ConstShapedNeighborhoodIterator< TImage, TBoundaryCondition >::operator-- | ( | ) |
Reimplements the operator-- method so that only active pixel locations are updated.
Self& itk::ConstShapedNeighborhoodIterator< TImage, TBoundaryCondition >::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.
|
inline |
Assignment operator
Definition at line 278 of file itkConstShapedNeighborhoodIterator.h.
|
overridevirtual |
Standard itk print method
Reimplemented from itk::ConstNeighborhoodIterator< TImage, TBoundaryCondition >.
Reimplemented in itk::ShapedNeighborhoodIterator< TImage, TBoundaryCondition >, and itk::ShapedNeighborhoodIterator< ImageType >.
|
friend |
Definition at line 358 of file itkConstShapedNeighborhoodIterator.h.
|
static |
Save the image dimension.
Definition at line 83 of file itkConstShapedNeighborhoodIterator.h.
|
protected |
Definition at line 376 of file itkConstShapedNeighborhoodIterator.h.
|
protected |
Definition at line 375 of file itkConstShapedNeighborhoodIterator.h.