18 #ifndef itkConstNeighborhoodIteratorWithOnlyIndex_h
19 #define itkConstNeighborhoodIteratorWithOnlyIndex_h
59 template<
typename TImage >
107 Self & operator=(
const Self & orig);
110 void PrintSelf(std::ostream &,
Indent)
const override;
146 return ( this->GetIndex() + o );
153 return ( this->GetIndex() + this->GetOffset(i) );
171 RegionType GetBoundingBoxAsImageRegion()
const;
174 ITK_ITERATOR_VIRTUAL
void GoToBegin() ITK_ITERATOR_FINAL;
178 ITK_ITERATOR_VIRTUAL
void GoToEnd() ITK_ITERATOR_FINAL;
182 ITK_ITERATOR_VIRTUAL
void Initialize(const
SizeType & radius, const ImageType *ptr, const
RegionType & region) ITK_ITERATOR_FINAL;
186 ITK_ITERATOR_VIRTUAL
bool IsAtBegin() const ITK_ITERATOR_FINAL
188 return ( this->GetIndex() == m_BeginIndex );
193 ITK_ITERATOR_VIRTUAL
bool IsAtEnd() const ITK_ITERATOR_FINAL;
210 bool operator==(const
Self & it)
const
212 return it.GetIndex() == this->GetIndex();
220 return it.
GetIndex() != this->GetIndex();
257 this->SetLoop(position);
263 Self & operator+=(
const OffsetType &);
268 Self & operator-=(
const OffsetType &);
279 bool InBounds()
const;
292 bool IndexInBounds(
const NeighborIndexType n, OffsetType & internalIndex, OffsetType & offset )
const;
297 this->SetNeedToUseBoundaryCondition(
true);
302 this->SetNeedToUseBoundaryCondition(
false);
307 m_NeedToUseBoundaryCondition = b;
312 return m_NeedToUseBoundaryCondition;
321 m_Loop = p; m_IsInBoundsValid =
false;
327 ITK_ITERATOR_VIRTUAL
void SetBound(
const SizeType &) ITK_ITERATOR_FINAL;
331 ITK_ITERATOR_VIRTUAL
void SetBeginIndex(const
IndexType & start) ITK_ITERATOR_FINAL
333 m_BeginIndex = start;
338 ITK_ITERATOR_VIRTUAL
void SetEndIndex() ITK_ITERATOR_FINAL;
365 mutable
bool m_IsInBounds;
370 mutable
bool m_IsInBoundsValid;
379 bool m_NeedToUseBoundaryCondition;
382 template< typename TImage >
394 template<
typename TImage >
395 inline ConstNeighborhoodIteratorWithOnlyIndex< TImage >
399 {
return ( it + ind ); }
401 template<
typename TImage >
402 inline ConstNeighborhoodIteratorWithOnlyIndex< TImage >
414 #ifndef ITK_MANUAL_INSTANTIATION
415 #include "itkConstNeighborhoodIteratorWithOnlyIndex.hxx"
ConstNeighborhoodIterator< TImage > operator-(const ConstNeighborhoodIterator< TImage > &it, const typename ConstNeighborhoodIterator< TImage >::OffsetType &ind)
OffsetType operator-(const Self &b)
A light-weight container object for storing an N-dimensional neighborhood of values.
typename Superclass::ConstIterator ConstIterator
ITK_ITERATOR_VIRTUAL IndexType GetIndex() const ITK_ITERATOR_FINAL
Index-only version of ConstNeighborhoodIterator, defining iteration of a local N-dimensional neighbor...
bool operator>(const Index< VDimension > &one, const Index< VDimension > &two)
RegionType GetRegion() const
typename Superclass::RadiusType RadiusType
SizeValueType NeighborIndexType
void NeedToUseBoundaryConditionOff()
typename AllocatorType::iterator Iterator
IndexType GetBeginIndex() const
ITK_ITERATOR_VIRTUAL IndexType GetIndex(const OffsetType &o) const ITK_ITERATOR_FINAL
unsigned int DimensionValueType
bool GetNeedToUseBoundaryCondition() const
constexpr unsigned int Dimension
typename AllocatorType::const_iterator ConstIterator
bool operator<=(const Index< VDimension > &one, const Index< VDimension > &two)
typename Superclass::Iterator Iterator
void SetLocation(const IndexType &position)
ImageBaseType::SizeType SizeType
ConstNeighborhoodIterator< TImage > operator+(const ConstNeighborhoodIterator< TImage > &it, const typename ConstNeighborhoodIterator< TImage >::OffsetType &ind)
signed long IndexValueType
const ImageType * GetImagePointer() const
Represent a n-dimensional size (bounds) of a n-dimensional image.
Represent a n-dimensional offset between two n-dimensional indexes of n-dimensional image...
typename TImage::RegionType RegionType
void SetNeedToUseBoundaryCondition(bool b)
char DummyNeighborhoodPixelType
bool operator<(const Index< VDimension > &one, const Index< VDimension > &two)
void NeedToUseBoundaryConditionOn()
Control indentation during Print() invocation.
bool operator!=(const Self &it) const
IndexValueType GetBound(NeighborIndexType n) const
ImageBaseType::RegionType RegionType
typename Superclass::OffsetType OffsetType
ITK_ITERATOR_VIRTUAL void SetLoop(const IndexType &p) ITK_ITERATOR_FINAL
ITK_ITERATOR_VIRTUAL IndexType GetIndex(NeighborIndexType i) const ITK_ITERATOR_FINAL
bool operator>=(const Index< VDimension > &one, const Index< VDimension > &two)
IndexType GetBound() const
typename Superclass::SizeType SizeType
typename NeighborhoodType::NeighborIndexType NeighborIndexType