hdf5/PointCloudIO.hpp
Go to the documentation of this file.
1 #pragma once
2 
3 #ifndef LVR2_IO_HDF5_POINTBUFFERIO_HPP
4 #define LVR2_IO_HDF5_POINTBUFFERIO_HPP
5 
6 #include <boost/optional.hpp>
7 
9 
10 // Dependencies
11 #include "ChannelIO.hpp"
12 #include "VariantChannelIO.hpp"
13 
14 namespace lvr2 {
15 
16 namespace hdf5features {
17 
46 template<typename Derived>
47 class PointCloudIO {
48 public:
49  void save(std::string name, const PointBufferPtr& buffer);
50  void save(HighFive::Group& group, const PointBufferPtr& buffer);
51 
52  PointBufferPtr load(std::string name);
54  PointBufferPtr loadPointCloud(std::string name);
55 
56 protected:
57 
58  bool isPointCloud(HighFive::Group& group);
59 
60  Derived* m_file_access = static_cast<Derived*>(this);
61  // dependencies
63 
64  static constexpr const char* ID = "PointCloudIO";
65  static constexpr const char* OBJID = "PointBuffer";
66 };
67 
68 } // hdf5features
69 
70 template<typename Derived>
71 struct Hdf5Construct<hdf5features::PointCloudIO, Derived> {
72 
73  // DEPS
75 
76  // add actual feature
77  using type = typename deps::template add_features<hdf5features::PointCloudIO>::type;
78 
79 };
80 
81 } // namespace lvr2
82 
83 #include "PointCloudIO.tcc"
84 
85 
86 #endif // LVR2_IO_HDF5_POINTBUFFERIO_HPP
static constexpr const char * ID
Hdf5IO Feature for handling PointBuffer related IO.
PointBufferPtr loadPointCloud(std::string name)
typename Hdf5Construct< hdf5features::VariantChannelIO, Derived >::type deps
std::shared_ptr< PointBuffer > PointBufferPtr
VariantChannelIO< Derived > * m_vchannel_io
Helper class how to construct a IO feature with its dependencies.
void save(std::string name, const PointBufferPtr &buffer)
typename deps::template add_features< hdf5features::PointCloudIO >::type type
PointBufferPtr load(std::string name)
Hdf5IO Feature for handling VariantChannel related IO.
typename Derived::template add_features< Feature >::type type
bool isPointCloud(HighFive::Group &group)
Hdf5IO Feature for handling PointBuffer related IO.
static constexpr const char * OBJID


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:08