Main Page   Groups   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Concepts

itk::NeighborhoodAllocator< TPixel > Class Template Reference
[Operators]

#include <itkNeighborhoodAllocator.h>

Collaboration diagram for itk::NeighborhoodAllocator< TPixel >:

Collaboration graph
[legend]
List of all members.

Public Types

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

Public Member Functions

 NeighborhoodAllocator ()
 ~NeighborhoodAllocator ()
bool operator== (const Self &other) const
bool operator!= (const Self &other) const
void Allocate (unsigned int n)
void Deallocate ()
 NeighborhoodAllocator (const Self &other)
const Selfoperator= (const Self &other)
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

unsigned int m_ElementCount
TPixel * m_Data

Detailed Description

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

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


Member Typedef Documentation

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

Definition at line 46 of file itkNeighborhoodAllocator.h.

Referenced by itk::NeighborhoodAllocator< TPixel >::begin().

template<class 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 45 of file itkNeighborhoodAllocator.h.

Referenced by itk::NeighborhoodAllocator< TPixel >::begin(), and itk::NeighborhoodAllocator< TPixel >::operator!=().

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

Standard class typedefs. Definition at line 39 of file itkNeighborhoodAllocator.h.

Referenced by itk::NeighborhoodAllocator< TPixel >::operator==().


Constructor & Destructor Documentation

template<class TPixel>
itk::NeighborhoodAllocator< TPixel >::NeighborhoodAllocator  )  [inline]
 

Default constructor Definition at line 49 of file itkNeighborhoodAllocator.h.

References itk::NeighborhoodAllocator< TPixel >::m_Data, and itk::NeighborhoodAllocator< TPixel >::m_ElementCount.

template<class TPixel>
itk::NeighborhoodAllocator< TPixel >::~NeighborhoodAllocator  )  [inline]
 

Default destructor Definition at line 52 of file itkNeighborhoodAllocator.h.

References itk::NeighborhoodAllocator< TPixel >::Deallocate().

template<class TPixel>
itk::NeighborhoodAllocator< TPixel >::NeighborhoodAllocator const Self other  )  [inline]
 

Copy constructor. Definition at line 72 of file itkNeighborhoodAllocator.h.

References itk::NeighborhoodAllocator< TPixel >::m_ElementCount.


Member Function Documentation

template<class TPixel>
void itk::NeighborhoodAllocator< TPixel >::Allocate unsigned int  n  )  [inline]
 

Allocates memory using new() Definition at line 56 of file itkNeighborhoodAllocator.h.

References itk::NeighborhoodAllocator< TPixel >::m_Data, and itk::NeighborhoodAllocator< TPixel >::m_ElementCount.

Referenced by itk::NeighborhoodAllocator< TPixel >::operator[]().

template<class TPixel>
const_iterator itk::NeighborhoodAllocator< TPixel >::begin  )  const [inline]
 

STL-style iterator support for the memory buffer. Definition at line 107 of file itkNeighborhoodAllocator.h.

References itk::NeighborhoodAllocator< TPixel >::const_iterator, itk::NeighborhoodAllocator< TPixel >::m_Data, and itk::NeighborhoodAllocator< TPixel >::m_ElementCount.

template<class TPixel>
iterator itk::NeighborhoodAllocator< TPixel >::begin  )  [inline]
 

STL-style iterator support for the memory buffer. Definition at line 105 of file itkNeighborhoodAllocator.h.

References itk::NeighborhoodAllocator< TPixel >::iterator, itk::NeighborhoodAllocator< TPixel >::m_Data, and itk::NeighborhoodAllocator< TPixel >::m_ElementCount.

template<class TPixel>
void itk::NeighborhoodAllocator< TPixel >::Deallocate  )  [inline]
 

Deallocates memory using delete[](). Definition at line 64 of file itkNeighborhoodAllocator.h.

References itk::NeighborhoodAllocator< TPixel >::m_Data, and itk::NeighborhoodAllocator< TPixel >::m_ElementCount.

Referenced by itk::NeighborhoodAllocator< TPixel >::operator[](), and itk::NeighborhoodAllocator< TPixel >::~NeighborhoodAllocator().

template<class TPixel>
const_iterator itk::NeighborhoodAllocator< TPixel >::end  )  const [inline]
 

STL-style iterator support for the memory buffer. Definition at line 111 of file itkNeighborhoodAllocator.h.

template<class TPixel>
iterator itk::NeighborhoodAllocator< TPixel >::end  )  [inline]
 

STL-style iterator support for the memory buffer. Definition at line 109 of file itkNeighborhoodAllocator.h.

References itk::NeighborhoodAllocator< TPixel >::m_ElementCount.

template<class TPixel>
bool itk::NeighborhoodAllocator< TPixel >::operator!= const Self other  )  const [inline]
 

Not Equal operator. Definition at line 99 of file itkNeighborhoodAllocator.h.

References itk::NeighborhoodAllocator< TPixel >::iterator, and itk::NeighborhoodAllocator< TPixel >::m_Data.

template<class TPixel>
const Self& itk::NeighborhoodAllocator< TPixel >::operator= const Self other  )  [inline]
 

Assignment operator. Definition at line 82 of file itkNeighborhoodAllocator.h.

References itk::NeighborhoodAllocator< TPixel >::m_ElementCount.

template<class TPixel>
bool itk::NeighborhoodAllocator< TPixel >::operator== const Self other  )  const [inline]
 

Comparison operator. Definition at line 93 of file itkNeighborhoodAllocator.h.

References itk::NeighborhoodAllocator< TPixel >::m_Data, and itk::NeighborhoodAllocator< TPixel >::Self.

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

Data access methods Definition at line 120 of file itkNeighborhoodAllocator.h.

References itk::NeighborhoodAllocator< TPixel >::Allocate(), itk::NeighborhoodAllocator< TPixel >::Deallocate(), and itk::NeighborhoodAllocator< TPixel >::m_Data.

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

Data access methods Definition at line 118 of file itkNeighborhoodAllocator.h.

template<class TPixel>
void itk::NeighborhoodAllocator< TPixel >::set_size unsigned int  n  )  [inline]
 

Allocates or Reallocates a buffer of size n Definition at line 125 of file itkNeighborhoodAllocator.h.

References itk::NeighborhoodAllocator< TPixel >::m_Data, and itk::NeighborhoodAllocator< TPixel >::m_ElementCount.

template<class TPixel>
unsigned int itk::NeighborhoodAllocator< TPixel >::size void   )  const [inline]
 

STL-style iterator support for the memory buffer. Definition at line 113 of file itkNeighborhoodAllocator.h.

References itk::NeighborhoodAllocator< TPixel >::m_Data.


Member Data Documentation

template<class TPixel>
TPixel* itk::NeighborhoodAllocator< TPixel >::m_Data [protected]
 

Definition at line 134 of file itkNeighborhoodAllocator.h.

Referenced by itk::NeighborhoodAllocator< TPixel >::Allocate(), itk::NeighborhoodAllocator< TPixel >::begin(), itk::NeighborhoodAllocator< TPixel >::Deallocate(), itk::NeighborhoodAllocator< TPixel >::NeighborhoodAllocator(), itk::NeighborhoodAllocator< TPixel >::operator!=(), itk::NeighborhoodAllocator< TPixel >::operator==(), itk::NeighborhoodAllocator< TPixel >::operator[](), itk::NeighborhoodAllocator< TPixel >::set_size(), and itk::NeighborhoodAllocator< TPixel >::size().

template<class TPixel>
unsigned int itk::NeighborhoodAllocator< TPixel >::m_ElementCount [protected]
 

Definition at line 133 of file itkNeighborhoodAllocator.h.

Referenced by itk::NeighborhoodAllocator< TPixel >::Allocate(), itk::NeighborhoodAllocator< TPixel >::begin(), itk::NeighborhoodAllocator< TPixel >::Deallocate(), itk::NeighborhoodAllocator< TPixel >::end(), itk::NeighborhoodAllocator< TPixel >::NeighborhoodAllocator(), itk::NeighborhoodAllocator< TPixel >::operator=(), and itk::NeighborhoodAllocator< TPixel >::set_size().


The documentation for this class was generated from the following file:
Generated at Sun Apr 1 03:10:50 2007 for ITK by doxygen 1.3.8 written by Dimitri van Heesch, © 1997-2000