ITK  4.4.0
Insight Segmentation and Registration Toolkit
Classes | Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Private Attributes | List of all members
itk::FixedArray< TValueType, VLength > Class Template Reference

#include <itkFixedArray.h>

+ Collaboration diagram for itk::FixedArray< TValueType, VLength >:

Detailed Description

template<typename TValueType, unsigned int VLength = 3>
class itk::FixedArray< TValueType, VLength >

Simulate a standard C array with copy semnatics.

Simulates a standard C array, except that copy semantics are used instead of reference semantics. Also, arrays of different sizes cannot be assigned to one another, and size information is known for function returns.

Template Parameters
TValueTypeElement type stored at each location in the array.
VLength= Length of the array.

The length of the array is fixed at compile time. If you wish to specify the length of the array at run-time, use the class itk::Array. If you wish to change to change the length of the array at run-time, you're best off using std::vector<>.

Wiki Examples:
Examples:
itkVectorImageTest.cxx.

Definition at line 50 of file itkFixedArray.h.

Classes

class  ConstReverseIterator
 
class  ReverseIterator
 

Public Types

typedef ValueType CArray [VLength]
 
typedef const ValueTypeconst_pointer
 
typedef const ValueTypeconst_reference
 
typedef const ValueTypeConstIterator
 
typedef ValueTypeIterator
 
typedef ValueTypepointer
 
typedef ValueTypereference
 
typedef unsigned int SizeType
 
typedef TValueType ValueType
 

Public Member Functions

Iterator Begin ()
 
ConstIterator Begin () const
 
Iterator End ()
 
ConstIterator End () const
 
void Fill (const ValueType &)
 
ValueTypeGetDataPointer ()
 
const ValueTypeGetDataPointer () const
 
bool operator!= (const FixedArray &r) const
 
FixedArrayoperator= (const ValueType r[VLength])
 
bool operator== (const FixedArray &r) const
 
ReverseIterator rBegin ()
 
ConstReverseIterator rBegin () const
 
ReverseIterator rEnd ()
 
ConstReverseIterator rEnd () const
 
SizeType Size () const
 
 FixedArray ()
 
 FixedArray (const ValueType r[VLength])
 
 FixedArray (const ValueType &r)
 
template<class TFixedArrayValueType >
 FixedArray (const FixedArray< TFixedArrayValueType, VLength > &r)
 
template<class TFixedArrayValueType >
FixedArrayoperator= (const FixedArray< TFixedArrayValueType, VLength > &r)
 
reference operator[] (short index)
 
const_reference operator[] (short index) const
 
reference operator[] (unsigned short index)
 
const_reference operator[] (unsigned short index) const
 
reference operator[] (int index)
 
const_reference operator[] (int index) const
 
reference operator[] (unsigned int index)
 
const_reference operator[] (unsigned int index) const
 
reference operator[] (long index)
 
const_reference operator[] (long index) const
 
reference operator[] (unsigned long index)
 
const_reference operator[] (unsigned long index) const
 
reference operator[] (long long index)
 
const_reference operator[] (long long index) const
 
reference operator[] (unsigned long long index)
 
const_reference operator[] (unsigned long long index) const
 
void SetElement (unsigned short index, const_reference value)
 
const_reference GetElement (unsigned short index) const
 

Static Public Member Functions

static FixedArray Filled (const ValueType &)
 

Static Public Attributes

static const unsigned int Dimension = VLength
 
static const unsigned int Length = VLength
 

Private Attributes

CArray m_InternalArray
 

Member Typedef Documentation

template<typename TValueType, unsigned int VLength = 3>
typedef ValueType itk::FixedArray< TValueType, VLength >::CArray[VLength]

A type representing the C-array version of this FixedArray.

Definition at line 63 of file itkFixedArray.h.

template<typename TValueType, unsigned int VLength = 3>
typedef const ValueType* itk::FixedArray< TValueType, VLength >::const_pointer

A const pointer to the ValueType.

Definition at line 121 of file itkFixedArray.h.

template<typename TValueType, unsigned int VLength = 3>
typedef const ValueType& itk::FixedArray< TValueType, VLength >::const_reference

A const reference to the ValueType.

Definition at line 127 of file itkFixedArray.h.

template<typename TValueType, unsigned int VLength = 3>
typedef const ValueType* itk::FixedArray< TValueType, VLength >::ConstIterator

A const iterator through the array.

Definition at line 69 of file itkFixedArray.h.

template<typename TValueType, unsigned int VLength = 3>
typedef ValueType* itk::FixedArray< TValueType, VLength >::Iterator

An iterator through the array.

Definition at line 66 of file itkFixedArray.h.

template<typename TValueType, unsigned int VLength = 3>
typedef ValueType* itk::FixedArray< TValueType, VLength >::pointer

A pointer to the ValueType.

Definition at line 118 of file itkFixedArray.h.

template<typename TValueType, unsigned int VLength = 3>
typedef ValueType& itk::FixedArray< TValueType, VLength >::reference

A reference to the ValueType.

Definition at line 124 of file itkFixedArray.h.

template<typename TValueType, unsigned int VLength = 3>
typedef unsigned int itk::FixedArray< TValueType, VLength >::SizeType

Definition at line 129 of file itkFixedArray.h.

template<typename TValueType, unsigned int VLength = 3>
typedef TValueType itk::FixedArray< TValueType, VLength >::ValueType

The element type stored at each location in the FixedArray.

Definition at line 60 of file itkFixedArray.h.

Constructor & Destructor Documentation

template<typename TValueType, unsigned int VLength = 3>
itk::FixedArray< TValueType, VLength >::FixedArray ( )

Constructors

template<typename TValueType, unsigned int VLength = 3>
itk::FixedArray< TValueType, VLength >::FixedArray ( const ValueType  r[VLength])

Constructors

template<typename TValueType, unsigned int VLength = 3>
itk::FixedArray< TValueType, VLength >::FixedArray ( const ValueType r)

Constructors

template<typename TValueType, unsigned int VLength = 3>
template<class TFixedArrayValueType >
itk::FixedArray< TValueType, VLength >::FixedArray ( const FixedArray< TFixedArrayValueType, VLength > &  r)
inline

Constructor to initialize a fixed array from another of any data type

Definition at line 140 of file itkFixedArray.h.

Member Function Documentation

template<typename TValueType, unsigned int VLength = 3>
Iterator itk::FixedArray< TValueType, VLength >::Begin ( )
template<typename TValueType, unsigned int VLength = 3>
ConstIterator itk::FixedArray< TValueType, VLength >::Begin ( ) const
template<typename TValueType, unsigned int VLength = 3>
Iterator itk::FixedArray< TValueType, VLength >::End ( )
template<typename TValueType, unsigned int VLength = 3>
ConstIterator itk::FixedArray< TValueType, VLength >::End ( ) const
template<typename TValueType, unsigned int VLength = 3>
void itk::FixedArray< TValueType, VLength >::Fill ( const ValueType )
template<typename TValueType, unsigned int VLength = 3>
static FixedArray itk::FixedArray< TValueType, VLength >::Filled ( const ValueType )
static
template<typename TValueType, unsigned int VLength = 3>
ValueType* itk::FixedArray< TValueType, VLength >::GetDataPointer ( )
inline
template<typename TValueType, unsigned int VLength = 3>
const ValueType* itk::FixedArray< TValueType, VLength >::GetDataPointer ( ) const
inline

Definition at line 224 of file itkFixedArray.h.

template<typename TValueType, unsigned int VLength = 3>
const_reference itk::FixedArray< TValueType, VLength >::GetElement ( unsigned short  index) const
inline

Set/Get element methods are more convenient in wrapping languages

Definition at line 215 of file itkFixedArray.h.

template<typename TValueType, unsigned int VLength = 3>
bool itk::FixedArray< TValueType, VLength >::operator!= ( const FixedArray< TValueType, VLength > &  r) const
inline

Definition at line 188 of file itkFixedArray.h.

template<typename TValueType, unsigned int VLength = 3>
template<class TFixedArrayValueType >
FixedArray& itk::FixedArray< TValueType, VLength >::operator= ( const FixedArray< TFixedArrayValueType, VLength > &  r)
inline

This destructor is not virtual for performance reasons. However, this means that subclasses cannot allocate memory.

The destructor is PURPOSELY NOT DEFINED, in order to prevent inefficient byte alignment of arrays of this object.

~FixedArray();

For a full discussion, see http://www.itk.org/mailman/private/insight-developers/2008-June/010480.htmlOperator= defined for a variety of types.

Definition at line 166 of file itkFixedArray.h.

Referenced by itk::SymmetricSecondRankTensor< TComponent, 3 >::operator=().

template<typename TValueType, unsigned int VLength = 3>
FixedArray& itk::FixedArray< TValueType, VLength >::operator= ( const ValueType  r[VLength])
template<typename TValueType, unsigned int VLength = 3>
bool itk::FixedArray< TValueType, VLength >::operator== ( const FixedArray< TValueType, VLength > &  r) const

Operators == and != are used to compare whether two arrays are equal. Note that arrays are equal when the number of components (size) is the same, and each component value is equal.

Referenced by itk::FixedArray< TScalarType, NPointDimension >::operator!=().

template<typename TValueType, unsigned int VLength = 3>
reference itk::FixedArray< TValueType, VLength >::operator[] ( short  index)
inline

Allow the FixedArray to be indexed normally. No bounds checking is done. The separate versions are a work-around for an integer conversion bug in Visual C++.

Definition at line 194 of file itkFixedArray.h.

template<typename TValueType, unsigned int VLength = 3>
const_reference itk::FixedArray< TValueType, VLength >::operator[] ( short  index) const
inline

Allow the FixedArray to be indexed normally. No bounds checking is done. The separate versions are a work-around for an integer conversion bug in Visual C++.

Definition at line 195 of file itkFixedArray.h.

template<typename TValueType, unsigned int VLength = 3>
reference itk::FixedArray< TValueType, VLength >::operator[] ( unsigned short  index)
inline

Allow the FixedArray to be indexed normally. No bounds checking is done. The separate versions are a work-around for an integer conversion bug in Visual C++.

Definition at line 196 of file itkFixedArray.h.

template<typename TValueType, unsigned int VLength = 3>
const_reference itk::FixedArray< TValueType, VLength >::operator[] ( unsigned short  index) const
inline

Allow the FixedArray to be indexed normally. No bounds checking is done. The separate versions are a work-around for an integer conversion bug in Visual C++.

Definition at line 197 of file itkFixedArray.h.

template<typename TValueType, unsigned int VLength = 3>
reference itk::FixedArray< TValueType, VLength >::operator[] ( int  index)
inline

Allow the FixedArray to be indexed normally. No bounds checking is done. The separate versions are a work-around for an integer conversion bug in Visual C++.

Definition at line 198 of file itkFixedArray.h.

template<typename TValueType, unsigned int VLength = 3>
const_reference itk::FixedArray< TValueType, VLength >::operator[] ( int  index) const
inline

Allow the FixedArray to be indexed normally. No bounds checking is done. The separate versions are a work-around for an integer conversion bug in Visual C++.

Definition at line 199 of file itkFixedArray.h.

template<typename TValueType, unsigned int VLength = 3>
reference itk::FixedArray< TValueType, VLength >::operator[] ( unsigned int  index)
inline

Allow the FixedArray to be indexed normally. No bounds checking is done. The separate versions are a work-around for an integer conversion bug in Visual C++.

Definition at line 200 of file itkFixedArray.h.

template<typename TValueType, unsigned int VLength = 3>
const_reference itk::FixedArray< TValueType, VLength >::operator[] ( unsigned int  index) const
inline

Allow the FixedArray to be indexed normally. No bounds checking is done. The separate versions are a work-around for an integer conversion bug in Visual C++.

Definition at line 201 of file itkFixedArray.h.

template<typename TValueType, unsigned int VLength = 3>
reference itk::FixedArray< TValueType, VLength >::operator[] ( long  index)
inline

Allow the FixedArray to be indexed normally. No bounds checking is done. The separate versions are a work-around for an integer conversion bug in Visual C++.

Definition at line 202 of file itkFixedArray.h.

template<typename TValueType, unsigned int VLength = 3>
const_reference itk::FixedArray< TValueType, VLength >::operator[] ( long  index) const
inline

Allow the FixedArray to be indexed normally. No bounds checking is done. The separate versions are a work-around for an integer conversion bug in Visual C++.

Definition at line 203 of file itkFixedArray.h.

template<typename TValueType, unsigned int VLength = 3>
reference itk::FixedArray< TValueType, VLength >::operator[] ( unsigned long  index)
inline

Allow the FixedArray to be indexed normally. No bounds checking is done. The separate versions are a work-around for an integer conversion bug in Visual C++.

Definition at line 204 of file itkFixedArray.h.

template<typename TValueType, unsigned int VLength = 3>
const_reference itk::FixedArray< TValueType, VLength >::operator[] ( unsigned long  index) const
inline

Allow the FixedArray to be indexed normally. No bounds checking is done. The separate versions are a work-around for an integer conversion bug in Visual C++.

Definition at line 205 of file itkFixedArray.h.

template<typename TValueType, unsigned int VLength = 3>
reference itk::FixedArray< TValueType, VLength >::operator[] ( long long  index)
inline

Allow the FixedArray to be indexed normally. No bounds checking is done. The separate versions are a work-around for an integer conversion bug in Visual C++.

Definition at line 206 of file itkFixedArray.h.

template<typename TValueType, unsigned int VLength = 3>
const_reference itk::FixedArray< TValueType, VLength >::operator[] ( long long  index) const
inline

Allow the FixedArray to be indexed normally. No bounds checking is done. The separate versions are a work-around for an integer conversion bug in Visual C++.

Definition at line 207 of file itkFixedArray.h.

template<typename TValueType, unsigned int VLength = 3>
reference itk::FixedArray< TValueType, VLength >::operator[] ( unsigned long long  index)
inline

Allow the FixedArray to be indexed normally. No bounds checking is done. The separate versions are a work-around for an integer conversion bug in Visual C++.

Definition at line 208 of file itkFixedArray.h.

template<typename TValueType, unsigned int VLength = 3>
const_reference itk::FixedArray< TValueType, VLength >::operator[] ( unsigned long long  index) const
inline

Allow the FixedArray to be indexed normally. No bounds checking is done. The separate versions are a work-around for an integer conversion bug in Visual C++.

Definition at line 209 of file itkFixedArray.h.

template<typename TValueType, unsigned int VLength = 3>
ReverseIterator itk::FixedArray< TValueType, VLength >::rBegin ( )
template<typename TValueType, unsigned int VLength = 3>
ConstReverseIterator itk::FixedArray< TValueType, VLength >::rBegin ( ) const
template<typename TValueType, unsigned int VLength = 3>
ReverseIterator itk::FixedArray< TValueType, VLength >::rEnd ( )
template<typename TValueType, unsigned int VLength = 3>
ConstReverseIterator itk::FixedArray< TValueType, VLength >::rEnd ( ) const
template<typename TValueType, unsigned int VLength = 3>
void itk::FixedArray< TValueType, VLength >::SetElement ( unsigned short  index,
const_reference  value 
)
inline

Set/Get element methods are more convenient in wrapping languages

Definition at line 213 of file itkFixedArray.h.

template<typename TValueType, unsigned int VLength = 3>
SizeType itk::FixedArray< TValueType, VLength >::Size ( ) const

Member Data Documentation

template<typename TValueType, unsigned int VLength = 3>
const unsigned int itk::FixedArray< TValueType, VLength >::Dimension = VLength
static

Dimension constant

Definition at line 57 of file itkFixedArray.h.

template<typename TValueType, unsigned int VLength = 3>
const unsigned int itk::FixedArray< TValueType, VLength >::Length = VLength
static

Length constant

Definition at line 54 of file itkFixedArray.h.

template<typename TValueType, unsigned int VLength = 3>
CArray itk::FixedArray< TValueType, VLength >::m_InternalArray
private

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