25 #ifndef itkHDF5ImageIO_h
26 #define itkHDF5ImageIO_h
27 #include "ITKIOHDF5Export.h"
109 bool CanReadFile(
const char *FileNameToRead)
override;
112 void ReadImageInformation()
override;
115 void Read(
void *buffer)
override;
125 bool CanWriteFile(
const char *FileNameToWrite)
override;
128 void WriteImageInformation()
override;
132 void Write(
const void *buffer)
override;
138 SizeType GetHeaderSize()
const override;
140 void PrintSelf(std::ostream & os,
Indent indent)
const override;
143 void WriteString(
const std::string &path,
144 const std::string &value);
145 void WriteString(
const std::string &path,
147 std::string ReadString(
const std::string &path);
149 void WriteScalar(
const std::string &path,
151 void WriteScalar(
const std::string &path,
153 void WriteScalar(
const std::string &path,
154 const unsigned long &value);
155 void WriteScalar(
const std::string &path,
156 const long long &value);
157 void WriteScalar(
const std::string &path,
158 const unsigned long long &value);
160 template <
typename TScalar>
161 void WriteScalar(
const std::string &path,
162 const TScalar &value);
164 template <
typename TScalar>
165 TScalar ReadScalar(
const std::string &DataSetName);
167 template <
typename TScalar>
168 void WriteVector(
const std::string &path,
169 const std::vector<TScalar> &vec);
171 template <
typename TScalar>
172 std::vector<TScalar> ReadVector(
const std::string &DataSetName);
174 void WriteDirections(
const std::string &path,
175 const std::vector<std::vector<double> > &dir);
177 std::vector<std::vector<double> > ReadDirections(
const std::string &path);
179 template <
typename TType>
180 bool WriteMeta(
const std::string &name,
182 template <
typename TType>
183 bool WriteMetaArray(
const std::string &name,
185 template <
typename TType>
187 const std::string &HDFPath,
188 const std::string &name,
189 unsigned long numElements);
190 void SetupStreaming(H5::DataSpace *imageSpace,
191 H5::DataSpace *slabSpace);
196 H5::H5File *m_H5File{
nullptr};
197 H5::DataSet *m_VoxelDataSet{
nullptr};
198 bool m_ImageInformationWritten{
false};
202 #endif // itkHDF5ImageIO_h
Light weight base class for most itk classes.
A base class for specific ImageIO file formats which support streaming.
Control indentation during Print() invocation.
Class that defines how to read HDF5 file format. HDF5 IMAGE FILE FORMAT - As much information as I ca...
Base class for most ITK classes.