18#ifndef itkMetaArrayReader_h
19#define itkMetaArrayReader_h
20#include "ITKIOMetaExport.h"
46 itkSetStringMacro(FileName);
49 itkGetStringMacro(FileName);
107 template <
typename TValue>
109 GetElement(TValue & value,
unsigned int i,
unsigned int channel = 0)
const
111 value =
static_cast<TValue
>(
m_MetaArray.ElementData(i *
m_MetaArray.ElementNumberOfChannels() + channel));
122 template <
typename TValue>
128 m_MetaArray.ConvertElementDataTo(_metaElementType);
131 if (_letArrayManageData)
139 template <
typename TValue,
unsigned int VLength>
143 if (
static_cast<int>(VLength) <=
m_MetaArray.Length())
145 for (
unsigned int i = 0; i < VLength; ++i)
158 template <
typename TValue,
unsigned int VLength>
162 if (
static_cast<int>(VLength) <=
m_MetaArray.Length())
164 for (
unsigned int i = 0; i < VLength; ++i)
178 template <
typename TValue,
unsigned int VLength>
182 if (
static_cast<int>(VLength) <=
m_MetaArray.Length())
184 for (
unsigned int i = 0; i < VLength; ++i)
203 template <
typename TValue>
207 bool _letVectorManageData =
true)
211 m_MetaArray.ConvertElementDataTo(_metaElementType);
214 if (_letVectorManageData)
226 template <
typename TValue>
232 m_MetaArray.ConvertElementDataTo(_metaElementType);
237 for (
int i = 0; i < rows; ++i)
239 (*_array)[i].SetSize(cols);
240 for (
int j = 0; j < cols; ++j)
242 (*_array)[i][j] =
static_cast<typename TValue::ValueType
>(
m_MetaArray.ElementData(i * cols + j));
Array class with size defined at construction time.
void SetData(TValue *datain, SizeValueType sz, bool LetArrayManageMemory=false)
void SetSize(SizeValueType sz)
A templated class holding a n-Dimensional covariant vector.
Simulate a standard C array with copy semantics.
Control indentation during Print() invocation.
Implements transparent reference counting.
A templated class holding a n-Dimensional vector.
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....