ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
DemoICPPointClouds.cpp
Go to the documentation of this file.
1 // ----------------------------------------------------------------------------
2 // - CloudViewer: www.cloudViewer.org -
3 // ----------------------------------------------------------------------------
4 // Copyright (c) 2018-2024 www.cloudViewer.org
5 // SPDX-License-Identifier: MIT
6 // ----------------------------------------------------------------------------
7 
8 #include <Logging.h>
9 
10 #include <string>
11 #include <vector>
12 
14 
15 namespace cloudViewer {
16 namespace data {
17 
19  CloudViewerDownloadsPrefix() + "20220301-data/DemoICPPointClouds.zip",
20  "596cffe5f9c587045e7397ad70754de9"};
21 
22 DemoICPPointClouds::DemoICPPointClouds(const std::string& data_root)
23  : DownloadDataset("DemoICPPointClouds", data_descriptor, data_root) {
24  for (int i = 0; i < 3; ++i) {
25  paths_.push_back(GetExtractDir() + "/cloud_bin_" + std::to_string(i) +
26  ".pcd");
27  }
28  transformation_log_path_ = GetExtractDir() + "/init.log";
29 }
30 
31 std::string DemoICPPointClouds::GetPaths(size_t index) const {
32  if (index > 2) {
34  "Invalid index. Expected index between 0 to 2 but got {}.",
35  index);
36  }
37  return paths_[index];
38 }
39 
40 } // namespace data
41 } // namespace cloudViewer
const std::string GetExtractDir() const
Get absolute path to extract directory. i.e. ${data_root}/extract/${prefix}.
Definition: Dataset.h:94
DemoICPPointClouds(const std::string &data_root="")
std::vector< std::string > GetPaths() const
Returns list of 3 point cloud paths.
Definition: Dataset.h:428
Dataset class with one or more downloaded file.
Definition: Dataset.h:152
#define LogError(...)
Definition: Logging.h:60
std::string CloudViewerDownloadsPrefix()
Definition: Dataset.cpp:49
static const DataDescriptor data_descriptor
Generic file read and write utility for python interface.
std::string to_string(const T &n)
Definition: Common.h:20
Infomation about a file to be downloaded.
Definition: Dataset.h:111