|
ITK
6.0.0
Insight Toolkit
|
Go to the documentation of this file.
18 #ifndef itkNeighborhood_h
19 #define itkNeighborhood_h
25 #include "vnl/vnl_vector.h"
53 template <
typename TPixel,
unsigned int VDimension = 2,
typename TAllocator = NeighborhoodAllocator<TPixel>>
64 static constexpr
unsigned int NeighborhoodDimension = VDimension;
112 operator=(
const Self &) =
default;
116 operator=(
Self &&) =
default;
125 ITK_UNEQUAL_OPERATOR_MEMBER_FUNCTION(
Self);
139 return m_Radius.at(n);
163 return (axis < VDimension) ? m_StrideTable[axis] : 0;
170 return m_DataBuffer.end();
175 return m_DataBuffer.begin();
180 return m_DataBuffer.end();
185 return m_DataBuffer.begin();
193 return m_DataBuffer.size();
202 return m_DataBuffer[i];
210 return (this->
operator[]((this->
Size()) >> 1));
239 this->PrintSelf(os,
Indent(0));
248 const AllocatorType &
265 return m_OffsetTable[i];
268 virtual NeighborIndexType
269 GetNeighborhoodIndex(
const OffsetType &)
const;
274 return static_cast<NeighborIndexType>(this->
Size() / 2);
278 GetSlice(
unsigned int)
const;
287 m_Size[i] = m_Radius[i] * 2 + 1;
296 m_DataBuffer.set_size(i);
301 PrintSelf(std::ostream &,
Indent)
const;
305 ComputeNeighborhoodStrideTable();
310 ComputeNeighborhoodOffsetTable();
329 std::vector<OffsetType> m_OffsetTable{};
332 template <
typename TPixel,
unsigned int VDimension,
typename TContainer>
336 os <<
"Neighborhood: " << std::endl;
337 os <<
" Radius: " << neighborhood.
GetRadius() << std::endl;
338 os <<
" Size: " << neighborhood.
GetSize() << std::endl;
345 #ifndef ITK_MANUAL_INSTANTIATION
346 # include "itkNeighborhood.hxx"
const AllocatorType & GetBufferReference() const
const TPixel & operator[](NeighborIndexType i) const
typename NeighborhoodType::NeighborIndexType NeighborIndexType
Represent a n-dimensional size (bounds) of a n-dimensional image.
typename ImageType ::PixelType PixelType
A flexible iterator for itk containers(i.e. itk::Neighborhood) that support pixel access through oper...
NeighborIndexType Size() const
OffsetValueType GetStride(DimensionValueType axis) const
void SetRadius(const SizeValueType *rad)
SizeValueType GetRadius(DimensionValueType n) const
A light-weight container object for storing an N-dimensional neighborhood of values.
ImageBaseType::SizeType SizeType
typename AllocatorType::const_iterator ConstIterator
ITKCommon_EXPORT std::ostream & operator<<(std::ostream &out, typename AnatomicalOrientation::CoordinateEnum value)
typename SizeType::SizeValueType SizeValueType
Control indentation during Print() invocation.
AllocatorType m_DataBuffer
SizeValueType GetSize(DimensionValueType n) const
AllocatorType & GetBufferReference()
TPixel & operator[](NeighborIndexType i)
typename SizeType::SizeValueType SizeValueType
const SizeType GetRadius() const
unsigned int DimensionValueType
bool operator==(const Self &other) const
const ImageType ::InternalPixelType * * const_iterator
Represent a n-dimensional offset between two n-dimensional indexes of n-dimensional image.
OffsetType GetOffset(NeighborIndexType i) const
void Print(std::ostream &os) const
SizeValueType m_InternalArray[VDimension]
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
TPixel GetCenterValue() const
Const version of NeighborhoodIterator, defining iteration of a local N-dimensional neighborhood of pi...
TPixel & GetElement(NeighborIndexType i)
virtual void Allocate(NeighborIndexType i)
SizeValueType NeighborIndexType
NeighborIndexType GetCenterNeighborhoodIndex() const
TPixel & operator[](const OffsetType &o)
const TPixel & operator[](const OffsetType &o) const
typename AllocatorType::iterator Iterator
unsigned long SizeValueType
ImageType ::InternalPixelType * * iterator