24#ifdef XTENSOR_VERSION_MAJOR
31#include <xtensor/xarray.hpp>
32#include <xtensor/xtensor.hpp>
37#ifdef EIGEN_WORLD_VERSION
49#ifdef CV_MAJOR_VERSION
56#include <opencv2/opencv.hpp>
110 inline unsigned get()
const;
113 unsigned m_compression_level;
133 template <
class... Args>
157 template <
class T,
class... Args>
158 inline void set(T arg, Args... args);
169 inline void setChunkSize(std::initializer_list<size_t> shape);
179 inline bool flush()
const;
203 bool m_overwrite =
false;
205 unsigned m_compression_level = 0;
206 std::vector<hsize_t> m_chunk_size = {};
216inline size_t getSize(
const File& file,
const std::string& path);
225inline std::vector<size_t>
getShape(
const File& file,
const std::string& path);
238inline DataSet
dump(File& file,
239 const std::string& path,
254inline DataSet
dump(File& file,
const std::string& path,
const T& data,
const DumpOptions& options);
267inline DataSet
dump(File& file,
268 const std::string& path,
270 const std::vector<size_t>& idx);
283inline DataSet
dump(File& file,
284 const std::string& path,
286 const std::initializer_list<size_t>& idx);
300inline DataSet
dump(File& file,
301 const std::string& path,
303 const std::vector<size_t>& idx,
304 const DumpOptions& options);
318inline DataSet
dump(File& file,
319 const std::string& path,
321 const std::initializer_list<size_t>& idx,
322 const DumpOptions& options);
334inline T
load(
const File& file,
const std::string& path,
const std::vector<size_t>& idx);
345inline T
load(
const File& file,
const std::string& path);
360 const std::string& path,
361 const std::string& key,
378 const std::string& path,
379 const std::string& key,
381 const DumpOptions& options);
393inline T
loadAttribute(
const File& file,
const std::string& path,
const std::string& key);
Signal to set compression level for written DataSets.
Definition H5Easy.hpp:92
unsigned get() const
Return compression level.
Definition H5Easy_public.hpp:27
Define options for dumping data.
Definition H5Easy.hpp:124
bool flush() const
Get flush-mode.
Definition H5Easy_public.hpp:62
bool isChunked() const
Get chunking mode: true is manually set, false if chunk-size should be computed automatically.
Definition H5Easy_public.hpp:74
std::vector< hsize_t > getChunkSize() const
Get chunk size. Use DumpOptions::getChunkSize to check if chunk-size should be automatically computed...
Definition H5Easy_public.hpp:78
DumpOptions()=default
Constructor: accept all default settings.
unsigned getCompressionLevel() const
Get compression level.
Definition H5Easy_public.hpp:70
bool overwrite() const
Get overwrite-mode.
Definition H5Easy_public.hpp:58
void set(DumpMode mode)
Overwrite H5Easy::DumpMode setting.
Definition H5Easy_public.hpp:31
bool compress() const
Get compress-mode.
Definition H5Easy_public.hpp:66
DumpOptions(Args... args)
Constructor: overwrite (some of the) defaults.
Definition H5Easy.hpp:134
void setChunkSize(const std::vector< T > &shape)
Set chunk-size. If the input is rank (size) zero, automatic chunking is enabled.
Definition H5Easy_public.hpp:50
create an HDF5 DataType from a C++ type
Definition H5DataType.hpp:189
Class representing an Attribute of a DataSet or Group.
Definition H5Attribute.hpp:47
Definition H5PropertyList.hpp:499
Class representing a dataset.
Definition H5DataSet.hpp:30
Class representing the space (dimensions) of a DataSet.
Definition H5DataSpace.hpp:39
Definition H5PropertyList.hpp:518
Basic HighFive Exception class.
Definition H5Exception.hpp:23
File class.
Definition H5File.hpp:25
HDF5 property Lists.
Definition H5PropertyList.hpp:158
Definition H5PropertyList.hpp:546
Read/dump DataSets or Attribute using a minimalistic syntax. To this end, the functions are templated...
Definition H5Easy.hpp:62
size_t getSize(const File &file, const std::string &path)
Get the size of an existing DataSet in an open HDF5 file.
Definition H5Easy_public.hpp:82
DataSet dump(File &file, const std::string &path, const T &data, DumpMode mode=DumpMode::Create)
Write object (templated) to a (new) DataSet in an open HDF5 file.
Definition H5Easy_public.hpp:99
DumpMode
Write mode for DataSets.
Definition H5Easy.hpp:78
T loadAttribute(const File &file, const std::string &path, const std::string &key)
Load a Attribute in an open HDF5 file to an object (templated).
Definition H5Easy_public.hpp:166
Attribute dumpAttribute(File &file, const std::string &path, const std::string &key, const T &data, DumpMode mode=DumpMode::Create)
Write object (templated) to a (new) Attribute in an open HDF5 file.
Definition H5Easy_public.hpp:148
T load(const File &file, const std::string &path, const std::vector< size_t > &idx)
Load entry {i, j, ...} from a DataSet in an open HDF5 file to a scalar.
Definition H5Easy_public.hpp:138
std::vector< size_t > getShape(const File &file, const std::string &path)
Get the shape of an existing DataSet in an readable file.
Definition H5Easy_public.hpp:86
Flush
Signal to enable/disable automatic flushing after write operations.
Definition H5Easy.hpp:85
ObjectType
Enum of the types of objects (H5O api)
Definition H5Object.hpp:24