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;
179 if (m_ListIterator == m_NeighborhoodIterator->GetActiveIndexList().end())
192 m_ListIterator = m_NeighborhoodIterator->GetActiveIndexList().begin();
198 m_ListIterator = m_NeighborhoodIterator->GetActiveIndexList().end();
204 return m_NeighborhoodIterator->GetPixel(*m_ListIterator);
210 return m_NeighborhoodIterator->
GetOffset(*m_ListIterator);
213 typename IndexListType::value_type
216 return *m_ListIterator;
223 : m_NeighborhoodIterator(const_cast<
Self *>(s))
234 m_NeighborhoodIterator->SetPixel(*m_ListIterator, v);
272 using Superclass::GetImagePointer;
273 using Superclass::GetRadius;
274 using Superclass::GetIndex;
275 using Superclass::GetNeighborhoodIndex;
276 using Superclass::GetCenterNeighborhoodIndex;
277 using Superclass::GetRegion;
278 using Superclass::GetBeginIndex;
279 using Superclass::GoToBegin;
280 using Superclass::GoToEnd;
281 using Superclass::IsAtBegin;
282 using Superclass::IsAtEnd;
283 using Superclass::GetOffset;
284 using Superclass::operator==;
285 #ifndef ITK_EXPERIMENTAL_CXX20_REWRITTEN_UNEQUAL_OPERATOR
286 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::GetElement;
294 using Superclass::SetLocation;
295 using Superclass::GetCenterPointer;
296 using Superclass::GetCenterPixel;
297 using Superclass::OverrideBoundaryCondition;
298 using Superclass::ResetBoundaryCondition;
299 using Superclass::GetBoundaryCondition;
300 using Superclass::SetBoundaryCondition;
301 using Superclass::GetNeedToUseBoundaryCondition;
302 using Superclass::SetNeedToUseBoundaryCondition;
303 using Superclass::NeedToUseBoundaryConditionOn;
304 using Superclass::NeedToUseBoundaryConditionOff;
305 using Superclass::Print;
306 using Superclass::operator-;
307 using Superclass::GetPixel;
308 using Superclass::SetRegion;
316 Superclass::operator=(orig);
317 m_ActiveIndexList = orig.m_ActiveIndexList;
318 m_CenterIsActive = orig.m_CenterIsActive;
326 PrintSelf(std::ostream &,
Indent)
const override;
334 this->ActivateIndex(Superclass::GetNeighborhoodIndex(off));
339 this->DeactivateIndex(Superclass::GetNeighborhoodIndex(off));
345 template <
typename TOffsets>
349 for (
const auto & offset : offsets)
351 this->ActivateOffset(offset);
360 m_ActiveIndexList.clear();
361 m_CenterIsActive =
false;
366 const IndexListType &
369 return m_ActiveIndexList;
373 typename IndexListType::size_type
376 return m_ActiveIndexList.size();
382 template <
typename TNeighborPixel>
389 this->CreateActiveListFromNeighborhood<PixelType>(neighborhood);
407 operator+=(
const OffsetType &);
413 operator-=(
const OffsetType &);
416 using Superclass::SetPixel;
417 using Superclass::SetCenterPixel;
436 bool m_CenterIsActive{
false };
441 #ifndef ITK_MANUAL_INSTANTIATION
442 # include "itkConstShapedNeighborhoodIterator.hxx"