hdf5/ArrayIO.hpp
Go to the documentation of this file.
1 #pragma once
2 #ifndef LVR2_IO_HDF5_ARRAYIO_HPP
3 #define LVR2_IO_HDF5_ARRAYIO_HPP
4 
6 #include <boost/shared_array.hpp>
7 
8 namespace lvr2 {
9 
10 namespace hdf5features {
11 
12 template<typename Derived>
13 class ArrayIO {
14 public:
15 
16  template<typename T>
17  boost::shared_array<T> loadArray(
18  std::string groupName,
19  std::string datasetName,
20  size_t& size);
21 
22  template<typename T>
23  boost::shared_array<T> load(
24  std::string groupName,
25  std::string datasetName,
26  size_t& size);
27 
28  template<typename T>
29  boost::shared_array<T> load(
30  std::string groupName,
31  std::string datasetName,
32  std::vector<size_t>& dim);
33 
34  template<typename T>
35  boost::shared_array<T> load(
36  HighFive::Group& g,
37  std::string datasetName,
38  std::vector<size_t>& dim
39  );
40 
41  template<typename T>
42  void save(
43  std::string groupName,
44  std::string datasetName,
45  size_t size,
46  boost::shared_array<T> data);
47 
48  template<typename T>
49  void save(
50  std::string groupName,
51  std::string datasetName,
52  std::vector<size_t>& dimensions,
53  boost::shared_array<T> data);
54 
55  template<typename T>
56  void save(
57  std::string groupName,
58  std::string datasetName,
59  std::vector<size_t>& dimensions,
60  std::vector<hsize_t>& chunkSize,
61  boost::shared_array<T> data);
62 
63  template<typename T>
64  void save(HighFive::Group& g,
65  std::string datasetName,
66  std::vector<size_t>& dim,
67  std::vector<hsize_t>& chunkSize,
68  boost::shared_array<T>& data);
69 
70 protected:
71  Derived* m_file_access = static_cast<Derived*>(this);
72 
73 };
74 
75 } // namespace hdf5_features
76 
77 } // namespace lvr2
78 
79 #include "ArrayIO.tcc"
80 
81 #endif
lvr2::hdf5features::ArrayIO::save
void save(std::string groupName, std::string datasetName, size_t size, boost::shared_array< T > data)
lvr2::hdf5features::ArrayIO::load
boost::shared_array< T > load(std::string groupName, std::string datasetName, size_t &size)
lvr2::hdf5features::ArrayIO::loadArray
boost::shared_array< T > loadArray(std::string groupName, std::string datasetName, size_t &size)
lvr2::hdf5features::ArrayIO::m_file_access
Derived * m_file_access
Definition: hdf5/ArrayIO.hpp:71
HighFive::Group
Definition: H5Group.hpp:20
HDF5FeatureBase.hpp
lvr2
Definition: BaseBufferManipulators.hpp:39
lvr2::hdf5features::ArrayIO
Definition: hdf5/ArrayIO.hpp:13


lvr2
Author(s): Thomas Wiemann , Sebastian Pütz , Alexander Mock , Lars Kiesow , Lukas Kalbertodt , Tristan Igelbrink , Johan M. von Behren , Dominik Feldschnieders , Alexander Löhr
autogenerated on Wed Mar 2 2022 00:37:22