ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
LivingRoomPointClouds.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/livingroom1-fragments-ply.zip",
20  "36e0eb23a66ccad6af52c05f8390d33e"};
21 
22 LivingRoomPointClouds::LivingRoomPointClouds(const std::string& data_root)
23  : DownloadDataset("LivingRoomPointClouds", data_descriptor, data_root) {
24  paths_.reserve(57);
25  for (int i = 0; i < 57; ++i) {
26  paths_.push_back(GetExtractDir() + "/cloud_bin_" + std::to_string(i) +
27  ".ply");
28  }
29 }
30 
31 std::string LivingRoomPointClouds::GetPaths(size_t index) const {
32  if (index > 56) {
34  "Invalid index. Expected index between 0 to 56 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
std::vector< std::string > GetPaths() const
Returns list of paths to ply point-cloud fragments of size 57.
Definition: Dataset.h:563
LivingRoomPointClouds(const std::string &data_root="")
#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