ITK
4.2.0
Insight Segmentation and Registration Toolkit
|
#include <itkScalarVector.h>
Public Types | |
typedef TScalar | ScalarValueType |
typedef ScalarVector | Self |
typedef TScalar | ValueType |
typedef vnl_vector_fixed < TVector, TVectorDimension > | VectorType |
typedef TVector | VectorValueType |
Public Member Functions | |
TScalar | GetScalar () const |
const VectorType & | GetVector () const |
VectorType & | GetVector () |
void | SetScalar (const TScalar &val) |
void | SetVector (const VectorType &vec) |
Static Public Member Functions | |
static unsigned int | GetVectorDimension () |
Private Attributes | |
TScalar | m_Scalar |
VectorType | m_Vector |
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.
Definition at line 59 of file itkScalarVector.h.
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 71 of file itkScalarVector.h.
typedef ScalarVector itk::ScalarVector< TScalar, TVector, TVectorDimension >::Self |
Standard class typedefs.
Definition at line 63 of file itkScalarVector.h.
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 67 of file itkScalarVector.h.
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 79 of file itkScalarVector.h.
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 75 of file itkScalarVector.h.
|
inline |
|
inline |
Get the vector. This provides a read only reference to the vector.
Definition at line 95 of file itkScalarVector.h.
|
inline |
Get the vector. This provides a read/write reference to the vector.
Definition at line 100 of file itkScalarVector.h.
|
inlinestatic |
Get the dimension (size) of the vector.
Definition at line 90 of file itkScalarVector.h.
|
inline |
|
inline |
|
private |
Definition at line 107 of file itkScalarVector.h.
|
private |
Definition at line 108 of file itkScalarVector.h.