#include <itkVector.h>
Inheritance diagram for itk::Vector< T, NVectorDimension >:


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.)
Definition at line 58 of file itkVector.h.
Public Types | |
| typedef FixedArray< T, NVectorDimension > | BaseArray |
| typedef T | ComponentType |
| typedef NumericTraits< ValueType >::RealType | RealValueType |
| typedef Vector | Self |
| typedef FixedArray< T, NVectorDimension > | Superclass |
| typedef T | ValueType |
| typedef Self | VectorType |
Public Member Functions | |
| template<typename TCoordRepB> | |
| Copy from another Vector with a different representation type *Casting is done with C Like rules *void | CastFrom (const Vector< TCoordRepB, NVectorDimension > &pa) |
| vnl_vector< T > | Get_vnl_vector (void) const |
| vnl_vector_ref< T > | Get_vnl_vector (void) |
| RealValueType | GetSquaredNorm (void) const |
| vnl_vector< T > | GetVnlVector (void) const |
| vnl_vector_ref< T > | GetVnlVector (void) |
| itkStaticConstMacro (Dimension, unsigned int, NVectorDimension) | |
| void | Normalize (void) |
| ValueType | operator * (const Self &vec) const |
| Scalar | operator *.Scale the elements of a vector by a scalar.*Return a new vector.*/inline Self operator * (const ValueType &value) const |
| Scalar | operator *=.Scales elements by a scalar.*/template (const Tt &value) |
| Pass through assignment | operator for the Array base class.*/template (const Vector< TVectorValueType, NVectorDimension > &r) |
| Self | operator+ (const Self &vec) const |
| Self | operator- (const Self &vec) const |
| Self | operator- () const |
| const Self & | operator-= (const Self &vec) |
| Scalar | operator/.Scale (divide) the elements of a vector by a scalar.*Return a new vector.*/template< class Tt > inline Self operator/(const Tt &value) const |
| Scalar | operator/=.Scales (divides) elements by a scalar.*/template< class Tt > inline const Self &operator/ |
| Vector & | operator= (const ValueType r[NVectorDimension]) |
| void | Set_vnl_vector (const vnl_vector< T > &) |
| void | SetNthComponent (int c, const ComponentType &v) |
| void | SetVnlVector (const vnl_vector< T > &) |
| Vector (const ValueType r[Dimension]) | |
| template<class TVectorValueType> | |
| Pass through constructor for the Array base class * | Vector (const Vector< TVectorValueType, NVectorDimension > &r) |
| Vector (const ValueType &r) | |
| Vector () | |
Static Public Member Functions | |
| static unsigned int | GetNumberOfComponents () |
| static unsigned int | GetVectorDimension () |
Public Attributes | |
| Operators | |
|
|||||
|
The Array type from which this vector is derived. Definition at line 80 of file itkVector.h. |
|
|||||
|
Component value type Definition at line 77 of file itkVector.h. |
|
|||||
|
Definition at line 68 of file itkVector.h. |
|
|||||
|
Standard class typedefs. Definition at line 62 of file itkVector.h. |
|
|||||
|
Definition at line 63 of file itkVector.h. |
|
|||||
|
ValueType can be used to declare a variable that is the same type as a data element held in an Vector. Definition at line 67 of file itkVector.h. |
|
|||||
|
I am a vector type. Definition at line 74 of file itkVector.h. |
|
|||||||||
|
Default constructor and copy constructors. Definition at line 109 of file itkVector.h. |
|
||||||||||
|
|
|
||||||||||||||
|
Definition at line 114 of file itkVector.h. |
|
||||||||||
|
Definition at line 115 of file itkVector.h. |
|
||||||||||||||
|
Definition at line 225 of file itkVector.h. |
|
||||||||||
|
Get a vnl_vector with a copy of the internal memory block.
|
|
||||||||||
|
Get a vnl_vector_ref referencing the same memory block.
|
|
|||||||||
|
Returns the number of components in this vector type Definition at line 214 of file itkVector.h. |
|
||||||||||
|
Returns vector's Squared Euclidean Norm |
|
|||||||||
|
Get the dimension (size) of the vector. Definition at line 83 of file itkVector.h. |
|
||||||||||
|
Get a vnl_vector with a copy of the internal memory block. |
|
||||||||||
|
Get a vnl_vector_ref referencing the same memory block. |
|
||||||||||||||||||||
|
Dimension of the vector space. |
|
||||||||||
|
Divides the vector componets by the vector norm |
|
||||||||||
|
Vector operator*. Performs the inner product of two vectors. this is also known as the scalar product. |
|
||||||||||
|
Definition at line 173 of file itkVector.h. |
|
||||||||||
|
Definition at line 130 of file itkVector.h. |
|
||||||||||
|
Definition at line 120 of file itkVector.h. |
|
||||||||||
|
Vector addition. Add two vectors. Return a new vector. |
|
||||||||||
|
Vector subtraction. Subtract two vectors. Return a new vector. |
|
|||||||||
|
Vector negation. Negate all the elements of a vector. Return a new vector |
|
||||||||||
|
Vector operator-=. Subtracts a vector from a current vector. |
|
||||||||||
|
Definition at line 184 of file itkVector.h. |
|
||||||||||
|
|
|
||||||||||
|
|
|
||||||||||
|
Set a vnl_vector_ref referencing the same memory block.
|
|
||||||||||||||||
|
Definition at line 219 of file itkVector.h. |
|
||||||||||
|
Set a vnl_vector_ref referencing the same memory block. |
|
|||||
|
Initial value: = 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.) */ bool operator==(const Self& v) const { return Superclass::operator==(v); } bool operator!=(const Self& v) const { return !operator==(v); } RealValueType GetNorm( void ) const Definition at line 197 of file itkVector.h. |
1.4.2 written by Dimitri van Heesch,
© 1997-2000