18 #ifndef itkMetaArrayWriter_h
19 #define itkMetaArrayWriter_h
20 #include "ITKIOMetaExport.h"
26 #include "metaArray.h"
48 itkSetStringMacro(FileName);
49 itkGetStringMacro(FileName);
54 itkSetStringMacro(DataFileName);
55 itkGetStringMacro(DataFileName);
62 itkBooleanMacro(Binary);
63 itkSetMacro(Binary,
bool);
64 itkGetConstMacro(Binary,
bool);
68 template<
typename TValue >
69 void SetInput(MET_ValueEnumType _metaElementType,
72 m_Buffer = (
const void *)( _array->data_block() );
73 m_MetaArray.InitializeEssential(_array->
Size(),
79 template<
typename TValue,
unsigned int VLength >
80 void SetInput(MET_ValueEnumType _metaElementType,
84 m_MetaArray.InitializeEssential(VLength,
90 template<
typename TValue,
unsigned int VLength >
91 void SetInput(MET_ValueEnumType _metaElementType,
95 m_MetaArray.InitializeEssential(VLength,
101 template<
typename TValue,
unsigned int VLength >
106 m_MetaArray.InitializeEssential(VLength,
112 template<
typename TValue >
117 m_MetaArray.InitializeEssential(_vector->
Size(),
129 template<
typename TValue >
135 int cols = ( *_array )[0].GetSize();
138 m_MetaArray.InitializeEssential(rows,
144 m_Buffer = m_MetaArray.ElementData();
145 for (
int i = 0; i < rows; i++ )
147 for (
int j = 0; j < cols; j++ )
149 m_MetaArray.ElementData( i * cols + j, (
double)( ( *_array )[i][j] ) );
155 itkSetMacro(Precision,
unsigned int);
156 itkGetConstMacro(Precision,
unsigned int);
160 void ConvertTo(MET_ValueEnumType _metaElementType);
169 void PrintSelf(std::ostream & os,
Indent indent)
const override;
173 bool m_Binary{
false };
175 unsigned int m_Precision{ 6 };
182 const void *m_Buffer{
nullptr };
186 #endif // itkMetaArrayWriter_h
Array class with size defined at construction time.
Light weight base class for most itk classes.
const TValue * GetDataPointer() const
Simulate a standard C array with copy semnatics.
Represents an array whose length can be defined at run-time.
A templated class holding a n-Dimensional vector.
SizeValueType Size() const
unsigned int Size() const
LightProcessObject is the base class for all process objects (source, filters, mappers) in the Insigh...
Control indentation during Print() invocation.
SizeValueType GetSize() const
ValueType * GetDataPointer()
Base class for most ITK classes.
A templated class holding a n-Dimensional covariant vector.