Orfeo Toolbox  4.0
Public Types | Public Member Functions | Protected Attributes | List of all members
itk::NeighborhoodAllocator< TPixel > Class Template Reference

A memory allocator for use as the default allocator type in Neighborhood. More...

#include <itkNeighborhoodAllocator.h>

+ Inheritance diagram for itk::NeighborhoodAllocator< TPixel >:
+ Collaboration diagram for itk::NeighborhoodAllocator< TPixel >:

Public Types

typedef const TPixel * const_iterator
 
typedef TPixel * iterator
 
typedef NeighborhoodAllocator Self
 

Public Member Functions

 NeighborhoodAllocator ()
 
 NeighborhoodAllocator (const Self &other)
 
 ~NeighborhoodAllocator ()
 
void Allocate (unsigned int n)
 
iterator begin ()
 
const_iterator begin () const
 
void Deallocate ()
 
iterator end ()
 
const_iterator end () const
 
bool operator!= (const Self &other) const
 
const Selfoperator= (const Self &other)
 
bool operator== (const Self &other) const
 
const TPixel & operator[] (unsigned int i) const
 
TPixel & operator[] (unsigned int i)
 
void set_size (unsigned int n)
 
unsigned int size () const
 

Protected Attributes

TPixel * m_Data
 
unsigned int m_ElementCount
 

Detailed Description

template<typename TPixel>
class itk::NeighborhoodAllocator< TPixel >

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 40 of file itkNeighborhoodAllocator.h.

Member Typedef Documentation

template<typename TPixel>
typedef const TPixel* itk::NeighborhoodAllocator< TPixel >::const_iterator

Definition at line 51 of file itkNeighborhoodAllocator.h.

template<typename TPixel>
typedef TPixel* itk::NeighborhoodAllocator< TPixel >::iterator

Iterator support. Note that the naming of the typedefs 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 50 of file itkNeighborhoodAllocator.h.

template<typename TPixel>
typedef NeighborhoodAllocator itk::NeighborhoodAllocator< TPixel >::Self

Standard class typedefs.

Definition at line 44 of file itkNeighborhoodAllocator.h.

Constructor & Destructor Documentation

template<typename TPixel>
itk::NeighborhoodAllocator< TPixel >::NeighborhoodAllocator ( )
inline

Default constructor

Definition at line 54 of file itkNeighborhoodAllocator.h.

template<typename TPixel>
itk::NeighborhoodAllocator< TPixel >::~NeighborhoodAllocator ( )
inline

Default destructor

Definition at line 57 of file itkNeighborhoodAllocator.h.

template<typename TPixel>
itk::NeighborhoodAllocator< TPixel >::NeighborhoodAllocator ( const Self other)
inline

Copy constructor.

Definition at line 75 of file itkNeighborhoodAllocator.h.

Member Function Documentation

template<typename TPixel>
void itk::NeighborhoodAllocator< TPixel >::Allocate ( unsigned int  n)
inline

Allocates memory using new()

Definition at line 61 of file itkNeighborhoodAllocator.h.

Referenced by itk::NeighborhoodAllocator< ScalarValueType >::set_size().

template<typename TPixel>
iterator itk::NeighborhoodAllocator< TPixel >::begin ( )
inline

STL-style iterator support for the memory buffer.

Definition at line 113 of file itkNeighborhoodAllocator.h.

Referenced by itk::operator<<().

template<typename TPixel>
const_iterator itk::NeighborhoodAllocator< TPixel >::begin ( ) const
inline

Definition at line 115 of file itkNeighborhoodAllocator.h.

template<typename TPixel>
void itk::NeighborhoodAllocator< TPixel >::Deallocate ( )
inline
template<typename TPixel>
iterator itk::NeighborhoodAllocator< TPixel >::end ( )
inline

Definition at line 117 of file itkNeighborhoodAllocator.h.

template<typename TPixel>
const_iterator itk::NeighborhoodAllocator< TPixel >::end ( ) const
inline

Definition at line 119 of file itkNeighborhoodAllocator.h.

template<typename TPixel>
bool itk::NeighborhoodAllocator< TPixel >::operator!= ( const Self other) const
inline

Not Equal operator.

Definition at line 107 of file itkNeighborhoodAllocator.h.

template<typename TPixel>
const Self& itk::NeighborhoodAllocator< TPixel >::operator= ( const Self other)
inline

Assignment operator.

Definition at line 86 of file itkNeighborhoodAllocator.h.

template<typename TPixel>
bool itk::NeighborhoodAllocator< TPixel >::operator== ( const Self other) const
inline

Comparison operator.

Definition at line 101 of file itkNeighborhoodAllocator.h.

template<typename TPixel>
const TPixel& itk::NeighborhoodAllocator< TPixel >::operator[] ( unsigned int  i) const
inline
template<typename TPixel>
TPixel& itk::NeighborhoodAllocator< TPixel >::operator[] ( unsigned int  i)
inline

Definition at line 127 of file itkNeighborhoodAllocator.h.

template<typename TPixel>
void itk::NeighborhoodAllocator< TPixel >::set_size ( unsigned int  n)
inline
template<typename TPixel>
unsigned int itk::NeighborhoodAllocator< TPixel >::size ( ) const
inline

Definition at line 121 of file itkNeighborhoodAllocator.h.

Referenced by itk::operator<<().

Member Data Documentation

template<typename TPixel>
TPixel* itk::NeighborhoodAllocator< TPixel >::m_Data
protected
template<typename TPixel>
unsigned int itk::NeighborhoodAllocator< TPixel >::m_ElementCount
protected

The documentation for this class was generated from the following file:

Generated at Sat Mar 8 2014 17:31:42 for Orfeo Toolbox with doxygen 1.8.3.1