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;
144 { m_ListIterator++; }
147 { m_ListIterator--; }
168 if ( m_ListIterator == m_NeighborhoodIterator->GetActiveIndexList().end() )
180 m_ListIterator = m_NeighborhoodIterator->GetActiveIndexList().begin();
185 m_ListIterator = m_NeighborhoodIterator->GetActiveIndexList().end();
189 {
return m_NeighborhoodIterator->GetPixel(*m_ListIterator); }
192 {
return m_NeighborhoodIterator->
GetOffset(*m_ListIterator); }
194 typename IndexListType::value_type GetNeighborhoodIndex()
const
195 {
return *m_ListIterator; }
203 { m_NeighborhoodIterator->SetPixel(*m_ListIterator, v); }
209 {
return m_ConstBeginIterator; }
214 {
return m_ConstEndIterator; }
221 m_ConstEndIterator.GoToEnd();
222 m_CenterIsActive =
false;
238 m_ConstEndIterator.GoToEnd();
239 m_CenterIsActive =
false;
246 using Superclass::GetImagePointer;
247 using Superclass::GetRadius;
248 using Superclass::GetIndex;
249 using Superclass::GetNeighborhoodIndex;
250 using Superclass::GetCenterNeighborhoodIndex;
251 using Superclass::GetRegion;
252 using Superclass::GetBeginIndex;
253 using Superclass::GoToBegin;
254 using Superclass::GoToEnd;
255 using Superclass::IsAtBegin;
256 using Superclass::IsAtEnd;
257 using Superclass::GetOffset;
258 using Superclass::operator==;
259 using Superclass::operator!=;
260 using Superclass::operator<;
261 using Superclass::operator>;
262 using Superclass::operator>=;
263 using Superclass::operator<=;
264 using Superclass::operator[];
265 using Superclass::GetElement;
266 using Superclass::SetLocation;
267 using Superclass::GetCenterPointer;
268 using Superclass::GetCenterPixel;
269 using Superclass::OverrideBoundaryCondition;
270 using Superclass::ResetBoundaryCondition;
271 using Superclass::GetBoundaryCondition;
272 using Superclass::GetNeedToUseBoundaryCondition;
273 using Superclass::SetNeedToUseBoundaryCondition;
274 using Superclass::NeedToUseBoundaryConditionOn;
275 using Superclass::NeedToUseBoundaryConditionOff;
276 using Superclass::Print;
277 using Superclass::operator-;
278 using Superclass::GetPixel;
283 Superclass::operator=(orig);
284 m_ActiveIndexList = orig.m_ActiveIndexList;
285 m_CenterIsActive = orig.m_CenterIsActive;
290 m_ConstEndIterator.GoToBegin();
295 virtual void PrintSelf(std::ostream &,
Indent)
const;
301 { this->ActivateIndex( Superclass::GetNeighborhoodIndex(off) ); }
303 { this->DeactivateIndex( Superclass::GetNeighborhoodIndex(off) ); }
307 virtual void ClearActiveList()
309 m_ActiveIndexList.clear();
310 m_ConstBeginIterator.GoToBegin();
311 m_ConstEndIterator.GoToEnd();
312 m_CenterIsActive =
false;
318 {
return m_ActiveIndexList; }
321 typename IndexListType::size_type GetActiveIndexListSize()
const
322 {
return m_ActiveIndexList.size(); }
327 void CreateActiveListFromNeighborhood(
const NeighborhoodType &);
340 Self & operator+=(
const OffsetType &);
345 Self & operator-=(
const OffsetType &);
348 using Superclass::SetPixel;
349 using Superclass::SetCenterPixel;
377 #ifndef ITK_MANUAL_INSTANTIATION
378 #include "itkConstShapedNeighborhoodIterator.hxx"