hdf5/ScanImageIO.hpp
Go to the documentation of this file.
1 #pragma once
2 
3 #ifndef LVR2_IO_HDF5_SCANIMAGEIO_HPP
4 #define LVR2_IO_HDF5_SCANIMAGEIO_HPP
5 
6 #include "ImageIO.hpp"
7 #include "MatrixIO.hpp"
9 
10 namespace lvr2
11 {
12 
13 namespace hdf5features
14 {
15 
16 template <typename Derived>
18 {
19  public:
20  void save(const std::string& , const ScanImagePtr& buffer);
21 
22  void save(uint scanPos,
23  uint camNr,
24  uint imgNr,
25  const ScanImagePtr& scanImagePtr);
26 
27  void save(HighFive::Group& group, uint camNr, uint imgNr, const ScanImagePtr& buffer);
28  void save(HighFive::Group& group, uint imgNr, const ScanImagePtr& buffer);
29  void save(HighFive::Group& group, const ScanImagePtr& buffer);
30 
31  ScanImagePtr load(uint scanPos, uint camNr, uint imgNr);
32  ScanImagePtr load(HighFive::Group& group, uint camNr, uint imgNr);
33  ScanImagePtr load(HighFive::Group& group, uint imgNr);
35 
36  protected:
37  bool isScanImage(HighFive::Group& group);
38 
39  Derived* m_file_access = static_cast<Derived*>(this);
40 
41  // dependencies
44 
45  static constexpr const char* ID = "ScanImageIO";
46  static constexpr const char* OBJID = "ScanImage";
47 };
48 
49 } // namespace hdf5features
50 
58 template <typename Derived>
59 struct Hdf5Construct<hdf5features::ScanImageIO, Derived>
60 {
61  // DEPS
64  using deps = typename dep1::template Merge<dep2>;
65 
66  // ADD THE FEATURE ITSELF
67  using type = typename deps::template add_features<hdf5features::ScanImageIO>::type;
68 };
69 
70 } // namespace lvr2
71 
72 #include "ScanImageIO.tcc"
73 
74 #endif // LVR2_IO_HDF5_SCANIMAGEIO_HPP
void save(const std::string &, const ScanImagePtr &buffer)
static constexpr const char * OBJID
MatrixIO< Derived > * m_matrixIO
bool isScanImage(HighFive::Group &group)
static constexpr const char * ID
Helper class how to construct a IO feature with its dependencies.
typename Hdf5Construct< hdf5features::ImageIO, Derived >::type dep1
typename deps::template add_features< hdf5features::ScanImageIO >::type type
ScanImagePtr load(uint scanPos, uint camNr, uint imgNr)
std::shared_ptr< ScanImage > ScanImagePtr
Definition: ScanTypes.hpp:127
unsigned int uint
Definition: Model.hpp:46
typename Derived::template add_features< Feature >::type type
typename Hdf5Construct< hdf5features::MatrixIO, Derived >::type dep2


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 Mon Feb 28 2022 22:46:09