Main Page
Groups
Namespace List
Class Hierarchy
Alphabetical List
Compound List
File
List
Namespace Members
Compound Members
File Members
Concepts
A templated class holding a n-Dimensional vector.
More...
#include <itkVector.h>
Inheritance diagram for itk::Vector:
[legend]Collaboration diagram for itk::Vector< T, NVectorDimension >:
[legend]List of all members.
Detailed Description
template<class T, unsigned int NVectorDimension = 3>
class itk::Vector< T, NVectorDimension >
A templated class holding a n-Dimensional vector.
Vector is a templated class that holds a single vector (i.e., an array of values). Vector 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.
Vector 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 ScalarVector, 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.)
-
See also:
-
Image , Mesh , Point , CovariantVector , Matrix
Definition at line 56 of file itkVector.h.
Member Typedef Documentation
template<class T, unsigned int NVectorDimension = 3> |
typedef FixedArray<T, NVectorDimension> itk::Vector< T, NVectorDimension >::BaseArray
|
|
|
The Array type from which this vector is derived.
Definition at line 74 of file itkVector.h. |
template<class T, unsigned int NVectorDimension = 3> |
typedef Vector itk::Vector< T, NVectorDimension >::Self
|
|
|
Standard class typedefs.
Definition at line 60 of file itkVector.h. |
template<class T, unsigned int NVectorDimension = 3> |
typedef FixedArray<T,NVectorDimension> itk::Vector< T, NVectorDimension >::Superclass
|
|
template<class T, unsigned int NVectorDimension = 3> |
typedef T itk::Vector< T, NVectorDimension >::ValueType
|
|
template<class T, unsigned int NVectorDimension = 3> |
typedef Self itk::Vector< T, NVectorDimension >::VectorType
|
|
Constructor & Destructor Documentation
template<class T, unsigned int NVectorDimension = 3> |
itk::Vector< T, NVectorDimension >::Vector |
( |
|
) |
[inline] |
|
|
Default constructor and copy constructors.
Definition at line 90 of file itkVector.h. |
template<class T, unsigned int NVectorDimension = 3> |
itk::Vector< T, NVectorDimension >::Vector |
( |
const ValueType & |
r |
) |
|
|
template<class T, unsigned int NVectorDimension = 3> |
itk::Vector< T, NVectorDimension >::Vector |
( |
const Self & |
r |
) |
[inline] |
|
|
Pass-through constructor for the Array base class.
Definition at line 94 of file itkVector.h. |
template<class T, unsigned int NVectorDimension = 3> |
itk::Vector< T, NVectorDimension >::Vector |
( |
const ValueType |
r[VectorDimension] |
) |
[inline] |
|
|
Pass-through constructor for the Array base class.
Definition at line 95 of file itkVector.h. |
Member Function Documentation
template<class T, unsigned int NVectorDimension = 3> |
template<typename TCoordRepB> |
void itk::Vector< T, NVectorDimension >::CastFrom |
( |
const Vector< TCoordRepB, NVectorDimension > & |
pa |
) |
[inline] |
|
|
Copy from another Vector with a different representation type. Casting is done with C-Like rules
Definition at line 159 of file itkVector.h. |
template<class T, unsigned int NVectorDimension = 3> |
vnl_vector<T> itk::Vector< 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::Vector< T, NVectorDimension >::Get_vnl_vector |
( |
void |
|
) |
|
|
template<class T, unsigned int NVectorDimension = 3> |
ValueType itk::Vector< T, NVectorDimension >::GetNorm |
( |
void |
|
) |
const |
|
|
Returns the Euclidean Norm of the vector |
template<class T, unsigned int NVectorDimension = 3> |
ValueType itk::Vector< T, NVectorDimension >::GetSquaredNorm |
( |
void |
|
) |
const |
|
|
Returns vector's Squared Euclidean Norm |
template<class T, unsigned int NVectorDimension = 3> |
unsigned int itk::Vector< T, NVectorDimension >::GetVectorDimension |
( |
|
) |
[inline, static] |
|
|
Get the dimension (size) of the vector.
Definition at line 77 of file itkVector.h. |
template<class T, unsigned int NVectorDimension = 3> |
itk::Vector< T, NVectorDimension >::itkStaticConstMacro |
( |
VectorDimension |
, |
|
|
unsigned |
int, |
|
|
NVectorDimension |
|
|
) |
|
|
|
Dimension of the vector space. |
template<class T, unsigned int NVectorDimension = 3> |
void itk::Vector< T, NVectorDimension >::Normalize |
( |
void |
|
) |
|
|
|
Divides the vector componets by the vector norm |
template<class T, unsigned int NVectorDimension = 3> |
Self itk::Vector< 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> |
ValueType itk::Vector< T, NVectorDimension >::operator * |
( |
const Self & |
vec |
) |
const |
|
|
Vector operator *. Performs the inner product of two vectors. this is also known as the scalar product. |
template<class T, unsigned int NVectorDimension = 3> |
const Self& itk::Vector< T, NVectorDimension >::operator *= |
( |
const ValueType & |
value |
) |
|
|
|
Scalar operator *=. Scales elements by a scalar. |
template<class T, unsigned int NVectorDimension = 3> |
bool itk::Vector< T, NVectorDimension >::operator!= |
( |
const Self & |
v |
) |
const [inline] |
|
|
Operators == and != compare a vector component by component. All components must be equal for two vectors to be equal. (Of course compile-time constraints on the template parameters length and type prevent comparisons between vectors of different type and length.)
Definition at line 143 of file itkVector.h. |
template<class T, unsigned int NVectorDimension = 3> |
Self itk::Vector< T, NVectorDimension >::operator+ |
( |
const Self & |
vec |
) |
const |
|
|
Vector addition. Add two vectors. Return a new vector. |
template<class T, unsigned int NVectorDimension = 3> |
const Self& itk::Vector< T, NVectorDimension >::operator+= |
( |
const Self & |
vec |
) |
|
|
|
Vector operator+=. Adds a vectors to the current vector. |
template<class T, unsigned int NVectorDimension = 3> |
Self itk::Vector< T, NVectorDimension >::operator- |
( |
const Self & |
vec |
) |
const |
|
|
Vector subtraction. Subtract two vectors. Return a new vector. |
template<class T, unsigned int NVectorDimension = 3> |
Self itk::Vector< T, NVectorDimension >::operator- |
( |
|
) |
const |
|
|
Vector negation. Negate all the elements of a vector. Return a new vector |
template<class T, unsigned int NVectorDimension = 3> |
const Self& itk::Vector< T, NVectorDimension >::operator-= |
( |
const Self & |
vec |
) |
|
|
|
Vector operator-=. Subtracts a vector from a current vector. |
template<class T, unsigned int NVectorDimension = 3> |
Self itk::Vector< 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::Vector< T, NVectorDimension >::operator/= |
( |
const ValueType & |
value |
) |
|
|
|
Scalar operator/=. Scales (divides) elements by a scalar. |
template<class T, unsigned int NVectorDimension = 3> |
Vector& itk::Vector< T, NVectorDimension >::operator= |
( |
const ValueType |
r[VectorDimension] |
) |
|
|
|
Pass-through assignment operator for the Array base class. |
template<class T, unsigned int NVectorDimension = 3> |
Vector& itk::Vector< T, NVectorDimension >::operator= |
( |
const Self & |
r |
) |
|
|
|
Pass-through assignment operator for the Array base class. |
template<class T, unsigned int NVectorDimension = 3> |
bool itk::Vector< T, NVectorDimension >::operator== |
( |
const Self & |
v |
) |
const [inline] |
|
|
Operators == and != compare a vector component by component. All components must be equal for two vectors to be equal. (Of course compile-time constraints on the template parameters length and type prevent comparisons between vectors of different type and length.)
Definition at line 141 of file itkVector.h.
Referenced by itk::Vector< double, VDimension >::operator==(). |
template<class T, unsigned int NVectorDimension = 3> |
void itk::Vector< T, NVectorDimension >::Set_vnl_vector |
( |
const vnl_vector< T > & |
|
) |
|
|
The documentation for this class was generated from the following file:
Generated at Wed Mar 12 01:21:11 2003 for ITK by
1.2.15 written by Dimitri van Heesch,
© 1997-2000