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)
Pixel-wise addition of two images.
void Fill(const ValueType &)
static const Self min(const Self &)
static unsigned int GetLength()
static const Self ZeroValue()
static const Self NonpositiveMin(const Self &)
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)
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 const Self ITKCommon_EXPORT One
typename NumericTraits< T >::FloatType ElementFloatType
static const Self ZeroValue(const Self &)
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 bool IsInteger
static constexpr bool IsSigned
static constexpr T NonpositiveMin()
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....