18 #ifndef __itkConstNeighborhoodIteratorWithOnlyIndex_h
19 #define __itkConstNeighborhoodIteratorWithOnlyIndex_h
59 template<
class TImage >
80 typedef typename Superclass::SizeType
SizeType;
108 Self & operator=(
const Self & orig);
111 virtual void PrintSelf(std::ostream &,
Indent)
const;
115 OffsetType ComputeInternalIndex(NeighborIndexType n)
const;
147 return ( this->GetIndex() + o );
154 return ( this->GetIndex() + this->GetOffset(i) );
172 RegionType GetBoundingBoxAsImageRegion()
const;
177 virtual void GoToBegin();
181 virtual void GoToEnd();
185 virtual void Initialize(
const SizeType & radius,
const ImageType *ptr,
const RegionType & region);
189 virtual bool IsAtBegin()
const
191 return ( this->GetIndex() == m_BeginIndex );
196 virtual bool IsAtEnd()
const;
213 bool operator==(
const Self & it)
const
215 return it.
GetIndex() == this->GetIndex();
223 return it.
GetIndex() != this->GetIndex();
231 bool operator<(
const Self & it)
const;
238 bool operator<=(
const Self & it)
const;
245 bool operator>(
const Self & it)
const;
252 bool operator>=(
const Self & it)
const;
260 this->SetLoop(position);
266 Self & operator+=(
const OffsetType &);
271 Self & operator-=(
const OffsetType &);
282 bool InBounds()
const;
295 bool IndexInBounds(NeighborIndexType n, OffsetType & internalIndex, OffsetType & offset )
const;
298 void NeedToUseBoundaryConditionOn()
300 this->SetNeedToUseBoundaryCondition(
true);
303 void NeedToUseBoundaryConditionOff()
305 this->SetNeedToUseBoundaryCondition(
false);
308 void SetNeedToUseBoundaryCondition(
bool b)
310 m_NeedToUseBoundaryCondition = b;
313 bool GetNeedToUseBoundaryCondition()
const
315 return m_NeedToUseBoundaryCondition;
324 m_Loop = p; m_IsInBoundsValid =
false;
330 virtual void SetBound(
const SizeType &);
336 m_BeginIndex = start;
341 virtual void SetEndIndex();
365 mutable bool m_InBounds[Dimension];
385 template<
class TImage >
397 template<
class TImage >
398 inline ConstNeighborhoodIteratorWithOnlyIndex< TImage >
402 {
return ( it + ind ); }
404 template<
class TImage >
405 inline ConstNeighborhoodIteratorWithOnlyIndex< TImage >
417 #ifndef ITK_MANUAL_INSTANTIATION
418 #include "itkConstNeighborhoodIteratorWithOnlyIndex.hxx"