ITK
5.2.0
Insight Toolkit
|
#include <itkNeighborhoodAllocator.h>
Public Types | |
using | const_iterator = const TPixel * |
using | iterator = TPixel * |
using | Self = NeighborhoodAllocator |
Public Member Functions | |
NeighborhoodAllocator ()=default | |
~NeighborhoodAllocator ()=default | |
unsigned int | m_ElementCount { 0 } |
std::unique_ptr< TPixel[]> | m_Data |
void | Allocate (unsigned int n) |
void | Deallocate () |
NeighborhoodAllocator (const Self &other) | |
NeighborhoodAllocator (Self &&other) noexcept | |
Self & | operator= (const Self &other) |
Self & | operator= (Self &&other) noexcept |
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) |
void | set_size (unsigned int n) |
TPixel * | data () noexcept |
const TPixel * | data () const noexcept |
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 43 of file itkNeighborhoodAllocator.h.
using itk::NeighborhoodAllocator< TPixel >::const_iterator = const TPixel * |
Definition at line 54 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 53 of file itkNeighborhoodAllocator.h.
using itk::NeighborhoodAllocator< TPixel >::Self = NeighborhoodAllocator |
Standard class type aliases.
Definition at line 47 of file itkNeighborhoodAllocator.h.
|
default |
Default constructor
Referenced by itk::NeighborhoodAllocator< ImageType ::InternalPixelType * >::set_size().
|
default |
Defaulted destructor
|
inline |
Copy constructor.
Definition at line 81 of file itkNeighborhoodAllocator.h.
|
inlinenoexcept |
Move-constructor.
Definition at line 90 of file itkNeighborhoodAllocator.h.
|
inline |
Allocates memory using new()
Definition at line 64 of file itkNeighborhoodAllocator.h.
|
inline |
STL-style iterator support for the memory buffer.
Definition at line 130 of file itkNeighborhoodAllocator.h.
Referenced by itk::operator<<(), and itk::operator==().
|
inline |
Allocates memory using new()
Definition at line 135 of file itkNeighborhoodAllocator.h.
|
inlinenoexcept |
Allocates memory using new()
Definition at line 181 of file itkNeighborhoodAllocator.h.
|
inlinenoexcept |
Allocates memory using new()
Definition at line 175 of file itkNeighborhoodAllocator.h.
|
inline |
Deallocates memory using delete[]().
Definition at line 73 of file itkNeighborhoodAllocator.h.
|
inline |
Allocates memory using new()
Definition at line 140 of file itkNeighborhoodAllocator.h.
Referenced by itk::operator==().
|
inline |
Allocates memory using new()
Definition at line 145 of file itkNeighborhoodAllocator.h.
|
inline |
Assignment operator.
Definition at line 101 of file itkNeighborhoodAllocator.h.
|
inlinenoexcept |
Move-assignment.
Definition at line 115 of file itkNeighborhoodAllocator.h.
|
inline |
Allocates memory using new()
Definition at line 158 of file itkNeighborhoodAllocator.h.
|
inline |
Data access methods
Definition at line 157 of file itkNeighborhoodAllocator.h.
|
inline |
Allocates a buffer of size n
Definition at line 163 of file itkNeighborhoodAllocator.h.
Referenced by itk::NeighborhoodAllocator< ImageType ::InternalPixelType * >::operator=().
|
inline |
Allocates memory using new()
Definition at line 150 of file itkNeighborhoodAllocator.h.
Referenced by itk::operator<<(), and itk::operator==().
|
private |
Allocates memory using new()
Definition at line 188 of file itkNeighborhoodAllocator.h.
Referenced by itk::NeighborhoodAllocator< ImageType ::InternalPixelType * >::Allocate(), itk::NeighborhoodAllocator< ImageType ::InternalPixelType * >::begin(), itk::NeighborhoodAllocator< ImageType ::InternalPixelType * >::data(), itk::NeighborhoodAllocator< ImageType ::InternalPixelType * >::Deallocate(), itk::NeighborhoodAllocator< ImageType ::InternalPixelType * >::end(), itk::NeighborhoodAllocator< ImageType ::InternalPixelType * >::NeighborhoodAllocator(), itk::NeighborhoodAllocator< ImageType ::InternalPixelType * >::operator=(), itk::NeighborhoodAllocator< ImageType ::InternalPixelType * >::operator[](), and itk::NeighborhoodAllocator< ImageType ::InternalPixelType * >::set_size().
|
private |
Allocates memory using new()
Definition at line 187 of file itkNeighborhoodAllocator.h.
Referenced by itk::NeighborhoodAllocator< ImageType ::InternalPixelType * >::Allocate(), itk::NeighborhoodAllocator< ImageType ::InternalPixelType * >::Deallocate(), itk::NeighborhoodAllocator< ImageType ::InternalPixelType * >::end(), itk::NeighborhoodAllocator< ImageType ::InternalPixelType * >::NeighborhoodAllocator(), itk::NeighborhoodAllocator< ImageType ::InternalPixelType * >::operator=(), itk::NeighborhoodAllocator< ImageType ::InternalPixelType * >::set_size(), and itk::NeighborhoodAllocator< ImageType ::InternalPixelType * >::size().