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 > >
184 {
return ( this->
operator[]( ( this->
Size() ) >> 1 ) ); }
237 std::slice
GetSlice(
unsigned int)
const;
284 template<
typename TPixel,
unsigned int VDimension,
typename TContainer >
285 std::ostream & operator<<(std::ostream & os, const Neighborhood< TPixel, VDimension, TContainer > & neighborhood)
287 os <<
"Neighborhood:" << std::endl;
288 os <<
" Radius:" << neighborhood.GetRadius() << std::endl;
289 os <<
" Size:" << neighborhood.GetSize() << std::endl;
290 os <<
" DataBuffer:" << neighborhood.GetBufferReference() << std::endl;
296 #ifndef ITK_MANUAL_INSTANTIATION
297 #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...
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