#include <itkFixedArray.h>
Simulate a standard C array with copy semantics.
Simulates a standard C array, except that copy semantics are used instead of reference semantics. Also, arrays of different sizes cannot be assigned to one another, and size information is known for function returns.
| TValue | Element type stored at each location in the array. |
| VLength | = Length of the array. |
The length of the array is fixed at compile time. If you wish to specify the length of the array at run-time, use the class itk::Array. If you wish to change to change the length of the array at run-time, you're best off using std::vector<>.
Definition at line 53 of file itkFixedArray.h.
Inheritance diagram for itk::FixedArray< TValue, VLength >:Classes | |
| class | ConstReverseIterator |
| class | ReverseIterator |
Public Types | |
| using | CArray = ValueType[VLength] |
| using | const_iterator = const ValueType * |
| using | const_pointer = const ValueType * |
| using | const_reference = const ValueType & |
| using | const_reverse_iterator = std::reverse_iterator<const_iterator> |
| using | ConstIterator = const ValueType * |
| using | Iterator = ValueType * |
| using | iterator = ValueType * |
| using | pointer = ValueType * |
| using | reference = ValueType & |
| using | reverse_iterator = std::reverse_iterator<iterator> |
| using | SizeType = unsigned int |
| using | value_type = TValue |
| using | ValueType = TValue |
Public Member Functions | |
| constexpr reference | back () |
| constexpr const_reference | back () const |
| Iterator | Begin () |
| ConstIterator | Begin () const |
| constexpr const_iterator | begin () const noexcept |
| constexpr iterator | begin () noexcept |
| constexpr const_iterator | cbegin () const noexcept |
| constexpr const_iterator | cend () const noexcept |
| const_reverse_iterator | crbegin () const |
| const_reverse_iterator | crend () const |
| ValueType * | data () |
| const ValueType * | data () const |
| constexpr bool | empty () const noexcept |
| Iterator | End () |
| ConstIterator | End () const |
| constexpr const_iterator | end () const noexcept |
| constexpr iterator | end () noexcept |
| void | Fill (const ValueType &) |
| FixedArray ()=default | |
| template<typename TFixedArrayValueType> | |
| FixedArray (const FixedArray< TFixedArrayValueType, VLength > &r) | |
| FixedArray (const std::array< ValueType, VLength > &stdArray) | |
| template<typename TScalarValue> | |
| FixedArray (const TScalarValue *r) | |
| constexpr reference | front () |
| constexpr const_reference | front () const |
| ValueType * | GetDataPointer () |
| const ValueType * | GetDataPointer () const |
| ITK_UNEQUAL_OPERATOR_MEMBER_FUNCTION (FixedArray) | |
| template<typename TFixedArrayValueType> | |
| FixedArray & | operator= (const FixedArray< TFixedArrayValueType, VLength > &r) |
| FixedArray & | operator= (const ValueType r[VLength]) |
| bool | operator== (const FixedArray &r) const |
| ReverseIterator | rBegin () |
| ConstReverseIterator | rBegin () const |
| reverse_iterator | rbegin () |
| const_reverse_iterator | rbegin () const |
| ReverseIterator | rEnd () |
| ConstReverseIterator | rEnd () const |
| reverse_iterator | rend () |
| const_reverse_iterator | rend () const |
| SizeType | Size () const |
| constexpr SizeType | size () const |
| void | swap (FixedArray &other) noexcept |
| FixedArray (const ValueType r[VLength]) | |
| FixedArray (const ValueType &) | |
| ITK_GCC_PRAGMA_PUSH ITK_GCC_SUPPRESS_Warray_bounds constexpr reference | operator[] (unsigned int index) |
| constexpr const_reference | operator[] (unsigned int index) const |
| ITK_GCC_PRAGMA_POP void | SetElement (unsigned int index, const_reference value) |
| const_reference | GetElement (unsigned int index) const |
Static Public Member Functions | |
| static constexpr FixedArray | Filled (const ValueType &value) |
Static Public Attributes | |
| static constexpr unsigned int | Dimension = VLength |
| static constexpr unsigned int | Length = VLength |
Private Attributes | |
| CArray | m_InternalArray |
| using itk::FixedArray< TValue, VLength >::CArray = ValueType[VLength] |
A type representing the C-array version of this FixedArray.
Definition at line 68 of file itkFixedArray.h.
| using itk::FixedArray< TValue, VLength >::const_iterator = const ValueType * |
| using itk::FixedArray< TValue, VLength >::const_pointer = const ValueType * |
A const pointer to the ValueType.
Definition at line 195 of file itkFixedArray.h.
| using itk::FixedArray< TValue, VLength >::const_reference = const ValueType & |
A const reference to the ValueType.
Definition at line 201 of file itkFixedArray.h.
| using itk::FixedArray< TValue, VLength >::const_reverse_iterator = std::reverse_iterator<const_iterator> |
Definition at line 211 of file itkFixedArray.h.
| using itk::FixedArray< TValue, VLength >::ConstIterator = const ValueType * |
A const iterator through the array.
Definition at line 74 of file itkFixedArray.h.
| using itk::FixedArray< TValue, VLength >::Iterator = ValueType * |
An iterator through the array.
Definition at line 71 of file itkFixedArray.h.
| using itk::FixedArray< TValue, VLength >::iterator = ValueType * |
The return type of the non-const overloads of begin() and end().
Definition at line 204 of file itkFixedArray.h.
| using itk::FixedArray< TValue, VLength >::pointer = ValueType * |
A pointer to the ValueType.
Definition at line 192 of file itkFixedArray.h.
| using itk::FixedArray< TValue, VLength >::reference = ValueType & |
A reference to the ValueType.
Definition at line 198 of file itkFixedArray.h.
| using itk::FixedArray< TValue, VLength >::reverse_iterator = std::reverse_iterator<iterator> |
Definition at line 209 of file itkFixedArray.h.
| using itk::FixedArray< TValue, VLength >::SizeType = unsigned int |
Definition at line 213 of file itkFixedArray.h.
| using itk::FixedArray< TValue, VLength >::value_type = TValue |
The type of an element.
Definition at line 189 of file itkFixedArray.h.
| using itk::FixedArray< TValue, VLength >::ValueType = TValue |
The element type stored at each location in the FixedArray.
Definition at line 65 of file itkFixedArray.h.
|
default |
Default-constructor.
| itk::FixedArray< TValue, VLength >::FixedArray | ( | const ValueType | r[VLength] | ) |
Conversion constructors.
Constructor assumes input points to array of correct size. Values are copied individually instead of with a binary copy. This allows the ValueType's assignment operator to be executed.
| itk::FixedArray< TValue, VLength >::FixedArray | ( | const ValueType & | ) |
Conversion constructors.
Constructor assumes input points to array of correct size. Values are copied individually instead of with a binary copy. This allows the ValueType's assignment operator to be executed.
|
inlineexplicit |
Explicit constructor for std::array.
Definition at line 231 of file itkFixedArray.h.
|
inline |
Constructor to initialize a fixed array from another of any data type
Definition at line 238 of file itkFixedArray.h.
|
inline |
Definition at line 249 of file itkFixedArray.h.
|
inlinenodiscardconstexpr |
Definition at line 330 of file itkFixedArray.h.
|
inlinenodiscardconstexpr |
Definition at line 336 of file itkFixedArray.h.
| Iterator itk::FixedArray< TValue, VLength >::Begin | ( | ) |
Get an Iterator for the beginning of the FixedArray.
Referenced by itk::DTITubeSpatialObjectPoint< TDimension >::SetTensorMatrix(), and itk::DTITubeSpatialObjectPoint< TDimension >::SetTensorMatrix().
|
nodiscard |
Get a ConstIterator for the beginning of the FixedArray.
|
inlinenodiscardconstexprnoexcept |
Definition at line 407 of file itkFixedArray.h.
|
inlinenodiscardconstexprnoexcept |
Definition at line 401 of file itkFixedArray.h.
|
inlinenodiscardconstexprnoexcept |
Definition at line 395 of file itkFixedArray.h.
Referenced by itk::FixedArray< CoordinateType, VPointDimension *2 >::FixedArray(), and itk::FixedArray< CoordinateType, VPointDimension *2 >::operator=().
|
inlinenodiscardconstexprnoexcept |
Definition at line 413 of file itkFixedArray.h.
|
inlinenodiscard |
Definition at line 437 of file itkFixedArray.h.
|
inlinenodiscard |
Definition at line 455 of file itkFixedArray.h.
|
inlinenodiscard |
Definition at line 355 of file itkFixedArray.h.
|
inlinenodiscard |
Definition at line 361 of file itkFixedArray.h.
|
inlinenodiscardconstexprnoexcept |
Definition at line 477 of file itkFixedArray.h.
| Iterator itk::FixedArray< TValue, VLength >::End | ( | ) |
Get an Iterator for the end of the FixedArray.
Referenced by itk::DTITubeSpatialObjectPoint< TDimension >::SetTensorMatrix(), and itk::DTITubeSpatialObjectPoint< TDimension >::SetTensorMatrix().
|
nodiscard |
Get a ConstIterator for the end of the FixedArray.
|
inlinenodiscardconstexprnoexcept |
Definition at line 425 of file itkFixedArray.h.
|
inlinenodiscardconstexprnoexcept |
Definition at line 419 of file itkFixedArray.h.
| void itk::FixedArray< TValue, VLength >::Fill | ( | const ValueType & | ) |
Set all the elements of the container to the input value.
Referenced by itk::RGBAPixel< T >::RGBAPixel(), itk::NumericTraits< CovariantVector< T, D > >::SetLength(), itk::NumericTraits< DiffusionTensor3D< T > >::SetLength(), itk::NumericTraits< FixedArray< T, D > >::SetLength(), itk::NumericTraits< Point< T, D > >::SetLength(), itk::NumericTraits< RGBAPixel< T > >::SetLength(), itk::NumericTraits< RGBPixel< T > >::SetLength(), itk::NumericTraits< SymmetricSecondRankTensor< T, D > >::SetLength(), and itk::NumericTraits< Vector< T, D > >::SetLength().
|
inlinestaticconstexpr |
Return an FixedArray with the given value assigned to all elements.
Definition at line 499 of file itkFixedArray.h.
|
inlinenodiscardconstexpr |
Definition at line 318 of file itkFixedArray.h.
|
inlinenodiscardconstexpr |
Definition at line 324 of file itkFixedArray.h.
|
inline |
Return a pointer to the data.
Definition at line 343 of file itkFixedArray.h.
Referenced by itk::Accessor::RGBToVectorPixelAccessor< T >::Get(), itk::Accessor::VectorToRGBPixelAccessor< T >::Get(), itk::MetaArrayWriter::SetInput(), itk::MetaArrayWriter::SetInput(), itk::MetaArrayWriter::SetInput(), itk::GradientImageFilter< TInputImage, TOperatorValueType, TOutputValueType, TOutputImageType >::SetOutputPixel(), itk::ImageBase< VImageDimension >::TransformLocalVectorToPhysicalVector(), itk::GradientRecursiveGaussianImageFilter< MovingImageType, GradientImageType >::TransformOutputPixel(), and itk::ImageBase< VImageDimension >::TransformPhysicalVectorToLocalVector().
|
inlinenodiscard |
Definition at line 349 of file itkFixedArray.h.
|
inlinenodiscard |
Set/Get element methods are more convenient in wrapping languages
Definition at line 311 of file itkFixedArray.h.
| itk::FixedArray< TValue, VLength >::ITK_UNEQUAL_OPERATOR_MEMBER_FUNCTION | ( | FixedArray< TValue, VLength > | ) |
|
inline |
Operator= defined for a variety of types.
The assignment operator assumes input points to array of correct size. Values are copied individually instead of with a binary copy. This allows the ValueType's assignment operator to be executed.
Definition at line 262 of file itkFixedArray.h.
| FixedArray & itk::FixedArray< TValue, VLength >::operator= | ( | const ValueType | r[VLength] | ) |
| bool itk::FixedArray< TValue, VLength >::operator== | ( | const FixedArray< TValue, VLength > & | r | ) | const |
Operators == and != are used to compare whether two arrays are equal. Note that arrays are equal when the number of components (size) is the same, and each component value is equal.
Referenced by itk::Point< CoordinateType, VPointDimension >::operator==().
|
inlineconstexpr |
Allow the FixedArray to be indexed normally. No bounds checking is done.
Definition at line 292 of file itkFixedArray.h.
Referenced by itk::RGBAPixel< T >::GetAlpha(), itk::RGBAPixel< T >::GetBlue(), itk::RGBAPixel< T >::GetGreen(), itk::RGBAPixel< T >::GetNthComponent(), itk::RGBAPixel< T >::GetRed(), itk::RGBAPixel< T >::Set(), itk::RGBAPixel< T >::SetAlpha(), itk::RGBAPixel< T >::SetBlue(), itk::RGBAPixel< T >::SetGreen(), itk::RGBAPixel< T >::SetNthComponent(), and itk::RGBAPixel< T >::SetRed().
|
inlineconstexpr |
Allow the FixedArray to be indexed normally. No bounds checking is done.
Definition at line 297 of file itkFixedArray.h.
| ReverseIterator itk::FixedArray< TValue, VLength >::rBegin | ( | ) |
Get a begin ReverseIterator.
| ConstReverseIterator itk::FixedArray< TValue, VLength >::rBegin | ( | ) | const |
Get a begin ConstReverseIterator.
|
inlinenodiscard |
Definition at line 431 of file itkFixedArray.h.
|
inlinenodiscard |
Definition at line 443 of file itkFixedArray.h.
| ReverseIterator itk::FixedArray< TValue, VLength >::rEnd | ( | ) |
Get an end ReverseIterator.
| ConstReverseIterator itk::FixedArray< TValue, VLength >::rEnd | ( | ) | const |
Get an end ConstReverseIterator.
|
inlinenodiscard |
Definition at line 449 of file itkFixedArray.h.
|
inlinenodiscard |
Definition at line 461 of file itkFixedArray.h.
|
inline |
Set/Get element methods are more convenient in wrapping languages
Definition at line 306 of file itkFixedArray.h.
|
nodiscard |
Size of the container.
|
inlinenodiscardconstexpr |
Definition at line 471 of file itkFixedArray.h.
|
inlinenoexcept |
Definition at line 487 of file itkFixedArray.h.
|
staticconstexpr |
Dimension constant
Definition at line 62 of file itkFixedArray.h.
|
staticconstexpr |
Length constant
Definition at line 59 of file itkFixedArray.h.
|
private |
Internal C array representation.
Definition at line 494 of file itkFixedArray.h.