18#ifndef itkNeighborhood_h
19#define itkNeighborhood_h
25#include "vnl/vnl_vector.h"
53template <
typename TPixel,
unsigned int VDimension = 2,
typename TAllocator = NeighborhoodAllocator<TPixel>>
218 return (this->
operator[]((this->
Size()) >> 1));
256 const AllocatorType &
284 virtual NeighborIndexType
348template <
typename TPixel,
unsigned int VDimension,
typename TContainer>
352 os <<
"Neighborhood: " << std::endl;
353 os <<
" Radius: " << neighborhood.
GetRadius() << std::endl;
354 os <<
" Size: " << neighborhood.
GetSize() << std::endl;
361#ifndef ITK_MANUAL_INSTANTIATION
362# include "itkNeighborhood.hxx"
typename TImage::PixelType PixelType
Control indentation during Print() invocation.
const TPixel * const_iterator
A light-weight container object for storing an N-dimensional neighborhood of values.
itk::Size< VDimension > RadiusType
typename AllocatorType::iterator Iterator
ConstIterator Begin() const
static constexpr unsigned int NeighborhoodDimension
virtual void PrintSelf(std::ostream &, Indent) const
virtual void Allocate(NeighborIndexType i)
void SetRadius(const SizeValueType)
Neighborhood(Self &&)=default
virtual ~Neighborhood()=default
AllocatorType & GetBufferReference()
TPixel & operator[](const OffsetType &o)
Neighborhood(const Self &)=default
const TPixel & operator[](const OffsetType &o) const
TPixel GetCenterValue() const
TPixel & GetElement(NeighborIndexType i)
virtual void ComputeNeighborhoodOffsetTable()
std::vector< OffsetType > m_OffsetTable
OffsetType GetOffset(NeighborIndexType i) const
OffsetValueType m_StrideTable[VDimension]
itk::Size< VDimension > SizeType
NeighborhoodAllocator< InternalPixelType * > AllocatorType
Self & operator=(Self &&)=default
virtual void ComputeNeighborhoodStrideTable()
void Print(std::ostream &os) const
SizeValueType GetSize(DimensionValueType n) const
virtual NeighborIndexType GetNeighborhoodIndex(const OffsetType &) const
SliceIterator< InternalPixelType *, Self > SliceIteratorType
unsigned int DimensionValueType
SizeValueType GetRadius(DimensionValueType n) const
const TPixel & operator[](NeighborIndexType i) const
NeighborIndexType GetCenterNeighborhoodIndex() const
const AllocatorType & GetBufferReference() const
void SetRadius(const SizeValueType *rad)
ITK_UNEQUAL_OPERATOR_MEMBER_FUNCTION(Self)
void SetRadius(const SizeType &)
SizeValueType NeighborIndexType
typename AllocatorType::const_iterator ConstIterator
const SizeType GetRadius() const
TPixel & operator[](NeighborIndexType i)
NeighborIndexType Size() const
ConstIterator End() const
OffsetValueType GetStride(DimensionValueType axis) const
bool operator==(const Self &other) const
Self & operator=(const Self &)=default
typename SizeType::SizeValueType SizeValueType
Offset< VDimension > OffsetType
AllocatorType m_DataBuffer
std::slice GetSlice(unsigned int) const
A flexible iterator for itk containers(i.e. itk::Neighborhood) that support pixel access through oper...
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
unsigned long SizeValueType
ITKCommon_EXPORT std::ostream & operator<<(std::ostream &out, typename AnatomicalOrientation::CoordinateEnum value)
Represent a n-dimensional offset between two n-dimensional indexes of n-dimensional image.
Represent a n-dimensional size (bounds) of a n-dimensional image.
itk::SizeValueType SizeValueType
SizeValueType m_InternalArray[VDimension]