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

itk::CovariantVector< T, NVectorDimension > 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< T, NVectorDimension >:

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

Collaboration graph
[legend]
List of all members.

Public Types

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

Public Member Functions

 itkStaticConstMacro (Dimension, unsigned int, NVectorDimension)
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, NVectorDimension > &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[Dimension])
CovariantVectoroperator= (const Self &r)
CovariantVectoroperator= (const ValueType r[Dimension])
template<typename TCoordRepB> void CastFrom (const CovariantVector< TCoordRepB, NVectorDimension > &pa)

Static Public Member Functions

unsigned int GetCovariantVectorDimension ()

Detailed Description

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

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 NVectorDimension 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

Vector

Matrix

Definition at line 64 of file itkCovariantVector.h.


Member Typedef Documentation

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

The Array type from which this CovariantVector is derived. Definition at line 82 of file itkCovariantVector.h.

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

I am a covariant vector. Definition at line 79 of file itkCovariantVector.h.

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

Standard class typedefs. Definition at line 68 of file itkCovariantVector.h.

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

Definition at line 69 of file itkCovariantVector.h.

template<class T, unsigned int NVectorDimension = 3>
typedef T itk::CovariantVector< T, NVectorDimension >::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, NVectorDimension >.

Definition at line 73 of file itkCovariantVector.h.


Constructor & Destructor Documentation

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

Default constructor has nothing to do. Definition at line 98 of file itkCovariantVector.h.

template<class T, unsigned int NVectorDimension = 3>
itk::CovariantVector< T, NVectorDimension >::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 NVectorDimension = 3>
itk::CovariantVector< T, NVectorDimension >::CovariantVector const ValueType  r[Dimension]  )  [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 NVectorDimension = 3>
template<typename TCoordRepB>
void itk::CovariantVector< T, NVectorDimension >::CastFrom const CovariantVector< TCoordRepB, NVectorDimension > &  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 NVectorDimension = 3>
vnl_vector<T> itk::CovariantVector< T, NVectorDimension >::Get_vnl_vector void   )  const
 

Get a vnl_vector with a copy of the internal memory block

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

Get a vnl_vector_ref referencing the same memory block

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

Get the dimension (size) of the vector. Definition at line 85 of file itkCovariantVector.h.

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

Returns the Euclidean Norm of the vector

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

Returns vector's Squared Euclidean Norm

template<class T, unsigned int NVectorDimension = 3>
itk::CovariantVector< T, NVectorDimension >::itkStaticConstMacro Dimension  ,
unsigned  int,
NVectorDimension 
 

Dimension of the Space

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

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

template<class T, unsigned int NVectorDimension = 3>
ValueType itk::CovariantVector< T, NVectorDimension >::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 NVectorDimension = 3>
Self itk::CovariantVector< T, NVectorDimension >::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 NVectorDimension = 3>
const Self& itk::CovariantVector< T, NVectorDimension >::operator *= const ValueType value  ) 
 

Scalar operator*=. Scales elements by a scalar.

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

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

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

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

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

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

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

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

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

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

template<class T, unsigned int NVectorDimension = 3>
Self itk::CovariantVector< T, NVectorDimension >::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 NVectorDimension = 3>
const Self& itk::CovariantVector< T, NVectorDimension >::operator/= const ValueType value  ) 
 

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

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

Pass-through assignment operator for the Array base class.

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

Pass-through assignment operator for the Array base class.

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

Print content

template<class T, unsigned int NVectorDimension = 3>
void itk::CovariantVector< T, NVectorDimension >::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 Sun Apr 1 03:00:24 2007 for ITK by doxygen 1.3.8 written by Dimitri van Heesch, © 1997-2000