#include <itkNeighborhoodAllocator.h>
A memory allocator for use as the default allocator type in Neighborhood.
This is a memory allocator for use as the default allocator type in Neighborhood. The API is designed to mimic that of vnl_vector so that vnl_vector can also be used as an allocator for Neighborhood.
The decision to create this allocator with the vnl_vector api (versus using an STL allocator and wrapping the vnl_vector API) was made because the STL allocator API is not guaranteed stable at this time.
Definition at line 44 of file itkNeighborhoodAllocator.h.
 Collaboration diagram for itk::NeighborhoodAllocator< TPixel >:
 Collaboration diagram for itk::NeighborhoodAllocator< TPixel >:| Public Types | |
| using | const_iterator = const TPixel * | 
| using | iterator = TPixel * | 
| using | Self = NeighborhoodAllocator | 
| Public Member Functions | |
| void | Allocate (unsigned int n) | 
| const TPixel * | data () const noexcept | 
| TPixel * | data () noexcept | 
| void | Deallocate () | 
| NeighborhoodAllocator ()=default | |
| NeighborhoodAllocator (const Self &other) | |
| NeighborhoodAllocator (Self &&other) noexcept | |
| Self & | operator= (const Self &other) | 
| Self & | operator= (Self &&other) noexcept | 
| void | set_size (unsigned int n) | 
| ~NeighborhoodAllocator ()=default | |
| iterator | begin () | 
| const_iterator | begin () const | 
| iterator | end () | 
| const_iterator | end () const | 
| unsigned int | size () const | 
| const TPixel & | operator[] (unsigned int i) const | 
| TPixel & | operator[] (unsigned int i) | 
| Private Attributes | |
| std::unique_ptr< TPixel[]> | m_Data | 
| unsigned int | m_ElementCount { 0 } | 
| using itk::NeighborhoodAllocator< TPixel >::const_iterator = const TPixel * | 
Definition at line 55 of file itkNeighborhoodAllocator.h.
| using itk::NeighborhoodAllocator< TPixel >::iterator = TPixel * | 
Iterator support. Note that the naming of the type alias is on purpose. itk::Neighborhood makes reference to the allocator, which because it may be vnl or other type, uses the lower case/underscore forms iterator and const_iterator.
Definition at line 54 of file itkNeighborhoodAllocator.h.
| using itk::NeighborhoodAllocator< TPixel >::Self = NeighborhoodAllocator | 
Standard class type aliases.
Definition at line 48 of file itkNeighborhoodAllocator.h.
| 
 | default | 
Default constructor
Referenced by set_size().
| 
 | default | 
Defaulted destructor
| 
 | inline | 
Copy constructor.
Definition at line 80 of file itkNeighborhoodAllocator.h.
References m_Data, m_ElementCount, and itk::make_unique_for_overwrite().
| 
 | inlinenoexcept | 
Move-constructor.
Definition at line 89 of file itkNeighborhoodAllocator.h.
References m_ElementCount.
| 
 | inline | 
Allocates memory.
Definition at line 65 of file itkNeighborhoodAllocator.h.
References m_Data, m_ElementCount, and itk::make_unique_for_overwrite().
| 
 | inline | 
STL-style iterator support for the memory buffer.
Definition at line 124 of file itkNeighborhoodAllocator.h.
References m_Data.
Referenced by itk::operator<<(), and itk::operator==().
| 
 | inlinenodiscard | 
STL-style iterator support for the memory buffer.
Definition at line 129 of file itkNeighborhoodAllocator.h.
References m_Data.
| 
 | inlinenodiscardnoexcept | 
Definition at line 183 of file itkNeighborhoodAllocator.h.
References m_Data.
| 
 | inlinenoexcept | 
Definition at line 177 of file itkNeighborhoodAllocator.h.
References m_Data.
| 
 | inline | 
Deallocates memory.
Definition at line 73 of file itkNeighborhoodAllocator.h.
References m_Data, and m_ElementCount.
| 
 | inline | 
STL-style iterator support for the memory buffer.
Definition at line 134 of file itkNeighborhoodAllocator.h.
References m_Data, and m_ElementCount.
Referenced by itk::operator==().
| 
 | inlinenodiscard | 
STL-style iterator support for the memory buffer.
Definition at line 139 of file itkNeighborhoodAllocator.h.
References m_Data, and m_ElementCount.
| 
 | inline | 
Assignment operator.
Definition at line 98 of file itkNeighborhoodAllocator.h.
References m_Data, m_ElementCount, and set_size().
| 
 | inlinenoexcept | 
Move-assignment.
Definition at line 110 of file itkNeighborhoodAllocator.h.
References m_Data, and m_ElementCount.
| 
 | inline | 
| 
 | inline | 
| 
 | inline | 
Allocates a buffer of size n
Definition at line 166 of file itkNeighborhoodAllocator.h.
References m_Data, m_ElementCount, itk::make_unique_for_overwrite(), and NeighborhoodAllocator().
Referenced by operator=().
| 
 | inlinenodiscard | 
STL-style iterator support for the memory buffer.
Definition at line 144 of file itkNeighborhoodAllocator.h.
References m_ElementCount.
Referenced by itk::operator<<(), and itk::operator==().
| 
 | private | 
Definition at line 190 of file itkNeighborhoodAllocator.h.
Referenced by Allocate(), begin(), begin(), data(), data(), Deallocate(), end(), end(), NeighborhoodAllocator(), operator=(), operator=(), operator[](), operator[](), and set_size().
| 
 | private | 
Definition at line 189 of file itkNeighborhoodAllocator.h.
Referenced by Allocate(), Deallocate(), end(), end(), NeighborhoodAllocator(), NeighborhoodAllocator(), operator=(), operator=(), set_size(), and size().