ITK  4.8.0
Insight Segmentation and Registration Toolkit
Public Types | Static Public Member Functions | List of all members
itk::NumericTraits< std::vector< T > > Class Template Reference

#include <itkNumericTraitsStdVector.h>

Detailed Description

template<typename T>
class itk::NumericTraits< std::vector< T > >

Define numeric traits for std::vector.

Template Parameters
TComponent type of std::vector

We provide here a generic implementation based on creating types of std::vector whose components are the types of the NumericTraits from the original std::vector components. This implementation require support for partial specializations, since it is based on the concept that: NumericTraits<std::vector< T > > is defined piecewise by std::vector< NumericTraits< T > >

Note
The Zero(), One(), min() and max() methods here take references to a pixel as input. This is due to the fact that the length of the std::vector is not known until run-time. Since the most common use of Zero and One is for comparison purposes or initialization of sums etc, this might just as easily be re-written with a pixel passed in as a reference and the length is inferred from this pixel.
See Also
NumericTraits

Definition at line 56 of file itkNumericTraitsStdVector.h.

Public Types

typedef std::vector
< ElementAbsType
AbsType
 
typedef std::vector
< ElementAccumulateType
AccumulateType
 
typedef NumericTraits< T >::AbsType ElementAbsType
 
typedef NumericTraits< T >
::AccumulateType 
ElementAccumulateType
 
typedef NumericTraits< T >
::FloatType 
ElementFloatType
 
typedef NumericTraits< T >
::PrintType 
ElementPrintType
 
typedef NumericTraits< T >
::RealType 
ElementRealType
 
typedef std::vector
< ElementFloatType
FloatType
 
typedef Self MeasurementVectorType
 
typedef std::vector
< ElementPrintType
PrintType
 
typedef std::vector
< ElementRealType
RealType
 
typedef ElementRealType ScalarRealType
 
typedef std::vector< T > Self
 
typedef T ValueType
 

Static Public Member Functions

static void AssignToArray (const Self &v, MeasurementVectorType &mv)
 
template<typename TArray >
static void AssignToArray (const Self &v, TArray &mv)
 
static unsigned int GetLength (const std::vector< T > &m)
 
static const Self min (const Self &a)
 
static const Self NonpositiveMin (const Self &a)
 
static const Self OneValue (const Self &a)
 
static const Self ZeroValue (const Self &a)
 
static const Self max (const Self &a)
 
static void SetLength (std::vector< T > &m, const unsigned int s)
 

Member Typedef Documentation

template<typename T >
typedef std::vector< ElementAbsType > itk::NumericTraits< std::vector< T > >::AbsType

Unsigned component type

Definition at line 72 of file itkNumericTraitsStdVector.h.

template<typename T >
typedef std::vector< ElementAccumulateType > itk::NumericTraits< std::vector< T > >::AccumulateType

Accumulation of addition and multiplication.

Definition at line 75 of file itkNumericTraitsStdVector.h.

template<typename T >
typedef NumericTraits< T >::AbsType itk::NumericTraits< std::vector< T > >::ElementAbsType

Definition at line 60 of file itkNumericTraitsStdVector.h.

template<typename T >
typedef NumericTraits< T >::AccumulateType itk::NumericTraits< std::vector< T > >::ElementAccumulateType

Definition at line 61 of file itkNumericTraitsStdVector.h.

template<typename T >
typedef NumericTraits< T >::FloatType itk::NumericTraits< std::vector< T > >::ElementFloatType

Definition at line 62 of file itkNumericTraitsStdVector.h.

template<typename T >
typedef NumericTraits< T >::PrintType itk::NumericTraits< std::vector< T > >::ElementPrintType

Definition at line 63 of file itkNumericTraitsStdVector.h.

template<typename T >
typedef NumericTraits< T >::RealType itk::NumericTraits< std::vector< T > >::ElementRealType

Definition at line 64 of file itkNumericTraitsStdVector.h.

template<typename T >
typedef std::vector< ElementFloatType > itk::NumericTraits< std::vector< T > >::FloatType

Typedef for operations that use floating point instead of real precision

Definition at line 79 of file itkNumericTraitsStdVector.h.

template<typename T >
typedef Self itk::NumericTraits< std::vector< T > >::MeasurementVectorType

Measurement vector type

Definition at line 93 of file itkNumericTraitsStdVector.h.

template<typename T >
typedef std::vector< ElementPrintType > itk::NumericTraits< std::vector< T > >::PrintType

Return the type that can be printed.

Definition at line 84 of file itkNumericTraitsStdVector.h.

template<typename T >
typedef std::vector< ElementRealType > itk::NumericTraits< std::vector< T > >::RealType

Type for real-valued scalar operations.

Definition at line 87 of file itkNumericTraitsStdVector.h.

template<typename T >
typedef ElementRealType itk::NumericTraits< std::vector< T > >::ScalarRealType

Type for real-valued scalar operations.

Definition at line 90 of file itkNumericTraitsStdVector.h.

template<typename T >
typedef std::vector< T > itk::NumericTraits< std::vector< T > >::Self

Definition at line 69 of file itkNumericTraitsStdVector.h.

template<typename T >
typedef T itk::NumericTraits< std::vector< T > >::ValueType

Return the type of the native component type.

Definition at line 67 of file itkNumericTraitsStdVector.h.

Member Function Documentation

template<typename T >
static void itk::NumericTraits< std::vector< T > >::AssignToArray ( const Self v,
MeasurementVectorType mv 
)
inlinestatic

Definition at line 147 of file itkNumericTraitsStdVector.h.

template<typename T >
template<typename TArray >
static void itk::NumericTraits< std::vector< T > >::AssignToArray ( const Self v,
TArray &  mv 
)
inlinestatic

Definition at line 153 of file itkNumericTraitsStdVector.h.

References itk::NumericTraits< T >::GetLength().

template<typename T >
static unsigned int itk::NumericTraits< std::vector< T > >::GetLength ( const std::vector< T > &  m)
inlinestatic

Return the size of the vector.

Definition at line 142 of file itkNumericTraitsStdVector.h.

template<typename T >
static const Self itk::NumericTraits< std::vector< T > >::max ( const Self a)
inlinestatic

Component wise defined element

\note minimum value for floating pointer types is defined as
minimum positive normalize value.

Definition at line 100 of file itkNumericTraitsStdVector.h.

References itk::NumericTraits< T >::max().

template<typename T >
static const Self itk::NumericTraits< std::vector< T > >::min ( const Self a)
inlinestatic

Definition at line 107 of file itkNumericTraitsStdVector.h.

References itk::NumericTraits< T >::min().

template<typename T >
static const Self itk::NumericTraits< std::vector< T > >::NonpositiveMin ( const Self a)
inlinestatic
template<typename T >
static const Self itk::NumericTraits< std::vector< T > >::OneValue ( const Self a)
inlinestatic

Definition at line 119 of file itkNumericTraitsStdVector.h.

References itk::NumericTraits< T >::OneValue().

template<typename T >
static void itk::NumericTraits< std::vector< T > >::SetLength ( std::vector< T > &  m,
const unsigned int  s 
)
inlinestatic

Resize the input vector to the specified size

Definition at line 132 of file itkNumericTraitsStdVector.h.

template<typename T >
static const Self itk::NumericTraits< std::vector< T > >::ZeroValue ( const Self a)
inlinestatic

Definition at line 113 of file itkNumericTraitsStdVector.h.

References itk::NumericTraits< T >::ZeroValue().


The documentation for this class was generated from the following file: