23#include "vxl_version.h"
24#include "vnl/vnl_vector.h"
46template <
typename TValue>
47class ITK_TEMPLATE_EXPORT
Array :
public vnl_vector<TValue>
86#if defined(ITK_LEGACY_REMOVE)
104 template <
typename TArrayValue>
110 this->operator[](i) =
static_cast<TValue
>(r[i]);
146 return this->operator[](i);
153 this->operator[](i) = value;
189#ifdef __INTEL_COMPILER
190# pragma warning disable 444
196#if !defined(ITK_LEGACY_REMOVE)
208 this->VnlVectorType::swap(other);
218template <
typename TValue>
221template <
typename TValue>
226 const unsigned int length = arr.size();
229 const unsigned int last = length - 1;
230 for (
unsigned int i = 0; i < last; ++i)
232 os << arr[i] <<
", ";
256#ifndef ITK_MANUAL_INSTANTIATION
257# include "itkArray.hxx"
Array class with size defined at construction time.
void SetData(TValue *datain, SizeValueType sz, bool LetArrayManageMemory=false)
SizeValueType Size() const
void SetElement(SizeValueType i, const TValue &value)
SizeValueType GetSize() const
Array(const TValue *datain, SizeValueType sz)
Array(const Array< TArrayValue > &r)
vnl_vector< TValue > VnlVectorType
void Swap(Array &other) noexcept
unsigned int GetNumberOfElements() const
Self & operator=(const VnlVectorType &rhs)
Array(TValue *datain, SizeValueType sz, bool LetArrayManageMemory=false)
Array(SizeValueType dimension)
const TValue & GetElement(SizeValueType i) const
Array(SizeValueType dimension, const ValueType &value)
void Fill(const TValue &v)
void SetSize(SizeValueType sz)
typename vnl_vector< TValue >::size_type SizeValueType
Self & operator=(const Self &rhs)
Array(const VnlVectorType &)
void SetDataSameSize(TValue *datain, bool LetArrayManageMemory=false)
bool m_LetArrayManageMemory
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
void swap(Array< T > &a, Array< T > &b) noexcept
ITKCommon_EXPORT std::ostream & operator<<< float >(std::ostream &os, const Array< float > &arr)
ITKCommon_EXPORT std::ostream & operator<<(std::ostream &out, typename AnatomicalOrientation::CoordinateEnum value)
ITKCommon_EXPORT std::ostream & operator<<< double >(std::ostream &os, const Array< double > &arr)
Array(TValue *, typename vnl_vector< TValue >::size_type, bool) -> Array< TValue >