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

#include <itkNumericTraitsVariableLengthVectorPixel.h>

Detailed Description

template<typename T>
class itk::NumericTraits< VariableLengthVector< T > >

Define numeric traits for VariableLengthVector.

Template Parameters
TComponent type of VariableLenghtVector

We provide here a generic implementation based on creating types of VariableLengthVector whose components are the types of the NumericTraits from the original VariableLengthVector components. This implementation require support for partial specializations, since it is based on the concept that: NumericTraits<VariableLengthVector< T > > is defined piecewise by VariableLengthVector< 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 VariableLengthVector 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 54 of file itkNumericTraitsVariableLengthVectorPixel.h.

Public Types

typedef VariableLengthVector
< ElementAbsType
AbsType
 
typedef VariableLengthVector
< 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 VariableLengthVector
< ElementFloatType
FloatType
 
typedef Self MeasurementVectorType
 
typedef VariableLengthVector
< ElementPrintType
PrintType
 
typedef VariableLengthVector
< ElementRealType
RealType
 
typedef ElementRealType ScalarRealType
 
typedef VariableLengthVector< 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 VariableLengthVector< T > &m)
 
static bool IsNegative (const Self &a)
 
static bool IsNonnegative (const Self &a)
 
static bool IsNonpositive (const Self &a)
 
static bool IsPositive (const Self &a)
 
static const Self max (const Self &a)
 
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 void SetLength (VariableLengthVector< T > &m, const unsigned int s)
 

Static Public Attributes

static const bool IsComplex = NumericTraits< ValueType >::IsComplex
 
static const bool IsInteger = NumericTraits< ValueType >::IsInteger
 
static const bool IsSigned = NumericTraits< ValueType >::IsSigned
 

Member Typedef Documentation

Unsigned component type

Definition at line 70 of file itkNumericTraitsVariableLengthVectorPixel.h.

Accumulation of addition and multiplication.

Definition at line 73 of file itkNumericTraitsVariableLengthVectorPixel.h.

template<typename T >
typedef NumericTraits< T >::AbsType itk::NumericTraits< VariableLengthVector< T > >::ElementAbsType

Definition at line 58 of file itkNumericTraitsVariableLengthVectorPixel.h.

Definition at line 59 of file itkNumericTraitsVariableLengthVectorPixel.h.

template<typename T >
typedef NumericTraits< T >::FloatType itk::NumericTraits< VariableLengthVector< T > >::ElementFloatType

Definition at line 60 of file itkNumericTraitsVariableLengthVectorPixel.h.

template<typename T >
typedef NumericTraits< T >::PrintType itk::NumericTraits< VariableLengthVector< T > >::ElementPrintType

Definition at line 61 of file itkNumericTraitsVariableLengthVectorPixel.h.

template<typename T >
typedef NumericTraits< T >::RealType itk::NumericTraits< VariableLengthVector< T > >::ElementRealType

Definition at line 62 of file itkNumericTraitsVariableLengthVectorPixel.h.

Typedef for operations that use floating point instead of real precision

Definition at line 77 of file itkNumericTraitsVariableLengthVectorPixel.h.

template<typename T >
typedef Self itk::NumericTraits< VariableLengthVector< T > >::MeasurementVectorType

Measurement vector type

Definition at line 89 of file itkNumericTraitsVariableLengthVectorPixel.h.

Return the type that can be printed.

Definition at line 80 of file itkNumericTraitsVariableLengthVectorPixel.h.

Type for real-valued scalar operations.

Definition at line 83 of file itkNumericTraitsVariableLengthVectorPixel.h.

Type for real-valued scalar operations.

Definition at line 86 of file itkNumericTraitsVariableLengthVectorPixel.h.

template<typename T >
typedef VariableLengthVector< T > itk::NumericTraits< VariableLengthVector< T > >::Self

Definition at line 67 of file itkNumericTraitsVariableLengthVectorPixel.h.

template<typename T >
typedef T itk::NumericTraits< VariableLengthVector< T > >::ValueType

Return the type of the native component type.

Definition at line 65 of file itkNumericTraitsVariableLengthVectorPixel.h.

Member Function Documentation

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

Definition at line 206 of file itkNumericTraitsVariableLengthVectorPixel.h.

template<typename T >
template<typename TArray >
static void itk::NumericTraits< VariableLengthVector< T > >::AssignToArray ( const Self v,
TArray &  mv 
)
inlinestatic
template<typename T >
static unsigned int itk::NumericTraits< VariableLengthVector< T > >::GetLength ( const VariableLengthVector< T > &  m)
inlinestatic

Return the size of the vector.

Definition at line 201 of file itkNumericTraitsVariableLengthVectorPixel.h.

References itk::VariableLengthVector< TValue >::GetSize().

template<typename T >
static bool itk::NumericTraits< VariableLengthVector< T > >::IsNegative ( const Self a)
inlinestatic
template<typename T >
static bool itk::NumericTraits< VariableLengthVector< T > >::IsNonnegative ( const Self a)
inlinestatic
template<typename T >
static bool itk::NumericTraits< VariableLengthVector< T > >::IsNonpositive ( const Self a)
inlinestatic
template<typename T >
static bool itk::NumericTraits< VariableLengthVector< T > >::IsPositive ( const Self a)
inlinestatic
template<typename T >
static const Self itk::NumericTraits< VariableLengthVector< 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 96 of file itkNumericTraitsVariableLengthVectorPixel.h.

References itk::VariableLengthVector< TValue >::Fill(), and itk::VariableLengthVector< TValue >::Size().

template<typename T >
static const Self itk::NumericTraits< VariableLengthVector< T > >::min ( const Self a)
inlinestatic
template<typename T >
static const Self itk::NumericTraits< VariableLengthVector< T > >::NonpositiveMin ( const Self a)
inlinestatic
template<typename T >
static const Self itk::NumericTraits< VariableLengthVector< T > >::OneValue ( const Self a)
inlinestatic
template<typename T >
static void itk::NumericTraits< VariableLengthVector< T > >::SetLength ( VariableLengthVector< T > &  m,
const unsigned int  s 
)
inlinestatic

Resize the input vector to the specified size.

Definition at line 193 of file itkNumericTraitsVariableLengthVectorPixel.h.

References itk::VariableLengthVector< TValue >::Fill(), and itk::VariableLengthVector< TValue >::SetSize().

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

Member Data Documentation

template<typename T >
const bool itk::NumericTraits< VariableLengthVector< T > >::IsComplex = NumericTraits< ValueType >::IsComplex
static

Definition at line 189 of file itkNumericTraitsVariableLengthVectorPixel.h.

template<typename T >
const bool itk::NumericTraits< VariableLengthVector< T > >::IsInteger = NumericTraits< ValueType >::IsInteger
static

Definition at line 188 of file itkNumericTraitsVariableLengthVectorPixel.h.

template<typename T >
const bool itk::NumericTraits< VariableLengthVector< T > >::IsSigned = NumericTraits< ValueType >::IsSigned
static

Definition at line 187 of file itkNumericTraitsVariableLengthVectorPixel.h.


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