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

itk::Array< TValueType > Class Template Reference
[Data Representation Objects]

Array class with size defined at construction time. More...

#include <itkArray.h>

Inheritance diagram for itk::Array< TValueType >:

Inheritance graph
[legend]
Collaboration diagram for itk::Array< TValueType >:

Collaboration graph
[legend]
List of all members.

Public Types

typedef TValueType ValueType

Public Member Functions

 Array ()
 Array (unsigned int dimension)
void Fill (TValueType const &v)
const TValueType & GetElement (unsigned int i) const
void SetElement (unsigned int i, const TValueType &value)
 ~Array ()
unsigned int Size (void) const
unsigned int GetNumberOfElements (void) const
void SetSize (unsigned int sz)
unsigned int GetSize (void) const

Detailed Description

template<typename TValueType>
class itk::Array< TValueType >

Array class with size defined at construction time.

This class derives from the vnl_vector<> class. Its size is assigned at construction time (run time) and can not be changed afterwards except by using assignment to another Array.

The class is templated over the type of the elements.

Template parameters for class Array:

Definition at line 44 of file itkArray.h.


Member Typedef Documentation

template<typename TValueType>
typedef TValueType itk::Array< TValueType >::ValueType
 

The element type stored at each location in the Array. Definition at line 49 of file itkArray.h.


Constructor & Destructor Documentation

template<typename TValueType>
itk::Array< TValueType >::Array  ) 
 

Default constructor. It is created with an empty array it has to be allocated later by assignment

template<typename TValueType>
itk::Array< TValueType >::Array unsigned int  dimension  ) 
 

Constructor with size. Size can only be changed by assignment

template<typename TValueType>
itk::Array< TValueType >::~Array  )  [inline]
 

This destructor is not virtual for performance reasons. However, this means that subclasses cannot allocate memory. Definition at line 86 of file itkArray.h.


Member Function Documentation

template<typename TValueType>
void itk::Array< TValueType >::Fill TValueType const &  v  )  [inline]
 

Set the all the elements of the array to the specified value Definition at line 61 of file itkArray.h.

template<typename TValueType>
const TValueType& itk::Array< TValueType >::GetElement unsigned int  i  )  const [inline]
 

Get one element Definition at line 71 of file itkArray.h.

template<typename TValueType>
unsigned int itk::Array< TValueType >::GetNumberOfElements void   )  const [inline]
 

Return the number of elements in the Array Definition at line 66 of file itkArray.h.

template<typename TValueType>
unsigned int itk::Array< TValueType >::GetSize void   )  const [inline]
 

Destructively set the size to that given. Will lose data. Definition at line 80 of file itkArray.h.

template<typename TValueType>
void itk::Array< TValueType >::SetElement unsigned int  i,
const TValueType &  value
[inline]
 

Set one element Definition at line 75 of file itkArray.h.

template<typename TValueType>
void itk::Array< TValueType >::SetSize unsigned int  sz  ) 
 

Destructively set the size to that given. Will lose data.

template<typename TValueType>
unsigned int itk::Array< TValueType >::Size void   )  const [inline]
 

Return the number of elements in the Array Definition at line 64 of file itkArray.h.


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