18#ifndef itkFixedArray_h
19#define itkFixedArray_h
52template <
typename TValue,
unsigned int VLength = 3>
55 static_assert(VLength > 0);
59 static constexpr unsigned int Length = VLength;
76 class ConstReverseIterator;
231 explicit FixedArray(
const std::array<ValueType, VLength> & stdArray)
237 template <
typename TFixedArrayValueType>
244 element =
static_cast<TValue
>(*input++);
248 template <
typename TScalarValue>
260 template <
typename TFixedArrayValueType>
268 element =
static_cast<TValue
>(*input++);
290 ITK_GCC_SUPPRESS_Warray_bounds
296 constexpr const_reference
310 [[nodiscard]] const_reference
317 [[nodiscard]]
constexpr reference
323 [[nodiscard]]
constexpr const_reference
329 [[nodiscard]]
constexpr reference
335 [[nodiscard]]
constexpr const_reference
348 [[nodiscard]]
const ValueType *
354 [[nodiscard]] ValueType *
360 [[nodiscard]]
const ValueType *
383 itkLegacyMacro(ReverseIterator
rBegin();)
386 itkLegacyMacro(ConstReverseIterator
rBegin()
const;)
389 itkLegacyMacro(ReverseIterator
rEnd();)
392 itkLegacyMacro(ConstReverseIterator
rEnd()
const;)
400 [[nodiscard]]
constexpr iterator
406 [[nodiscard]]
constexpr const_iterator
412 [[nodiscard]]
constexpr const_iterator
418 [[nodiscard]]
constexpr iterator
424 [[nodiscard]]
constexpr const_iterator
430 [[nodiscard]] reverse_iterator
436 [[nodiscard]] const_reverse_iterator
442 [[nodiscard]] const_reverse_iterator
448 [[nodiscard]] reverse_iterator
454 [[nodiscard]] const_reverse_iterator
460 [[nodiscard]] const_reverse_iterator
463 return this->
crend();
467 [[nodiscard]] SizeType
476 [[nodiscard]]
constexpr bool
505template <
typename TValue,
unsigned int VLength>
510template <
typename TValue,
unsigned int VLength>
519#ifndef ITK_MANUAL_INSTANTIATION
520# include "itkFixedArray.hxx"
A const reverse iterator through an array.
ConstReverseIterator operator--(int)
ITK_UNEQUAL_OPERATOR_MEMBER_FUNCTION(ConstReverseIterator)
ConstReverseIterator(ConstIterator i)
ConstReverseIterator operator--()
ConstReverseIterator operator++()
const ValueType & operator*() const
ConstReverseIterator(const ReverseIterator &rit)
ConstIterator operator->() const
ConstReverseIterator operator++(int)
bool operator==(const ConstReverseIterator &rit) const
A reverse iterator through an array.
bool operator==(const ReverseIterator &rit) const
ReverseIterator operator--()
ReverseIterator operator++()
ReverseIterator operator--(int)
ITK_UNEQUAL_OPERATOR_MEMBER_FUNCTION(ReverseIterator)
ReverseIterator(Iterator i)
friend class ConstReverseIterator
Iterator operator->() const
ValueType & operator*() const
ReverseIterator operator++(int)
Simulate a standard C array with copy semantics.
ConstIterator End() const
bool operator==(const FixedArray &r) const
constexpr SizeType size() const
void swap(FixedArray &other) noexcept
const ValueType * const_iterator
CoordinateType value_type
std::reverse_iterator< iterator > reverse_iterator
constexpr const_reference operator[](unsigned int index) const
const_reverse_iterator crend() const
FixedArray(const ValueType r[VLength])
const ValueType * GetDataPointer() const
constexpr iterator begin() noexcept
FixedArray(const ValueType &)
constexpr const_iterator cbegin() const noexcept
const ValueType * data() const
ValueType * GetDataPointer()
constexpr reference back()
FixedArray(const std::array< ValueType, VLength > &stdArray)
const ValueType * ConstIterator
ValueType[VLength] CArray
const_reverse_iterator crbegin() const
constexpr iterator end() noexcept
reverse_iterator rbegin()
FixedArray(const TScalarValue *r)
static constexpr FixedArray Filled(const ValueType &value)
const_reverse_iterator rend() const
ConstReverseIterator rBegin() const
const_reference GetElement(unsigned int index) const
constexpr const_iterator cend() const noexcept
static constexpr unsigned int Dimension
FixedArray & operator=(const FixedArray< TFixedArrayValueType, VLength > &r)
std::reverse_iterator< const_iterator > const_reverse_iterator
ConstReverseIterator rEnd() const
const ValueType & const_reference
FixedArray & operator=(const ValueType r[VLength])
static constexpr unsigned int Length
constexpr const_iterator begin() const noexcept
ITK_GCC_PRAGMA_PUSH ITK_GCC_SUPPRESS_Warray_bounds constexpr reference operator[](unsigned int index)
constexpr reference front()
constexpr bool empty() const noexcept
constexpr const_iterator end() const noexcept
ConstIterator Begin() const
ITK_UNEQUAL_OPERATOR_MEMBER_FUNCTION(FixedArray)
const ValueType * const_pointer
const_reverse_iterator rbegin() const
FixedArray(const FixedArray< TFixedArrayValueType, VLength > &r)
constexpr const_reference back() const
ITK_GCC_PRAGMA_POP void SetElement(unsigned int index, const_reference value)
constexpr const_reference front() const
void Fill(const ValueType &)
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
constexpr TContainer MakeFilled(typename TContainer::const_reference value)
void swap(Array< T > &a, Array< T > &b) noexcept
ITKCommon_EXPORT std::ostream & operator<<(std::ostream &out, typename AnatomicalOrientation::CoordinateEnum value)