18#ifndef itkNeighborhoodAllocator_h
19#define itkNeighborhoodAllocator_h
43template <
typename TPixel>
67 m_Data = make_unique_for_overwrite<TPixel[]>(n);
93 ,
m_Data{ std::move(other.m_Data) }
95 other.m_ElementCount = 0;
121 m_Data = std::move(other.m_Data);
122 other.m_ElementCount = 0;
169 m_Data = make_unique_for_overwrite<TPixel[]>(n);
192template <
typename TPixel>
196 o <<
"NeighborhoodAllocator { this = " << &a <<
", begin = " <<
static_cast<const void *
>(a.
begin())
197 <<
", size=" << a.
size() <<
" }";
203template <
typename TPixel>
207 const unsigned int size = lhs.
size();
208 return (size == rhs.
size()) && ((size == 0) || std::equal(lhs.
begin(), lhs.
end(), rhs.
begin()));
212template <
typename TPixel>
216 return !(lhs == rhs);
Pixel-wise addition of two images.
A memory allocator for use as the default allocator type in Neighborhood.
void set_size(unsigned int n)
const_iterator end() const
const TPixel * data() const noexcept
Self & operator=(const Self &other)
NeighborhoodAllocator()=default
NeighborhoodAllocator(Self &&other) noexcept
TPixel & operator[](unsigned int i)
void Allocate(unsigned int n)
unsigned int size() const
const TPixel & operator[](unsigned int i) const
~NeighborhoodAllocator()=default
std::unique_ptr< TPixel[]> m_Data
const_iterator begin() const
Self & operator=(Self &&other) noexcept
const TPixel * const_iterator
NeighborhoodAllocator(const Self &other)
unsigned int m_ElementCount
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
ITKCommon_EXPORT std::ostream & operator<<(std::ostream &out, typename AnatomicalOrientation::CoordinateEnum value)
bool operator==(const Index< VDimension > &one, const Index< VDimension > &two)
bool operator!=(const Index< VDimension > &one, const Index< VDimension > &two)
auto make_unique_for_overwrite(const vcl_size_t numberOfElements)