HyperspectralPanoramaChannel.hpp
Go to the documentation of this file.
1 
2 #ifndef LVR2_IO_YAML_HYPERSPECTRALPANORAMACHANNELMETA_IO_HPP
3 #define LVR2_IO_YAML_HYPERSPECTRALPANORAMACHANNELMETA_IO_HPP
4 
5 #include "MatrixIO.hpp"
7 
8 #include <yaml-cpp/yaml.h>
9 
10 namespace YAML
11 {
12 
19 // WRITE HYPERSPECTRALCAMERA PARTIALLY
20 template <>
21 struct convert<lvr2::HyperspectralPanoramaChannel>
22 {
23 
27  static Node encode(const lvr2::HyperspectralPanoramaChannel& channel)
28  {
29  Node node;
30 
32 
33  node["timestamp"] = channel.timestamp;
34 
35  return node;
36  }
37 
38  static bool decode(const Node& node, lvr2::HyperspectralPanoramaChannel& channel)
39  {
40 
41  if (node["sensor_type"].as<std::string>() != lvr2::HyperspectralPanoramaChannel::sensorType)
42  {
43  return false;
44  }
45 
46  channel.timestamp = node["timestamp"].as<double>();
47 
48  return true;
49  }
50 };
51 
52 } // namespace YAML
53 
54 #endif // LVR2_IO_YAML_HYPERSPECTRALPANORAMACHANNELMETA_IO_HPP
static bool decode(const Node &node, lvr2::HyperspectralPanoramaChannel &channel)
void convert(COORD_SYSTEM from, COORD_SYSTEM to, float *point)
static Node encode(const lvr2::HyperspectralPanoramaChannel &channel)
static constexpr char sensorType[]
Sensor type flag.
Definition: ScanTypes.hpp:165


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