18 #ifndef __itkConstShapedNeighborhoodIterator_h
19 #define __itkConstShapedNeighborhoodIterator_h
70 template<
class TImage,
class TBoundaryCondition =
71 ZeroFluxNeumannBoundaryCondition< TImage > >
82 itkStaticConstMacro(Dimension,
unsigned int, TImage::ImageDimension);
92 typedef typename Superclass::SizeType
SizeType;
124 m_NeighborhoodIterator = s;
145 { m_ListIterator++; }
148 { m_ListIterator--; }
169 if ( m_ListIterator == m_NeighborhoodIterator->GetActiveIndexList().end() )
181 m_ListIterator = m_NeighborhoodIterator->GetActiveIndexList().begin();
186 m_ListIterator = m_NeighborhoodIterator->GetActiveIndexList().end();
190 {
return m_NeighborhoodIterator->GetPixel(*m_ListIterator); }
193 {
return m_NeighborhoodIterator->
GetOffset(*m_ListIterator); }
195 typename IndexListType::value_type GetNeighborhoodIndex()
const
196 {
return *m_ListIterator; }
205 { m_NeighborhoodIterator->SetPixel(*m_ListIterator, v); }
211 {
return m_ConstBeginIterator; }
216 {
return m_ConstEndIterator; }
221 InitializeConstShapedNeighborhoodIterator();
225 void InitializeConstShapedNeighborhoodIterator()
229 m_ConstEndIterator.GoToEnd();
230 m_CenterIsActive =
false;
244 InitializeConstShapedNeighborhoodIterator();
250 using Superclass::GetImagePointer;
251 using Superclass::GetRadius;
252 using Superclass::GetIndex;
253 using Superclass::GetNeighborhoodIndex;
254 using Superclass::GetCenterNeighborhoodIndex;
255 using Superclass::GetRegion;
256 using Superclass::GetBeginIndex;
257 using Superclass::GoToBegin;
258 using Superclass::GoToEnd;
259 using Superclass::IsAtBegin;
260 using Superclass::IsAtEnd;
261 using Superclass::GetOffset;
262 using Superclass::operator==;
263 using Superclass::operator!=;
264 using Superclass::operator<;
265 using Superclass::operator>;
266 using Superclass::operator>=;
267 using Superclass::operator<=;
268 using Superclass::operator[];
269 using Superclass::GetElement;
270 using Superclass::SetLocation;
271 using Superclass::GetCenterPointer;
272 using Superclass::GetCenterPixel;
273 using Superclass::OverrideBoundaryCondition;
274 using Superclass::ResetBoundaryCondition;
275 using Superclass::GetBoundaryCondition;
276 using Superclass::GetNeedToUseBoundaryCondition;
277 using Superclass::SetNeedToUseBoundaryCondition;
278 using Superclass::NeedToUseBoundaryConditionOn;
279 using Superclass::NeedToUseBoundaryConditionOff;
280 using Superclass::Print;
281 using Superclass::operator-;
282 using Superclass::GetPixel;
283 using Superclass::SetRegion;
290 Superclass::operator=(orig);
291 m_ActiveIndexList = orig.m_ActiveIndexList;
292 m_CenterIsActive = orig.m_CenterIsActive;
297 m_ConstEndIterator.GoToBegin();
303 virtual void PrintSelf(std::ostream &,
Indent)
const;
309 { this->ActivateIndex( Superclass::GetNeighborhoodIndex(off) ); }
311 { this->DeactivateIndex( Superclass::GetNeighborhoodIndex(off) ); }
315 virtual void ClearActiveList()
317 m_ActiveIndexList.clear();
318 m_ConstBeginIterator.GoToBegin();
319 m_ConstEndIterator.GoToEnd();
320 m_CenterIsActive =
false;
326 {
return m_ActiveIndexList; }
329 typename IndexListType::size_type GetActiveIndexListSize()
const
330 {
return m_ActiveIndexList.size(); }
335 void CreateActiveListFromNeighborhood(
const NeighborhoodType &);
348 Self & operator+=(
const OffsetType &);
353 Self & operator-=(
const OffsetType &);
356 using Superclass::SetPixel;
357 using Superclass::SetCenterPixel;
385 #ifndef ITK_MANUAL_INSTANTIATION
386 #include "itkConstShapedNeighborhoodIterator.hxx"