ITK
5.0.0
Insight Segmentation and Registration Toolkit
|
#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 42 of file itkNeighborhoodAllocator.h.
Public Types | |
using | const_iterator = const TPixel * |
using | iterator = TPixel * |
using | Self = NeighborhoodAllocator |
Public Member Functions | |
NeighborhoodAllocator () | |
NeighborhoodAllocator (const Self &other) | |
NeighborhoodAllocator (Self &&other) noexcept | |
~NeighborhoodAllocator () | |
void | Allocate (unsigned int n) |
void | Deallocate () |
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) |
Protected Attributes | |
TPixel * | m_Data |
unsigned int | m_ElementCount {0} |
using itk::NeighborhoodAllocator< TPixel >::const_iterator = const TPixel * |
Definition at line 53 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 52 of file itkNeighborhoodAllocator.h.
using itk::NeighborhoodAllocator< TPixel >::Self = NeighborhoodAllocator |
Standard class type aliases.
Definition at line 46 of file itkNeighborhoodAllocator.h.
|
inline |
Default constructor
Definition at line 56 of file itkNeighborhoodAllocator.h.
|
inline |
Default destructor
Definition at line 59 of file itkNeighborhoodAllocator.h.
|
inline |
Copy constructor.
Definition at line 79 of file itkNeighborhoodAllocator.h.
|
inlinenoexcept |
Move-constructor.
Definition at line 88 of file itkNeighborhoodAllocator.h.
|
inline |
Allocates memory using new()
Definition at line 63 of file itkNeighborhoodAllocator.h.
Referenced by itk::NeighborhoodAllocator< InputImagePixelType >::set_size().
|
inline |
STL-style iterator support for the memory buffer.
Definition at line 128 of file itkNeighborhoodAllocator.h.
Referenced by itk::operator<<(), and itk::operator==().
|
inline |
STL-style iterator support for the memory buffer.
Definition at line 130 of file itkNeighborhoodAllocator.h.
|
inline |
Deallocates memory using delete[]().
Definition at line 71 of file itkNeighborhoodAllocator.h.
Referenced by itk::NeighborhoodAllocator< InputImagePixelType >::operator=(), itk::NeighborhoodAllocator< InputImagePixelType >::set_size(), and itk::NeighborhoodAllocator< InputImagePixelType >::~NeighborhoodAllocator().
|
inline |
STL-style iterator support for the memory buffer.
Definition at line 132 of file itkNeighborhoodAllocator.h.
Referenced by itk::operator==().
|
inline |
STL-style iterator support for the memory buffer.
Definition at line 134 of file itkNeighborhoodAllocator.h.
|
inline |
Assignment operator.
Definition at line 99 of file itkNeighborhoodAllocator.h.
|
inlinenoexcept |
Move-assignment.
Definition at line 112 of file itkNeighborhoodAllocator.h.
|
inline |
Data access methods
Definition at line 141 of file itkNeighborhoodAllocator.h.
|
inline |
Data access methods
Definition at line 143 of file itkNeighborhoodAllocator.h.
|
inline |
Allocates or Reallocates a buffer of size n
Definition at line 148 of file itkNeighborhoodAllocator.h.
Referenced by itk::NeighborhoodAllocator< InputImagePixelType >::operator=().
|
inline |
STL-style iterator support for the memory buffer.
Definition at line 136 of file itkNeighborhoodAllocator.h.
Referenced by itk::operator<<(), and itk::operator==().
|
protected |
Definition at line 163 of file itkNeighborhoodAllocator.h.
Referenced by itk::NeighborhoodAllocator< InputImagePixelType >::Allocate(), itk::NeighborhoodAllocator< InputImagePixelType >::begin(), itk::NeighborhoodAllocator< InputImagePixelType >::Deallocate(), itk::NeighborhoodAllocator< InputImagePixelType >::end(), itk::NeighborhoodAllocator< InputImagePixelType >::NeighborhoodAllocator(), itk::NeighborhoodAllocator< InputImagePixelType >::operator=(), itk::NeighborhoodAllocator< InputImagePixelType >::operator[](), and itk::NeighborhoodAllocator< InputImagePixelType >::set_size().
|
protected |
Definition at line 162 of file itkNeighborhoodAllocator.h.
Referenced by itk::NeighborhoodAllocator< InputImagePixelType >::Allocate(), itk::NeighborhoodAllocator< InputImagePixelType >::Deallocate(), itk::NeighborhoodAllocator< InputImagePixelType >::end(), itk::NeighborhoodAllocator< InputImagePixelType >::NeighborhoodAllocator(), itk::NeighborhoodAllocator< InputImagePixelType >::operator=(), itk::NeighborhoodAllocator< InputImagePixelType >::set_size(), and itk::NeighborhoodAllocator< InputImagePixelType >::size().