18#ifndef itkMetaArrayWriter_h
19#define itkMetaArrayWriter_h
20#include "ITKIOMetaExport.h"
47 itkSetStringMacro(FileName);
48 itkGetStringMacro(FileName);
53 itkSetStringMacro(DataFileName);
54 itkGetStringMacro(DataFileName);
61 itkBooleanMacro(Binary);
62 itkSetMacro(Binary,
bool);
63 itkGetConstMacro(Binary,
bool);
67 template <
typename TValue>
71 m_Buffer = (
const void *)(_array->data_block());
77 template <
typename TValue,
unsigned int VLength>
82 m_MetaArray.InitializeEssential(VLength, _metaElementType);
87 template <
typename TValue,
unsigned int VLength>
92 m_MetaArray.InitializeEssential(VLength, _metaElementType);
97 template <
typename TValue,
unsigned int VLength>
102 m_MetaArray.InitializeEssential(VLength, _metaElementType);
107 template <
typename TValue>
111 m_Buffer = (
const void *)(_vector->GetDataPointer());
112 m_MetaArray.InitializeEssential(_vector->Size(), _metaElementType);
123 template <
typename TValue>
128 int cols = (*_array)[0].GetSize();
131 m_MetaArray.InitializeEssential(rows, _metaElementType, cols,
nullptr,
true,
true);
133 for (
int i = 0; i < rows; ++i)
135 for (
int j = 0; j < cols; ++j)
137 m_MetaArray.ElementData(i * cols + j,
static_cast<double>((*_array)[i][j]));
143 itkSetMacro(Precision,
unsigned int);
144 itkGetConstMacro(Precision,
unsigned int);
Array class with size defined at construction time.
SizeValueType Size() const
SizeValueType GetSize() const
A templated class holding a n-Dimensional covariant vector.
Simulate a standard C array with copy semantics.
ValueType * GetDataPointer()
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....