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

itk::CovariantVector< T, NCovariantVectorDimension > Class Template Reference
[Geometry Representation ObjectsData Representation Objects]

A templated class holding a n-Dimensional covariant vector. More...

#include <itkCovariantVector.h>

Inheritance diagram for itk::CovariantVector:

Inheritance graph
[legend]
Collaboration diagram for itk::CovariantVector< T, NCovariantVectorDimension >:

Collaboration graph
[legend]
List of all members.

Public Types

typedef CovariantVector Self
typedef FixedArray< T, NCovariantVectorDimension > Superclass
typedef T ValueType
typedef Self CovariantVectorType
typedef FixedArray< T, NCovariantVectorDimension > BaseArray

Public Methods

 itkStaticConstMacro (CovariantVectorDimension, unsigned int, NCovariantVectorDimension)
void Set_vnl_vector (const vnl_vector< T > &)
vnl_vector_ref< T > Get_vnl_vector (void)
vnl_vector< T > Get_vnl_vector (void) const
 CovariantVector ()
const Selfoperator *= (const ValueType &value)
const Selfoperator/= (const ValueType &value)
const Selfoperator+= (const Self &vec)
const Selfoperator-= (const Self &vec)
Self operator- () const
Self operator+ (const Self &vec) const
Self operator- (const Self &vec) const
Self operator * (const ValueType &val) const
ValueType operator * (const Self &vec) const
ValueType operator * (const Vector< T, NCovariantVectorDimension > &vec) const
Self operator/ (const ValueType &val) const
ValueType GetNorm (void) const
ValueType GetSquaredNorm (void) const
void PrintSelf (std::ostream &os, Indent indent) const
 CovariantVector (const Self &r)
 CovariantVector (const ValueType r[CovariantVectorDimension])
CovariantVector & operator= (const Self &r)
CovariantVector & operator= (const ValueType r[CovariantVectorDimension])
template<typename TCoordRepB> void CastFrom (const CovariantVector< TCoordRepB, NCovariantVectorDimension > &pa)

Static Public Methods

unsigned int GetCovariantVectorDimension ()

Detailed Description

template<class T, unsigned int NCovariantVectorDimension = 3>
class itk::CovariantVector< T, NCovariantVectorDimension >

A templated class holding a n-Dimensional covariant vector.

CovariantVector is a templated class that holds a single vector (i.e., an array of values). CovariantVector can be used as the data type held at each pixel in an Image or at each vertex of an Mesh. The template parameter T can be any data type that behaves like a primitive (or atomic) data type (int, short, float, complex). The NCovariantVectorDimension defines the number of components in the vector array.

CovariantVector is not a dynamically extendible array like std::vector. It is intended to be used like a mathematical vector.

If you wish a simpler pixel types, you can use Scalar, which represents a single data value at a pixel. There is also the more complex type ScalarCovariantVector, which supports (for a given pixel) a single scalar value plus an array of vector values. (The scalar and vectors can be of different data type.)

CovariantVector is the type that should be used for representing normals to surfaces and gradients of functions. AffineTransform transform covariant vectors different than vectors.

See also:
Image , Mesh , Point , CovariantCovariantVector , Matrix

Definition at line 64 of file itkCovariantVector.h.


Member Typedef Documentation

template<class T, unsigned int NCovariantVectorDimension = 3>
typedef FixedArray<T, NCovariantVectorDimension> itk::CovariantVector< T, NCovariantVectorDimension >::BaseArray
 

The Array type from which this CovariantVector is derived.

Definition at line 82 of file itkCovariantVector.h.

template<class T, unsigned int NCovariantVectorDimension = 3>
typedef Self itk::CovariantVector< T, NCovariantVectorDimension >::CovariantVectorType
 

I am a covariant vector.

Definition at line 79 of file itkCovariantVector.h.

template<class T, unsigned int NCovariantVectorDimension = 3>
typedef CovariantVector itk::CovariantVector< T, NCovariantVectorDimension >::Self
 

Standard class typedefs.

Definition at line 67 of file itkCovariantVector.h.

template<class T, unsigned int NCovariantVectorDimension = 3>
typedef FixedArray<T,NCovariantVectorDimension> itk::CovariantVector< T, NCovariantVectorDimension >::Superclass
 

Definition at line 68 of file itkCovariantVector.h.

template<class T, unsigned int NCovariantVectorDimension = 3>
typedef T itk::CovariantVector< T, NCovariantVectorDimension >::ValueType
 

ValueType can be used to declare a variable that is the same type as a data element held in an CovariantVector.

Reimplemented from itk::FixedArray< T, NCovariantVectorDimension >.

Definition at line 72 of file itkCovariantVector.h.

Referenced by itk::CovariantVector< int, 3 >::CovariantVector().


Constructor & Destructor Documentation

template<class T, unsigned int NCovariantVectorDimension = 3>
itk::CovariantVector< T, NCovariantVectorDimension >::CovariantVector   [inline]
 

Default constructor has nothing to do.

Definition at line 98 of file itkCovariantVector.h.

template<class T, unsigned int NCovariantVectorDimension = 3>
itk::CovariantVector< T, NCovariantVectorDimension >::CovariantVector const Self   r [inline]
 

Pass-through constructor for the Array base class.

Definition at line 101 of file itkCovariantVector.h.

template<class T, unsigned int NCovariantVectorDimension = 3>
itk::CovariantVector< T, NCovariantVectorDimension >::CovariantVector const ValueType    r[CovariantVectorDimension] [inline]
 

Pass-through constructor for the Array base class.

Definition at line 102 of file itkCovariantVector.h.


Member Function Documentation

template<class T, unsigned int NCovariantVectorDimension = 3>
template<typename TCoordRepB>
void itk::CovariantVector< T, NCovariantVectorDimension >::CastFrom const CovariantVector< TCoordRepB, NCovariantVectorDimension > &    pa [inline]
 

Copy from another CovariantVector with a different representation type. Casting is done with C-Like rules

Definition at line 160 of file itkCovariantVector.h.

template<class T, unsigned int NCovariantVectorDimension = 3>
vnl_vector<T> itk::CovariantVector< T, NCovariantVectorDimension >::Get_vnl_vector void    const
 

Get a vnl_vector with a copy of the internal memory block

template<class T, unsigned int NCovariantVectorDimension = 3>
vnl_vector_ref<T> itk::CovariantVector< T, NCovariantVectorDimension >::Get_vnl_vector void   
 

Get a vnl_vector_ref referencing the same memory block

template<class T, unsigned int NCovariantVectorDimension = 3>
unsigned int itk::CovariantVector< T, NCovariantVectorDimension >::GetCovariantVectorDimension   [inline, static]
 

Get the dimension (size) of the vector.

Definition at line 85 of file itkCovariantVector.h.

template<class T, unsigned int NCovariantVectorDimension = 3>
ValueType itk::CovariantVector< T, NCovariantVectorDimension >::GetNorm void    const
 

Returns the Euclidean Norm of the vector

template<class T, unsigned int NCovariantVectorDimension = 3>
ValueType itk::CovariantVector< T, NCovariantVectorDimension >::GetSquaredNorm void    const
 

Returns vector's Squared Euclidean Norm

template<class T, unsigned int NCovariantVectorDimension = 3>
itk::CovariantVector< T, NCovariantVectorDimension >::itkStaticConstMacro CovariantVectorDimension   ,
unsigned    int,
NCovariantVectorDimension   
 

Dimension of the Space

template<class T, unsigned int NCovariantVectorDimension = 3>
ValueType itk::CovariantVector< T, NCovariantVectorDimension >::operator * const Vector< T, NCovariantVectorDimension > &    vec const
 

operator *. Performs the scalar product with a vector (contravariant). This scalar product is invariant under affine transformations

template<class T, unsigned int NCovariantVectorDimension = 3>
ValueType itk::CovariantVector< T, NCovariantVectorDimension >::operator * const Self   vec const
 

CovariantVector operator *. Performs the inner product of two covariant vectors.

Warning:
This is equivalent to the scalar product only if the reference system has orthogonal axis and equal scales.

template<class T, unsigned int NCovariantVectorDimension = 3>
Self itk::CovariantVector< T, NCovariantVectorDimension >::operator * const ValueType   val const
 

Scalar operator *. Scale the elements of a vector by a scalar. Return a new vector.

template<class T, unsigned int NCovariantVectorDimension = 3>
const Self& itk::CovariantVector< T, NCovariantVectorDimension >::operator *= const ValueType   value
 

Scalar operator *=. Scales elements by a scalar.

template<class T, unsigned int NCovariantVectorDimension = 3>
Self itk::CovariantVector< T, NCovariantVectorDimension >::operator+ const Self   vec const
 

CovariantVector addition. Add two vectors. Return a new vector.

template<class T, unsigned int NCovariantVectorDimension = 3>
const Self& itk::CovariantVector< T, NCovariantVectorDimension >::operator+= const Self   vec
 

CovariantVector operator+=. Adds a vectors to the current vector.

template<class T, unsigned int NCovariantVectorDimension = 3>
Self itk::CovariantVector< T, NCovariantVectorDimension >::operator- const Self   vec const
 

CovariantVector subtraction. Subtract two vectors. Return a new vector.

template<class T, unsigned int NCovariantVectorDimension = 3>
Self itk::CovariantVector< T, NCovariantVectorDimension >::operator-   const
 

CovariantVector negation. Negate all the elements of a vector. Return a new vector

template<class T, unsigned int NCovariantVectorDimension = 3>
const Self& itk::CovariantVector< T, NCovariantVectorDimension >::operator-= const Self   vec
 

CovariantVector operator-=. Subtracts a vector from a current vector.

template<class T, unsigned int NCovariantVectorDimension = 3>
Self itk::CovariantVector< T, NCovariantVectorDimension >::operator/ const ValueType   val const
 

Scalar operator/. Scale (divide) the elements of a vector by a scalar. Return a new vector.

template<class T, unsigned int NCovariantVectorDimension = 3>
const Self& itk::CovariantVector< T, NCovariantVectorDimension >::operator/= const ValueType   value
 

Scalar operator/=. Scales (divides) elements by a scalar.

template<class T, unsigned int NCovariantVectorDimension = 3>
CovariantVector& itk::CovariantVector< T, NCovariantVectorDimension >::operator= const ValueType    r[CovariantVectorDimension]
 

Pass-through assignment operator for the Array base class.

template<class T, unsigned int NCovariantVectorDimension = 3>
CovariantVector& itk::CovariantVector< T, NCovariantVectorDimension >::operator= const Self   r
 

Pass-through assignment operator for the Array base class.

template<class T, unsigned int NCovariantVectorDimension = 3>
void itk::CovariantVector< T, NCovariantVectorDimension >::PrintSelf std::ostream &    os,
Indent    indent
const
 

Print content

template<class T, unsigned int NCovariantVectorDimension = 3>
void itk::CovariantVector< T, NCovariantVectorDimension >::Set_vnl_vector const vnl_vector< T > &   
 

Set a vnl_vector_ref referencing the same memory block


The documentation for this class was generated from the following file:
Generated at Wed Mar 12 01:15:08 2003 for ITK by doxygen 1.2.15 written by Dimitri van Heesch, © 1997-2000