18 #ifndef itkNeighborhood_h
19 #define itkNeighborhood_h
25 #include "vnl/vnl_vector.h"
53 template<
typename TPixel,
unsigned int VDimension = 2,
54 typename TAllocator = NeighborhoodAllocator< TPixel > >
187 {
return ( this->
operator[]( ( this->
Size() ) >> 1 ) ); }
240 std::slice
GetSlice(
unsigned int)
const;
287 template<
typename TPixel,
unsigned int VDimension,
typename TContainer >
288 std::ostream & operator<<(std::ostream & os, const Neighborhood< TPixel, VDimension, TContainer > & neighborhood)
290 os <<
"Neighborhood:" << std::endl;
291 os <<
" Radius:" << neighborhood.GetRadius() << std::endl;
292 os <<
" Size:" << neighborhood.GetSize() << std::endl;
293 os <<
" DataBuffer:" << neighborhood.GetBufferReference() << std::endl;
299 #ifndef ITK_MANUAL_INSTANTIATION
300 #include "itkNeighborhood.hxx"
virtual void ComputeNeighborhoodOffsetTable()
typedef::itk::Size< VDimension > RadiusType
ConstIterator Begin() const
signed long OffsetValueType
A light-weight container object for storing an N-dimensional neighborhood of values.
Self & operator=(const Self &other)
TPixel & operator[](NeighborIndexType i)
virtual NeighborIndexType GetNeighborhoodIndex(const OffsetType &) const
OffsetValueType GetStride(DimensionValueType axis) const
SizeValueType GetSize(DimensionValueType n) const
const AllocatorType & GetBufferReference() const
virtual void Allocate(NeighborIndexType i)
const char * const_iterator
unsigned long SizeValueType
unsigned int DimensionValueType
NeighborIndexType Size() const
virtual void PrintSelf(std::ostream &, Indent) const
OffsetType GetOffset(NeighborIndexType i) const
Offset< VDimension > OffsetType
TPixel & GetElement(NeighborIndexType i)
typedef::itk::Size< VDimension > SizeType
std::slice GetSlice(unsigned int) const
const SizeType GetRadius() const
OffsetValueType m_StrideTable[VDimension]
bool operator==(const Self &other) const
A flexible iterator for itk containers(i.e. itk::Neighborhood) that support pixel access through oper...
itkTypeMacroNoParent(Neighborhood)
static const unsigned int NeighborhoodDimension
const TPixel & operator[](const OffsetType &o) const
TPixel GetCenterValue() const
const TPixel & operator[](NeighborIndexType i) const
AllocatorType::iterator Iterator
AllocatorType m_DataBuffer
void SetRadius(const SizeValueType *rad)
NeighborIndexType GetCenterNeighborhoodIndex() const
Control indentation during Print() invocation.
AllocatorType::const_iterator ConstIterator
bool operator!=(const Self &other) const
SizeType::SizeValueType SizeValueType
std::vector< OffsetType > m_OffsetTable
SizeValueType GetRadius(DimensionValueType n) const
void SetRadius(const SizeType &)
void Print(std::ostream &os) const
ConstIterator End() const
TPixel & operator[](const OffsetType &o)
AllocatorType & GetBufferReference()
virtual void ComputeNeighborhoodStrideTable()
SliceIterator< TPixel, Self > SliceIteratorType
SizeValueType NeighborIndexType