18 #ifndef itkConstShapedNeighborhoodIterator_h
19 #define itkConstShapedNeighborhoodIterator_h
71 template <
typename TImage,
typename TBoundaryCondition = ZeroFluxNeumannBoundaryCondition<TImage>>
80 static constexpr
unsigned int Dimension = TImage::ImageDimension;
121 m_NeighborhoodIterator = s;
182 if (m_ListIterator == m_NeighborhoodIterator->GetActiveIndexList().end())
195 m_ListIterator = m_NeighborhoodIterator->GetActiveIndexList().begin();
201 m_ListIterator = m_NeighborhoodIterator->GetActiveIndexList().end();
207 return m_NeighborhoodIterator->GetPixel(*m_ListIterator);
213 return m_NeighborhoodIterator->GetOffset(*m_ListIterator);
216 typename IndexListType::value_type
219 return *m_ListIterator;
226 : m_NeighborhoodIterator(const_cast<
Self *>(s))
237 m_NeighborhoodIterator->SetPixel(*m_ListIterator, v);
275 using Superclass::GetImagePointer;
276 using Superclass::GetRadius;
277 using Superclass::GetIndex;
278 using Superclass::GetNeighborhoodIndex;
279 using Superclass::GetCenterNeighborhoodIndex;
280 using Superclass::GetRegion;
281 using Superclass::GetBeginIndex;
282 using Superclass::GoToBegin;
283 using Superclass::GoToEnd;
284 using Superclass::IsAtBegin;
285 using Superclass::IsAtEnd;
286 using Superclass::GetOffset;
287 using Superclass::operator==;
288 using Superclass::operator!=;
289 using Superclass::operator<;
290 using Superclass::operator>;
291 using Superclass::operator>=;
292 using Superclass::operator<=;
293 using Superclass::operator[];
294 using Superclass::GetElement;
295 using Superclass::SetLocation;
296 using Superclass::GetCenterPointer;
297 using Superclass::GetCenterPixel;
298 using Superclass::OverrideBoundaryCondition;
299 using Superclass::ResetBoundaryCondition;
300 using Superclass::GetBoundaryCondition;
301 using Superclass::SetBoundaryCondition;
302 using Superclass::GetNeedToUseBoundaryCondition;
303 using Superclass::SetNeedToUseBoundaryCondition;
304 using Superclass::NeedToUseBoundaryConditionOn;
305 using Superclass::NeedToUseBoundaryConditionOff;
306 using Superclass::Print;
307 using Superclass::operator-;
308 using Superclass::GetPixel;
309 using Superclass::SetRegion;
317 Superclass::operator=(orig);
318 m_ActiveIndexList = orig.m_ActiveIndexList;
319 m_CenterIsActive = orig.m_CenterIsActive;
327 PrintSelf(std::ostream &,
Indent)
const override;
332 ITK_ITERATOR_VIRTUAL
void
335 this->ActivateIndex(Superclass::GetNeighborhoodIndex(off));
337 ITK_ITERATOR_VIRTUAL
void
340 this->DeactivateIndex(Superclass::GetNeighborhoodIndex(off));
346 template <
typename TOffsets>
350 for (
const auto & offset : offsets)
352 this->ActivateOffset(offset);
358 ITK_ITERATOR_VIRTUAL
void
361 m_ActiveIndexList.clear();
362 m_CenterIsActive =
false;
367 const IndexListType &
370 return m_ActiveIndexList;
374 typename IndexListType::size_type
377 return m_ActiveIndexList.size();
384 CreateActiveListFromNeighborhood(
const NeighborhoodType &);
400 operator+=(
const OffsetType &);
406 operator-=(
const OffsetType &);
409 using Superclass::SetPixel;
410 using Superclass::SetCenterPixel;
429 bool m_CenterIsActive{
false };
434 #ifndef ITK_MANUAL_INSTANTIATION
435 # include "itkConstShapedNeighborhoodIterator.hxx"