18#ifndef itkNumericTraitsFixedArrayPixel_h
19#define itkNumericTraitsFixedArrayPixel_h
43template <
typename T,
unsigned int D>
154 itkGenericExceptionMacro(
"Cannot set the size of a FixedArray of length " << D <<
" to " << s);
179 template <
typename TArray>
183 for (
unsigned int i = 0; i < D; ++i)
201#define itkStaticNumericTraitsGenericArrayMacro(GENERIC_ARRAY, T, D) \
203 ITKCommon_EXPORT const GENERIC_ARRAY<T, D> NumericTraits<GENERIC_ARRAY<T, D>>::Zero = \
204 MakeFilled<GENERIC_ARRAY<T, D>>(NumericTraits<T>::Zero); \
206 ITKCommon_EXPORT const GENERIC_ARRAY<T, D> NumericTraits<GENERIC_ARRAY<T, D>>::One = \
207 MakeFilled<GENERIC_ARRAY<T, D>>(NumericTraits<T>::One); \
208 ITK_MACROEND_NOOP_STATEMENT
214#define itkStaticNumericTraitsGenericArrayDimensionsMacro(GENERIC_ARRAY, T) \
215 itkStaticNumericTraitsGenericArrayMacro(GENERIC_ARRAY, T, 1); \
216 itkStaticNumericTraitsGenericArrayMacro(GENERIC_ARRAY, T, 2); \
217 itkStaticNumericTraitsGenericArrayMacro(GENERIC_ARRAY, T, 3); \
218 itkStaticNumericTraitsGenericArrayMacro(GENERIC_ARRAY, T, 4); \
219 itkStaticNumericTraitsGenericArrayMacro(GENERIC_ARRAY, T, 5); \
220 itkStaticNumericTraitsGenericArrayMacro(GENERIC_ARRAY, T, 6); \
221 itkStaticNumericTraitsGenericArrayMacro(GENERIC_ARRAY, T, 7); \
222 itkStaticNumericTraitsGenericArrayMacro(GENERIC_ARRAY, T, 8); \
223 itkStaticNumericTraitsGenericArrayMacro(GENERIC_ARRAY, T, 9); \
224 itkStaticNumericTraitsGenericArrayMacro(GENERIC_ARRAY, T, 10); \
225 ITK_MACROEND_NOOP_STATEMENT
Simulate a standard C array with copy semantics.
void Fill(const ValueType &)
static const Self ZeroValue()
static const Self ITKCommon_EXPORT Zero
FixedArray< ElementAbsType, D > AbsType
typename NumericTraits< T >::AbsType ElementAbsType
static void AssignToArray(const Self &v, MeasurementVectorType &mv)
FixedArray< ElementPrintType, D > PrintType
static const Self max(const Self &)
static const Self ITKCommon_EXPORT One
static unsigned int GetLength(const FixedArray< T, D > &)
ElementRealType ScalarRealType
static unsigned int GetLength()
static const Self ZeroValue(const Self &)
typename NumericTraits< T >::FloatType ElementFloatType
FixedArray< ElementFloatType, D > FloatType
static void AssignToArray(const Self &v, TArray &mv)
FixedArray< ElementRealType, D > RealType
static const Self OneValue(const Self &)
static const Self OneValue()
static const Self min(const Self &)
Self MeasurementVectorType
typename NumericTraits< T >::PrintType ElementPrintType
typename NumericTraits< T >::AccumulateType ElementAccumulateType
static const Self NonpositiveMin()
typename NumericTraits< T >::RealType ElementRealType
static void SetLength(FixedArray< T, D > &m, const unsigned int s)
FixedArray< ElementAccumulateType, D > AccumulateType
static const Self NonpositiveMin(const Self &)
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 &)
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
constexpr TContainer MakeFilled(typename TContainer::const_reference value)