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
lvr2::ChannelIO::m_featureBase
FeatureBase * m_featureBase
Definition: descriptions/ChannelIO.hpp:29
lvr2::IndexChannelOptional
IndexChannel::Optional IndexChannelOptional
Definition: Channel.hpp:100
lvr2::UCharChannelOptional
UCharChannel::Optional UCharChannelOptional
Definition: Channel.hpp:96
lvr2::ChannelIO::loadDoubleChannel
DoubleChannelOptional loadDoubleChannel(std::string groupName, std::string datasetName)
lvr2::ChannelIO::saveFloatChannel
void saveFloatChannel(std::string groupName, std::string datasetName, FloatChannel &channel)
GroupedChannelIO.hpp
lvr2::ChannelIO::loadFloatChannel
FloatChannelOptional loadFloatChannel(std::string groupName, std::string datasetName)
lvr2::FloatChannelOptional
FloatChannel::Optional FloatChannelOptional
Definition: Channel.hpp:88
lvr2::ChannelIO::loadIndexChannel
IndexChannelOptional loadIndexChannel(std::string groupName, std::string datasetName)
lvr2::ChannelIO::loadUCharChannel
UCharChannelOptional loadUCharChannel(std::string groupName, std::string datasetName)
lvr2::ChannelIO
Definition: descriptions/ChannelIO.hpp:14
lvr2::ChannelIO::getChannel
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
Channel.hpp
lvr2::DoubleChannelOptional
DoubleChannel::Optional DoubleChannelOptional
Definition: Channel.hpp:92
lvr2::Channel
Definition: Channel.hpp:42
lvr2
Definition: BaseBufferManipulators.hpp:39
Timestamp.hpp
lvr2::ChannelIO::saveUCharChannel
void saveUCharChannel(std::string groupName, std::string datasetName, UCharChannel &channel)
lvr2::ChannelIO::addChannel
bool addChannel(const std::string group, const std::string name, const AttributeChannel< T > &channel)
lvr2::FeatureBase
Manager Class for all FeatureBase components located in hdf5 directory.
Definition: FeatureBase.hpp:31
lvr2::ChannelIO::saveIndexChannel
void saveIndexChannel(std::string groupName, std::string datasetName, UCharChannel &channel)
lvr2::ChannelIO::saveDoubleChannel
void saveDoubleChannel(std::string groupName, std::string datasetName, DoubleChannel &channel)


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