ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
OfficePointClouds.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() + "redwood/office1-fragments-ply.zip",
20  "c519fe0495b3c731ebe38ae3a227ac25"};
21 
22 OfficePointClouds::OfficePointClouds(const std::string& data_root)
23  : DownloadDataset("OfficePointClouds", data_descriptor, data_root) {
24  paths_.reserve(53);
25  for (int i = 0; i < 53; ++i) {
26  paths_.push_back(GetExtractDir() + "/cloud_bin_" + std::to_string(i) +
27  ".ply");
28  }
29 }
30 
31 std::string OfficePointClouds::GetPaths(size_t index) const {
32  if (index > 52) {
34  "Invalid index. Expected index between 0 to 52 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
Dataset class with one or more downloaded file.
Definition: Dataset.h:152
OfficePointClouds(const std::string &data_root="")
std::vector< std::string > GetPaths() const
Returns list of paths to ply point-cloud fragments of size 52.
Definition: Dataset.h:674
#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