descriptions/ChannelIO.hpp
Go to the documentation of this file.
1 #pragma once
2 #ifndef LVR2_IO_HDF5_CHANNELIO_HPP
3 #define LVR2_IO_HDF5_CHANNELIO_HPP
4 
5 #include "lvr2/types/Channel.hpp"
7 #include "lvr2/io/Timestamp.hpp"
8 
9 // Depending Features
10 
11 namespace lvr2 {
12 
13 template<typename FeatureBase>
14 class ChannelIO
15 {
16 public:
17 
18  UCharChannelOptional loadUCharChannel(std::string groupName, std::string datasetName);
19  FloatChannelOptional loadFloatChannel(std::string groupName, std::string datasetName);
20  DoubleChannelOptional loadDoubleChannel(std::string groupName, std::string datasetName);
21  IndexChannelOptional loadIndexChannel(std::string groupName, std::string datasetName);
22 
23  void saveUCharChannel(std::string groupName, std::string datasetName, UCharChannel& channel);
24  void saveFloatChannel(std::string groupName, std::string datasetName, FloatChannel& channel);
25  void saveDoubleChannel(std::string groupName, std::string datasetName, DoubleChannel& channel);
26  void saveIndexChannel(std::string groupName, std::string datasetName, UCharChannel& channel);
27 
28 protected:
29  FeatureBase* m_featureBase = static_cast<FeatureBase*>(this);
30 
38  virtual bool getChannel(const std::string group, const std::string name, FloatChannelOptional& channel);
39 
47  virtual bool getChannel(const std::string group, const std::string name, IndexChannelOptional& channel);
48 
56  virtual bool getChannel(const std::string group, const std::string name, UCharChannelOptional& channel);
57 
58  template <typename T>
59  bool addChannel(const std::string group, const std::string name, const AttributeChannel<T>& channel);
60 
68  virtual bool addChannel(const std::string group, const std::string name, const FloatChannel& channel);
69 
77  virtual bool addChannel(const std::string group, const std::string name, const IndexChannel& channel);
78 
86  virtual bool addChannel(const std::string group, const std::string name, const UCharChannel& channel);
87 
88 
89 };
90 
91 
92 } // namespace lvr2
93 
94 #include "ChannelIO.tcc"
95 
96 #endif
DoubleChannelOptional loadDoubleChannel(std::string groupName, std::string datasetName)
Manager Class for all FeatureBase components located in hdf5 directory.
Definition: FeatureBase.hpp:31
void saveIndexChannel(std::string groupName, std::string datasetName, UCharChannel &channel)
bool addChannel(const std::string group, const std::string name, const AttributeChannel< T > &channel)
void saveDoubleChannel(std::string groupName, std::string datasetName, DoubleChannel &channel)
void saveUCharChannel(std::string groupName, std::string datasetName, UCharChannel &channel)
UCharChannel::Optional UCharChannelOptional
Definition: Channel.hpp:96
UCharChannelOptional loadUCharChannel(std::string groupName, std::string datasetName)
virtual bool getChannel(const std::string group, const std::string name, FloatChannelOptional &channel)
getChannel Reads a float attribute channel in the given group with the given name ...
FloatChannelOptional loadFloatChannel(std::string groupName, std::string datasetName)
void saveFloatChannel(std::string groupName, std::string datasetName, FloatChannel &channel)
FloatChannel::Optional FloatChannelOptional
Definition: Channel.hpp:88
IndexChannel::Optional IndexChannelOptional
Definition: Channel.hpp:100
IndexChannelOptional loadIndexChannel(std::string groupName, std::string datasetName)
DoubleChannel::Optional DoubleChannelOptional
Definition: Channel.hpp:92


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