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

#include <itkNumericTraitsVariableLengthVectorPixel.h>

Public Types

using AbsType = VariableLengthVector< ElementAbsType >
 
using AccumulateType = VariableLengthVector< ElementAccumulateType >
 
using ElementAbsType = typename NumericTraits< T >::AbsType
 
using ElementAccumulateType = typename NumericTraits< T >::AccumulateType
 
using ElementFloatType = typename NumericTraits< T >::FloatType
 
using ElementPrintType = typename NumericTraits< T >::PrintType
 
using ElementRealType = typename NumericTraits< T >::RealType
 
using FloatType = VariableLengthVector< ElementFloatType >
 
using MeasurementVectorType = Self
 
using PrintType = VariableLengthVector< ElementPrintType >
 
using RealType = VariableLengthVector< ElementRealType >
 
using ScalarRealType = ElementRealType
 
using Self = VariableLengthVector< T >
 
using ValueType = T
 

Static Public Member Functions

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 unsigned int GetLength (const VariableLengthVector< T > &m)
 
static void AssignToArray (const Self &v, MeasurementVectorType &mv)
 
template<typename TArray >
static void AssignToArray (const Self &v, TArray &mv)
 

Static Public Attributes

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

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.

Member Typedef Documentation

◆ AbsType

Unsigned component type

Definition at line 69 of file itkNumericTraitsVariableLengthVectorPixel.h.

◆ AccumulateType

Accumulation of addition and multiplication.

Definition at line 72 of file itkNumericTraitsVariableLengthVectorPixel.h.

◆ ElementAbsType

template<typename T >
using itk::NumericTraits< VariableLengthVector< T > >::ElementAbsType = typename NumericTraits<T>::AbsType

Definition at line 57 of file itkNumericTraitsVariableLengthVectorPixel.h.

◆ ElementAccumulateType

template<typename T >
using itk::NumericTraits< VariableLengthVector< T > >::ElementAccumulateType = typename NumericTraits<T>::AccumulateType

Definition at line 58 of file itkNumericTraitsVariableLengthVectorPixel.h.

◆ ElementFloatType

template<typename T >
using itk::NumericTraits< VariableLengthVector< T > >::ElementFloatType = typename NumericTraits<T>::FloatType

Definition at line 59 of file itkNumericTraitsVariableLengthVectorPixel.h.

◆ ElementPrintType

template<typename T >
using itk::NumericTraits< VariableLengthVector< T > >::ElementPrintType = typename NumericTraits<T>::PrintType

Definition at line 60 of file itkNumericTraitsVariableLengthVectorPixel.h.

◆ ElementRealType

template<typename T >
using itk::NumericTraits< VariableLengthVector< T > >::ElementRealType = typename NumericTraits<T>::RealType

Definition at line 61 of file itkNumericTraitsVariableLengthVectorPixel.h.

◆ FloatType

Typedef for operations that use floating point instead of real precision

Definition at line 76 of file itkNumericTraitsVariableLengthVectorPixel.h.

◆ MeasurementVectorType

template<typename T >
using itk::NumericTraits< VariableLengthVector< T > >::MeasurementVectorType = Self

Measurement vector type

Definition at line 88 of file itkNumericTraitsVariableLengthVectorPixel.h.

◆ PrintType

Return the type that can be printed.

Definition at line 79 of file itkNumericTraitsVariableLengthVectorPixel.h.

◆ RealType

Type for real-valued scalar operations.

Definition at line 82 of file itkNumericTraitsVariableLengthVectorPixel.h.

◆ ScalarRealType

Type for real-valued scalar operations.

Definition at line 85 of file itkNumericTraitsVariableLengthVectorPixel.h.

◆ Self

template<typename T >
using itk::NumericTraits< VariableLengthVector< T > >::Self = VariableLengthVector<T>

Definition at line 66 of file itkNumericTraitsVariableLengthVectorPixel.h.

◆ ValueType

template<typename T >
using itk::NumericTraits< VariableLengthVector< T > >::ValueType = T

Return the type of the native component type.

Definition at line 64 of file itkNumericTraitsVariableLengthVectorPixel.h.

Member Function Documentation

◆ AssignToArray() [1/2]

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

Resize the input vector to the specified size.

Definition at line 217 of file itkNumericTraitsVariableLengthVectorPixel.h.

◆ AssignToArray() [2/2]

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

Resize the input vector to the specified size.

Definition at line 224 of file itkNumericTraitsVariableLengthVectorPixel.h.

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

◆ GetLength()

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 211 of file itkNumericTraitsVariableLengthVectorPixel.h.

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

◆ IsNegative()

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

◆ IsNonnegative()

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

◆ IsNonpositive()

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

◆ IsPositive()

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

◆ max()

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().

◆ min()

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

◆ NonpositiveMin()

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

◆ OneValue()

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

◆ SetLength()

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 202 of file itkNumericTraitsVariableLengthVectorPixel.h.

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

◆ ZeroValue()

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

Member Data Documentation

◆ IsComplex

template<typename T >
constexpr bool itk::NumericTraits< VariableLengthVector< T > >::IsComplex = NumericTraits<ValueType>::IsComplex
staticconstexpr

Definition at line 197 of file itkNumericTraitsVariableLengthVectorPixel.h.

◆ IsInteger

template<typename T >
constexpr bool itk::NumericTraits< VariableLengthVector< T > >::IsInteger = NumericTraits<ValueType>::IsInteger
staticconstexpr

Definition at line 196 of file itkNumericTraitsVariableLengthVectorPixel.h.

◆ IsSigned

template<typename T >
constexpr bool itk::NumericTraits< VariableLengthVector< T > >::IsSigned = NumericTraits<ValueType>::IsSigned
staticconstexpr

Definition at line 195 of file itkNumericTraitsVariableLengthVectorPixel.h.


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