18 #ifndef __itkMetaArrayWriter_h
19 #define __itkMetaArrayWriter_h
25 #include "metaArray.h"
47 itkSetStringMacro(FileName);
50 itkGetStringMacro(FileName);
55 itkSetStringMacro(DataFileName);
58 itkGetStringMacro(DataFileName);
61 itkSetMacro(Binary,
bool);
65 itkGetConstMacro(Binary,
bool);
68 template<
typename TValueType >
69 void SetInput(MET_ValueEnumType _metaElementType,
72 m_Buffer = (
const void *)( _array->data_block() );
73 m_MetaArray.InitializeEssential(_array->
Size(),
79 template<
typename TValueType,
unsigned int VLength >
80 void SetInput(MET_ValueEnumType _metaElementType,
84 m_MetaArray.InitializeEssential(VLength,
90 template<
typename TValueType,
unsigned int VLength >
91 void SetInput(MET_ValueEnumType _metaElementType,
95 m_MetaArray.InitializeEssential(VLength,
101 template<
typename TValueType,
unsigned int VLength >
102 void SetInput(MET_ValueEnumType _metaElementType,
106 m_MetaArray.InitializeEssential(VLength,
112 template<
typename TValueType >
113 void SetInput(MET_ValueEnumType _metaElementType,
117 m_MetaArray.InitializeEssential(_vector->
Size(),
129 template<
typename TValueType >
130 void SetMultiChannelInput(MET_ValueEnumType _metaElementType,
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;
186 #endif // __itkMetaArrayWriter_h