|
ITK
6.0.0
Insight Toolkit
|
Go to the documentation of this file.
23 #include "vxl_version.h"
24 #include "vnl/vnl_vector.h"
46 template <
typename TValue>
47 class ITK_TEMPLATE_EXPORT
Array :
public vnl_vector<TValue>
85 #if defined(ITK_LEGACY_REMOVE)
92 #else // defined ( ITK_LEGACY_REMOVE )
101 template <
typename TArrayValue>
107 this->operator[](i) = static_cast<TValue>(r[i]);
121 operator=(
const Self & rhs);
124 operator=(
const VnlVectorType & rhs);
130 return static_cast<SizeValueType>(this->size());
135 return static_cast<SizeValueType>(this->size());
143 return this->operator[](i);
150 this->operator[](i) = value;
160 return static_cast<SizeValueType>(this->size());
172 SetDataSameSize(TValue * datain,
bool LetArrayManageMemory =
false);
184 SetData(TValue * datain,
SizeValueType sz,
bool LetArrayManageMemory =
false);
186 #ifdef __INTEL_COMPILER
187 # pragma warning disable 444 // destructor for base class "itk::Array<>" is not virtual
193 #if !defined(ITK_LEGACY_REMOVE)
206 swap(this->m_LetArrayManageMemory, other.m_LetArrayManageMemory);
211 bool m_LetArrayManageMemory{
true };
214 template <
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] <<
", ";
235 ITKCommon_EXPORT std::ostream &
operator<< <double>(std::ostream & os,
const Array<double> & arr);
237 ITKCommon_EXPORT std::ostream &
operator<< <float>(std::ostream & os,
const Array<float> & arr);
240 template <
typename T>
249 #ifndef ITK_MANUAL_INSTANTIATION
250 # include "itkArray.hxx"
void SetElement(SizeValueType i, const TValue &value)
const TValue & GetElement(SizeValueType i) const
Array(const Array< TArrayValue > &r)
typename vnl_vector< TParametersValueType >::size_type SizeValueType
ITKCommon_EXPORT std::ostream & operator<<(std::ostream &out, typename AnatomicalOrientation::CoordinateEnum value)
void Fill(const TValue &v)
vnl_vector< TParametersValueType > VnlVectorType
SizeValueType GetSize() const
ITKCommon_EXPORT std::ostream & operator<<< float >(std::ostream &os, const Array< float > &arr)
TParametersValueType ValueType
void swap(Array< T > &a, Array< T > &b) noexcept
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Array class with size defined at construction time.
ITKCommon_EXPORT std::ostream & operator<<< double >(std::ostream &os, const Array< double > &arr)
SizeValueType Size() const
void Swap(Array &other) noexcept
unsigned long SizeValueType
unsigned int GetNumberOfElements() const