Classes | Public Types | Public Member Functions | Static Public Member Functions | Private Attributes

cmtk::FixedVector< NDIM, T > Class Template Reference

Class for n-dimensional image index. More...

#include <cmtkFixedVector.h>

Collaboration diagram for cmtk::FixedVector< NDIM, T >:
Collaboration graph
[legend]

List of all members.

Classes

class  Init
 Initialization class: use this to select initialization constructor. More...

Public Types

typedef FixedVector< NDIM, T > Self
 This class.
typedef T ValueType
 Type of the stored values.
typedef SmartPointer< SelfSmartPtr
 Smart pointer to this class.
typedef SmartConstPointer< SelfSmartConstPtr
 Smart pointer-to-const to this class.

Public Member Functions

 FixedVector ()
 Default constructor.
 FixedVector (const typename Self::Init &init)
 Initialization constructor.
template<class T2 >
 FixedVector (const T2 *const ptr)
 Constructor from const pointer.
template<class T2 >
 FixedVector (const FixedVector< NDIM, T2 > &rhs)
 Type conversion constructor template.
T & operator[] (const size_t i)
 Get element reference.
const T & operator[] (const size_t i) const
 Get const element reference.
Selfoperator+= (const Self &rhs)
 In-place addition operator.
Selfoperator-= (const Self &rhs)
 In-place subtraction operator.
bool operator== (const Self &rhs) const
 Equality operator.
Selfoperator*= (const T a)
 Multiply by a scalar.
Selfoperator*= (const Self &rhs)
 Elementwise multiplication with another vector.
Selfoperator/= (const T a)
 Divide by a scalar.
Selfoperator/= (const Self &rhs)
 Elementwise dvision with another vector.
const Self operator- ()
 Unary minus.
T * begin ()
 Pointer to first array element.
T * end ()
 Pointer behind last array element.
const T * begin () const
 Pointer to first array element.
const T * end () const
 Pointer behind last array element.
MaxValue () const
 Maximum value.
MinValue () const
 Minimum value.
Sum () const
 Calculate sum of vector elements.
Product () const
 Calculate product of vector elements.
SumOfSquares () const
 Calculate sum of squares of vector elements (that is, square of Euclid's norm).
MaxAbsValue () const
 Calculate maximum absolute value in the vector.
RootSumOfSquares () const
 Shorthand for root of sum of squares (i.e., Euclid's norm)

Static Public Member Functions

static const Self Zero ()
 Zero operator.

Private Attributes

m_Data [NDIM]
 The actual index array.

Detailed Description

template<size_t NDIM, typename T = int>
class cmtk::FixedVector< NDIM, T >

Class for n-dimensional image index.

Definition at line 49 of file cmtkFixedVector.h.


Member Typedef Documentation

template<size_t NDIM, typename T = int>
typedef FixedVector<NDIM,T> cmtk::FixedVector< NDIM, T >::Self

This class.

Definition at line 53 of file cmtkFixedVector.h.

template<size_t NDIM, typename T = int>
typedef SmartConstPointer<Self> cmtk::FixedVector< NDIM, T >::SmartConstPtr

Smart pointer-to-const to this class.

Definition at line 62 of file cmtkFixedVector.h.

template<size_t NDIM, typename T = int>
typedef SmartPointer<Self> cmtk::FixedVector< NDIM, T >::SmartPtr

Smart pointer to this class.

Definition at line 59 of file cmtkFixedVector.h.

template<size_t NDIM, typename T = int>
typedef T cmtk::FixedVector< NDIM, T >::ValueType

Type of the stored values.

Definition at line 56 of file cmtkFixedVector.h.


Constructor & Destructor Documentation

template<size_t NDIM, typename T = int>
cmtk::FixedVector< NDIM, T >::FixedVector (  ) [inline]

Default constructor.

Definition at line 73 of file cmtkFixedVector.h.

template<size_t NDIM, typename T = int>
cmtk::FixedVector< NDIM, T >::FixedVector ( const typename Self::Init init ) [inline, explicit]

Initialization constructor.

Definition at line 87 of file cmtkFixedVector.h.

template<size_t NDIM, typename T = int>
template<class T2 >
cmtk::FixedVector< NDIM, T >::FixedVector ( const T2 *const   ptr ) [inline, explicit]

Constructor from const pointer.

Definition at line 94 of file cmtkFixedVector.h.

template<size_t NDIM, typename T = int>
template<class T2 >
cmtk::FixedVector< NDIM, T >::FixedVector ( const FixedVector< NDIM, T2 > &  rhs ) [inline]

Type conversion constructor template.

Definition at line 102 of file cmtkFixedVector.h.


Member Function Documentation

template<size_t NDIM, typename T = int>
T* cmtk::FixedVector< NDIM, T >::begin (  ) [inline]
template<size_t NDIM, typename T = int>
const T* cmtk::FixedVector< NDIM, T >::begin (  ) const [inline]

Pointer to first array element.

Definition at line 200 of file cmtkFixedVector.h.

template<size_t NDIM, typename T = int>
T* cmtk::FixedVector< NDIM, T >::end (  ) [inline]
template<size_t NDIM, typename T = int>
const T* cmtk::FixedVector< NDIM, T >::end (  ) const [inline]

Pointer behind last array element.

Definition at line 206 of file cmtkFixedVector.h.

template<size_t NDIM, typename T = int>
T cmtk::FixedVector< NDIM, T >::MaxAbsValue (  ) const [inline]

Calculate maximum absolute value in the vector.

Definition at line 254 of file cmtkFixedVector.h.

Referenced by cmtk::VolumeFromSlices::CheckImage().

template<size_t NDIM, typename T = int>
T cmtk::FixedVector< NDIM, T >::MaxValue (  ) const [inline]

Maximum value.

Definition at line 212 of file cmtkFixedVector.h.

Referenced by cmtk::AffineXform::GetParamStep().

template<size_t NDIM, typename T = int>
T cmtk::FixedVector< NDIM, T >::MinValue (  ) const [inline]

Minimum value.

Definition at line 218 of file cmtkFixedVector.h.

template<size_t NDIM, typename T = int>
Self& cmtk::FixedVector< NDIM, T >::operator*= ( const Self rhs ) [inline]

Elementwise multiplication with another vector.

Definition at line 154 of file cmtkFixedVector.h.

template<size_t NDIM, typename T = int>
Self& cmtk::FixedVector< NDIM, T >::operator*= ( const T  a ) [inline]

Multiply by a scalar.

Definition at line 146 of file cmtkFixedVector.h.

template<size_t NDIM, typename T = int>
Self& cmtk::FixedVector< NDIM, T >::operator+= ( const Self rhs ) [inline]

In-place addition operator.

Definition at line 121 of file cmtkFixedVector.h.

template<size_t NDIM, typename T = int>
const Self cmtk::FixedVector< NDIM, T >::operator- (  ) [inline]

Unary minus.

Definition at line 178 of file cmtkFixedVector.h.

template<size_t NDIM, typename T = int>
Self& cmtk::FixedVector< NDIM, T >::operator-= ( const Self rhs ) [inline]

In-place subtraction operator.

Definition at line 129 of file cmtkFixedVector.h.

template<size_t NDIM, typename T = int>
Self& cmtk::FixedVector< NDIM, T >::operator/= ( const T  a ) [inline]

Divide by a scalar.

Definition at line 162 of file cmtkFixedVector.h.

template<size_t NDIM, typename T = int>
Self& cmtk::FixedVector< NDIM, T >::operator/= ( const Self rhs ) [inline]

Elementwise dvision with another vector.

Definition at line 170 of file cmtkFixedVector.h.

template<size_t NDIM, typename T = int>
bool cmtk::FixedVector< NDIM, T >::operator== ( const Self rhs ) const [inline]

Equality operator.

Definition at line 137 of file cmtkFixedVector.h.

template<size_t NDIM, typename T = int>
const T& cmtk::FixedVector< NDIM, T >::operator[] ( const size_t  i ) const [inline]

Get const element reference.

Definition at line 115 of file cmtkFixedVector.h.

template<size_t NDIM, typename T = int>
T& cmtk::FixedVector< NDIM, T >::operator[] ( const size_t  i ) [inline]

Get element reference.

Definition at line 109 of file cmtkFixedVector.h.

template<size_t NDIM, typename T = int>
T cmtk::FixedVector< NDIM, T >::Product (  ) const [inline]

Calculate product of vector elements.

Definition at line 234 of file cmtkFixedVector.h.

template<size_t NDIM, typename T = int>
T cmtk::FixedVector< NDIM, T >::RootSumOfSquares (  ) const [inline]
template<size_t NDIM, typename T = int>
T cmtk::FixedVector< NDIM, T >::Sum (  ) const [inline]

Calculate sum of vector elements.

Definition at line 224 of file cmtkFixedVector.h.

template<size_t NDIM, typename T = int>
T cmtk::FixedVector< NDIM, T >::SumOfSquares (  ) const [inline]

Calculate sum of squares of vector elements (that is, square of Euclid's norm).

Definition at line 244 of file cmtkFixedVector.h.

Referenced by cmtk::SplineWarpXform::RelaxToUnfold().

template<size_t NDIM, typename T = int>
static const Self cmtk::FixedVector< NDIM, T >::Zero (  ) [inline, static]

Zero operator.

Definition at line 65 of file cmtkFixedVector.h.


Member Data Documentation

template<size_t NDIM, typename T = int>
T cmtk::FixedVector< NDIM, T >::m_Data[NDIM] [private]

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines