#include <itkScalarVector.h>
Collaboration diagram for itk::ScalarVector< TScalar, TVector, TVectorDimension >:
Public Types | |
typedef ScalarVector | Self |
typedef TScalar | ValueType |
typedef TScalar | ScalarValueType |
typedef TVector | VectorValueType |
typedef vnl_vector_fixed< TVector, TVectorDimension > | VectorType |
Public Member Functions | |
TScalar | GetScalar () const |
void | SetScalar (const TScalar &val) |
const VectorType & | GetVector () const |
VectorType & | GetVector () |
void | SetVector (const VectorType &vec) |
Static Public Member Functions | |
unsigned int | GetVectorDimension () |
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.
Definition at line 58 of file itkScalarVector.h.
|
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 70 of file itkScalarVector.h. |
|
Standard class typedefs. Definition at line 62 of file itkScalarVector.h. |
|
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 66 of file itkScalarVector.h. |
|
VectorType can be used to declare a variable that is the same type as the internal vector. Definition at line 78 of file itkScalarVector.h. Referenced by itk::ScalarVector< TScalar, TVector, TVectorDimension >::GetVector(), and itk::ScalarVector< TScalar, TVector, TVectorDimension >::SetVector(). |
|
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 74 of file itkScalarVector.h. |
|
Get the scalar value.
|
|
Get the vector. This provides a read/write reference to the vector.
References itk::ScalarVector< TScalar, TVector, TVectorDimension >::VectorType. |
|
Get the vector. This provides a read only reference to the vector.
References itk::ScalarVector< TScalar, TVector, TVectorDimension >::VectorType. |
|
Get the dimension (size) of the vector. Definition at line 89 of file itkScalarVector.h. |
|
Set the scalar value.
|
|
Set the vector.
References itk::ScalarVector< TScalar, TVector, TVectorDimension >::VectorType. |