23#include "vxl_version.h"
24#include "vnl/vnl_vector.h"
46template <
typename TValue>
47class ITK_TEMPLATE_EXPORT
Array :
public vnl_vector<TValue>
85#if defined(ITK_LEGACY_REMOVE)
97 Array(const ValueType * datain, SizeValueType sz, bool LetArrayManageMemory = false);
101 template <
typename TArrayValue>
107 this->operator[](i) =
static_cast<TValue
>(r[i]);
143 return this->operator[](i);
150 this->operator[](i) = value;
186#ifdef __INTEL_COMPILER
187# pragma warning disable 444
193#if !defined(ITK_LEGACY_REMOVE)
206 swap(this->m_LetArrayManageMemory, other.m_LetArrayManageMemory);
211 bool m_LetArrayManageMemory{
true };
214template <
typename TValue>
219 const unsigned int length = arr.size();
222 const unsigned int last = length - 1;
223 for (
unsigned int i = 0; i < last; ++i)
225 os << arr[i] <<
", ";
249#ifndef ITK_MANUAL_INSTANTIATION
250# include "itkArray.hxx"
Pixel-wise addition of two images.
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 Array< TArrayValue > &r)
vnl_vector< TValue > VnlVectorType
void Swap(Array &other) noexcept
unsigned int GetNumberOfElements() const
Self & operator=(const VnlVectorType &rhs)
Array(SizeValueType dimension)
const TValue & GetElement(SizeValueType i) const
void Fill(TValue const &v)
Array(const ValueType *datain, SizeValueType sz)
Array(SizeValueType dimension, const ValueType &value)
void SetSize(SizeValueType sz)
typename vnl_vector< TValue >::size_type SizeValueType
Self & operator=(const Self &rhs)
Array(const VnlVectorType &)
Array(ValueType *datain, SizeValueType sz, bool LetArrayManageMemory=false)
void SetDataSameSize(TValue *datain, bool LetArrayManageMemory=false)
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
ITKCommon_EXPORT std::ostream & operator<<<double >(std::ostream &os, const Array< double > &arr)
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)