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
lvr2::hdf5features::PointCloudIO::load
PointBufferPtr load(std::string name)
lvr2::hdf5features::PointCloudIO::m_file_access
Derived * m_file_access
Definition: hdf5/PointCloudIO.hpp:60
lvr2::Hdf5Construct::type
typename Derived::template add_features< Feature >::type type
Definition: HDF5FeatureBase.hpp:165
lvr2::PointBufferPtr
std::shared_ptr< PointBuffer > PointBufferPtr
Definition: PointBuffer.hpp:130
lvr2::hdf5features::PointCloudIO::loadPointCloud
PointBufferPtr loadPointCloud(std::string name)
lvr2::hdf5features::PointCloudIO::OBJID
static constexpr const char * OBJID
Definition: hdf5/PointCloudIO.hpp:65
lvr2::PointCloudIO
Hdf5IO Feature for handling PointBuffer related IO.
Definition: descriptions/PointCloudIO.hpp:45
VariantChannelIO.hpp
lvr2::hdf5features::PointCloudIO::ID
static constexpr const char * ID
Definition: hdf5/PointCloudIO.hpp:64
lvr2::Hdf5Construct< hdf5features::PointCloudIO, Derived >::deps
typename Hdf5Construct< hdf5features::VariantChannelIO, Derived >::type deps
Definition: hdf5/PointCloudIO.hpp:74
lvr2::hdf5features::PointCloudIO::save
void save(std::string name, const PointBufferPtr &buffer)
PointBuffer.hpp
lvr2::hdf5features::VariantChannelIO
Hdf5IO Feature for handling VariantChannel related IO.
Definition: hdf5/VariantChannelIO.hpp:59
lvr2::hdf5features::PointCloudIO::isPointCloud
bool isPointCloud(HighFive::Group &group)
HighFive::Group
Definition: H5Group.hpp:20
lvr2::Hdf5Construct< hdf5features::PointCloudIO, Derived >::type
typename deps::template add_features< hdf5features::PointCloudIO >::type type
Definition: hdf5/PointCloudIO.hpp:77
lvr2::hdf5features::PointCloudIO
Hdf5IO Feature for handling PointBuffer related IO.
Definition: hdf5/PointCloudIO.hpp:47
ChannelIO.hpp
lvr2
Definition: BaseBufferManipulators.hpp:39
lvr2::hdf5features::PointCloudIO::m_vchannel_io
VariantChannelIO< Derived > * m_vchannel_io
Definition: hdf5/PointCloudIO.hpp:62
lvr2::Hdf5Construct
Helper class how to construct a IO feature with its dependencies.
Definition: HDF5FeatureBase.hpp:27


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