18#ifndef itkNumericTraitsTensorPixel_h
19#define itkNumericTraitsTensorPixel_h
43template <
typename T,
unsigned int D>
146 static constexpr bool IsSigned = std::is_signed_v<ValueType>;
147 static constexpr bool IsInteger = std::is_integral_v<ValueType>;
157 if (s != D * (D + 1) / 2)
159 itkGenericExceptionMacro(
"Cannot set the size of a SymmetricSecondRankTensor "
161 << D <<
" ( = size of " << D * (D + 1) / 2 <<
") to " << s);
178 return D * (D + 1) / 2;
187 template <
typename TArray>
191 for (
unsigned int i = 0; i <
GetLength(); ++i)
void Fill(const ValueType &)
static const Self min(const Self &)
SymmetricSecondRankTensor< ElementAbsType, D > AbsType
static unsigned int GetLength()
static const Self ZeroValue()
SymmetricSecondRankTensor< T, D > Self
static const Self NonpositiveMin(const Self &)
SymmetricSecondRankTensor< ElementPrintType, D > PrintType
static const Self max(const Self &)
static const Self OneValue()
typename NumericTraits< T >::RealType ElementRealType
static void SetLength(SymmetricSecondRankTensor< T, D > &m, const unsigned int s)
SymmetricSecondRankTensor< ElementAccumulateType, D > AccumulateType
typename NumericTraits< T >::AccumulateType ElementAccumulateType
static unsigned int GetLength(const SymmetricSecondRankTensor< T, D > &)
typename NumericTraits< T >::PrintType ElementPrintType
static const Self ITKCommon_EXPORT Zero
typename NumericTraits< T >::AbsType ElementAbsType
static constexpr bool IsSigned
SymmetricSecondRankTensor< ElementFloatType, D > FloatType
static const Self ITKCommon_EXPORT One
typename NumericTraits< T >::FloatType ElementFloatType
static constexpr bool IsInteger
Self MeasurementVectorType
static const Self ZeroValue(const Self &)
static constexpr bool IsComplex
SymmetricSecondRankTensor< ElementRealType, D > RealType
static const Self OneValue(const Self &)
ElementRealType ScalarRealType
static void AssignToArray(const Self &v, MeasurementVectorType &mv)
static const Self NonpositiveMin()
static void AssignToArray(const Self &v, TArray &mv)
Define additional traits for native types such as int or float.
static constexpr T NonpositiveMin()
static constexpr T max(const T &)
static constexpr T min(const T &)
static unsigned int GetLength()
static constexpr bool IsComplex
Represent a symmetric tensor of second rank.
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
constexpr TContainer MakeFilled(typename TContainer::const_reference value)