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

itk::ScalarVector< TScalar, TVector, TVectorDimension > Class Template Reference
[Data Representation Objects]

A templated class holding bot scalar and vector values and responding to the GetScalar() and GetVector() methods. More...

#include <itkScalarVector.h>

Collaboration diagram for itk::ScalarVector< TScalar, TVector, TVectorDimension >:

Collaboration graph
[legend]
List of all members.

Public Types

typedef ScalarVector Self
typedef TScalar ValueType
typedef TScalar ScalarValueType
typedef TVector VectorValueType
typedef vnl_vector_fixed<
TVector, TVectorDimension > 
VectorType

Public Methods

TScalar GetScalar () const
void SetScalar (const TScalar &val)
const VectorTypeGetVector () const
VectorTypeGetVector ()
void SetVector (const VectorType &vec)

Static Public Methods

unsigned int GetVectorDimension ()

Detailed Description

template<class TScalar, class TVector, unsigned int TVectorDimension = 3>
class itk::ScalarVector< TScalar, TVector, TVectorDimension >

A templated class holding bot scalar and vector values and responding to the GetScalar() and GetVector() methods.

ScalarVector is a templated class that holds a scalar value plus an array of values (a vector). ScalarVector can be used as the data type held at each pixel in an Image or at each vertex of an Mesh. There are three template parameters: the type of scalar, the type of vector, and the number of components of the vector. The types can be any data type that behaves like a primitive (or atomic) data type (int, short, float, complex). itk filters that rely on scalar data assume the data type held at each pixel or each vertex responds to GetScalar()/SetScalar() methods. itk filters that rely on vector data assume the data type held at each pixel or each vertex responds to GetVector()/SetVector() methods. If not, a compile time error will occur.

ScalarVector 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. YOu can also use Vector, which supports (for a given pixel) an array of vector values.

See also:
Image , Mesh , Scalar , Vector

Definition at line 58 of file itkScalarVector.h.


Member Typedef Documentation

template<class TScalar, class TVector, unsigned int TVectorDimension = 3>
typedef TScalar itk::ScalarVector< TScalar, TVector, TVectorDimension >::ScalarValueType
 

ValueType can be used to declare a variable that is the same type as the data held in the scalar portion of the ScalarVector.

Definition at line 69 of file itkScalarVector.h.

template<class TScalar, class TVector, unsigned int TVectorDimension = 3>
typedef ScalarVector itk::ScalarVector< TScalar, TVector, TVectorDimension >::Self
 

Standard class typedefs.

Definition at line 61 of file itkScalarVector.h.

template<class TScalar, class TVector, unsigned int TVectorDimension = 3>
typedef TScalar itk::ScalarVector< TScalar, TVector, TVectorDimension >::ValueType
 

ValueType can be used to declare a variable that is the same type as the data held in the scalar portion of the ScalarVector.

Definition at line 65 of file itkScalarVector.h.

template<class TScalar, class TVector, unsigned int TVectorDimension = 3>
typedef vnl_vector_fixed<TVector, TVectorDimension> itk::ScalarVector< TScalar, TVector, TVectorDimension >::VectorType
 

VectorType can be used to declare a variable that is the same type as the internal vector.

Definition at line 77 of file itkScalarVector.h.

template<class TScalar, class TVector, unsigned int TVectorDimension = 3>
typedef TVector itk::ScalarVector< TScalar, TVector, TVectorDimension >::VectorValueType
 

ValueType can be used to declare a variable that is the same type as the data held in the scalar portion of the ScalarVector.

Definition at line 73 of file itkScalarVector.h.


Member Function Documentation

template<class TScalar, class TVector, unsigned int TVectorDimension = 3>
TScalar itk::ScalarVector< TScalar, TVector, TVectorDimension >::GetScalar   const [inline]
 

Get the scalar value.

See also:
SetScalar()

Definition at line 80 of file itkScalarVector.h.

template<class TScalar, class TVector, unsigned int TVectorDimension = 3>
VectorType& itk::ScalarVector< TScalar, TVector, TVectorDimension >::GetVector   [inline]
 

Get the vector. This provides a read/write reference to the vector.

See also:
SetVector

Definition at line 98 of file itkScalarVector.h.

template<class TScalar, class TVector, unsigned int TVectorDimension = 3>
const VectorType& itk::ScalarVector< TScalar, TVector, TVectorDimension >::GetVector   const [inline]
 

Get the vector. This provides a read only reference to the vector.

See also:
SetVector().

Definition at line 93 of file itkScalarVector.h.

template<class TScalar, class TVector, unsigned int TVectorDimension = 3>
unsigned int itk::ScalarVector< TScalar, TVector, TVectorDimension >::GetVectorDimension   [inline, static]
 

Get the dimension (size) of the vector.

Definition at line 88 of file itkScalarVector.h.

template<class TScalar, class TVector, unsigned int TVectorDimension = 3>
void itk::ScalarVector< TScalar, TVector, TVectorDimension >::SetScalar const TScalar &    val [inline]
 

Set the scalar value.

See also:
GetScalar()

Definition at line 84 of file itkScalarVector.h.

template<class TScalar, class TVector, unsigned int TVectorDimension = 3>
void itk::ScalarVector< TScalar, TVector, TVectorDimension >::SetVector const VectorType   vec [inline]
 

Set the vector.

See also:
GetVector

Definition at line 102 of file itkScalarVector.h.


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