Open3D (C++ API)  0.18.0+252c867
AzureKinectSensorConfig.h
Go to the documentation of this file.
1 // ----------------------------------------------------------------------------
2 // - Open3D: www.open3d.org -
3 // ----------------------------------------------------------------------------
4 // Copyright (c) 2018-2023 www.open3d.org
5 // SPDX-License-Identifier: MIT
6 // ----------------------------------------------------------------------------
7 
8 #pragma once
9 
10 #include <string>
11 #include <unordered_map>
12 
15 
16 struct _k4a_device_configuration_t; // Alias of k4a_device_configuration_t
17 
18 namespace open3d {
19 namespace io {
20 
21 // Alternative implementation of _k4a_device_configuration_t with string values
22 
27 public:
32  const std::unordered_map<std::string, std::string> &config);
33  bool ConvertToJsonValue(Json::Value &value) const override;
34  bool ConvertFromJsonValue(const Json::Value &value) override;
35 
36 public:
37  void ConvertFromNativeConfig(const _k4a_device_configuration_t &k4a_config);
38  _k4a_device_configuration_t ConvertToNativeConfig() const;
39 
40 public:
41  // To avoid including k4a or json header, configs is stored in a map
42  std::unordered_map<std::string, std::string> config_;
43 
44 protected:
45  static bool IsValidConfig(
46  const std::unordered_map<std::string, std::string> &config,
47  bool verbose = true);
48 };
49 
50 } // namespace io
51 } // namespace open3d
Definition: AzureKinectSensorConfig.h:26
bool ConvertToJsonValue(Json::Value &value) const override
Definition: AzureKinectSensorConfig.cpp:231
AzureKinectSensorConfig()
Default constructor, default configs will be used.
Definition: AzureKinectSensorConfig.cpp:126
_k4a_device_configuration_t ConvertToNativeConfig() const
Definition: AzureKinectSensorConfig.cpp:282
static bool IsValidConfig(const std::unordered_map< std::string, std::string > &config, bool verbose=true)
Definition: AzureKinectSensorConfig.cpp:130
bool ConvertFromJsonValue(const Json::Value &value) override
Definition: AzureKinectSensorConfig.cpp:246
void ConvertFromNativeConfig(const _k4a_device_configuration_t &k4a_config)
Definition: AzureKinectSensorConfig.cpp:262
std::unordered_map< std::string, std::string > config_
Definition: AzureKinectSensorConfig.h:42
Definition: RGBDSensorConfig.h:15
Definition: PinholeCameraIntrinsic.cpp:16