![]() |
ACloudViewer
3.9.4
A Modern Library for 3D Data Processing
|
Base CloudViewer dataset class. More...
#include <Dataset.h>


Public Member Functions | |
| Dataset (const std::string &prefix, const std::string &data_root="") | |
| Parameterized Constructor. More... | |
| virtual | ~Dataset () |
| const std::string | GetDataRoot () const |
| Get data root directory. The data root is set at construction time or automatically determined. More... | |
| const std::string | GetPrefix () const |
| Get prefix for the dataset. More... | |
| const std::string | GetDownloadDir () const |
| Get absolute path to download directory. i.e. ${data_root}/download/${prefix}. More... | |
| const std::string | GetExtractDir () const |
| Get absolute path to extract directory. i.e. ${data_root}/extract/${prefix}. More... | |
Protected Member Functions | |
| void | CheckPathsExist (const std::vector< std::string > &paths) const |
| Check if the paths exists after extraction. More... | |
Protected Attributes | |
| std::string | data_root_ |
| CloudViewer data root. More... | |
| std::string | prefix_ |
| Dataset prefix. More... | |
Base CloudViewer dataset class.
The Dataset classes in CloudViewer are designed for convenient access to "built-in" example and test data. You'll need internet access to use the dataset classes. The downloaded data will be stored in the CloudViewer's data root directory.
data_root when instantiating a dataset object. (b) CLOUDVIEWER_DATA_ROOT environment variable. (c) $HOME/cloudViewer_data. By default, (c) will be used, and it is also the recommended way.${data_root}/download/prefix/ and extracted or copied to ${data_root}/extract/prefix/. If the extracted data directory exists, the files will be used without validation. If it does not exists, and the valid downloaded file exists, the data will be extracted from the downloaded file. If downloaded file does not exists, or validates against the provided MD5, it will be re-downloaded.| cloudViewer::data::Dataset::Dataset | ( | const std::string & | prefix, |
| const std::string & | data_root = "" |
||
| ) |
Parameterized Constructor.
| prefix | Prefix of the dataset. The data is downloaded in ${data_root}/download/${prefix}/ and extracted in ${data_root}/extract/${prefix}/. |
| data_root | Path to ${data_root}, which contains all the downloaded and extracted files. The data root directory is located in the following order: (a) User-specified by data_root when instantiating a dataset object. (b) CLOUDVIEWER_DATA_ROOT environment variable. (c) $HOME/cloudViewer_data. By default, (c) will be used, and it is also the recommended way. |
Definition at line 53 of file Dataset.cpp.
References data_root_, cloudViewer::data::LocateDataRoot(), LogError, and prefix_.
|
inlinevirtual |
|
protected |
Check if the paths exists after extraction.
Definition at line 65 of file Dataset.cpp.
References cloudViewer::utility::filesystem::FileExists(), LogError, LogWarning, and cloudViewer::t::geometry::path.
Referenced by cloudViewer::data::RedwoodIndoorLivingRoom1::RedwoodIndoorLivingRoom1(), cloudViewer::data::RedwoodIndoorLivingRoom2::RedwoodIndoorLivingRoom2(), cloudViewer::data::RedwoodIndoorOffice1::RedwoodIndoorOffice1(), and cloudViewer::data::RedwoodIndoorOffice2::RedwoodIndoorOffice2().
|
inline |
Get data root directory. The data root is set at construction time or automatically determined.
Definition at line 81 of file Dataset.h.
References data_root_.
Referenced by GetDownloadDir(), GetExtractDir(), and cloudViewer::data::pybind_data_classes().
|
inline |
Get absolute path to download directory. i.e. ${data_root}/download/${prefix}.
Definition at line 88 of file Dataset.h.
References GetDataRoot(), and GetPrefix().
Referenced by cloudViewer::data::DownloadDataset::DownloadDataset(), cloudViewer::data::DownloadDataset::HasDownloaded(), and cloudViewer::data::pybind_data_classes().
|
inline |
Get absolute path to extract directory. i.e. ${data_root}/extract/${prefix}.
Definition at line 94 of file Dataset.h.
References GetDataRoot(), and GetPrefix().
Referenced by cloudViewer::data::ArmadilloMesh::ArmadilloMesh(), cloudViewer::data::AvocadoModel::AvocadoModel(), cloudViewer::data::BedroomRGBDImages::BedroomRGBDImages(), cloudViewer::data::BunnyMesh::BunnyMesh(), cloudViewer::data::CrateModel::CrateModel(), cloudViewer::data::DamagedHelmetModel::DamagedHelmetModel(), cloudViewer::data::DemoColoredICPPointClouds::DemoColoredICPPointClouds(), cloudViewer::data::DemoCropPointCloud::DemoCropPointCloud(), cloudViewer::data::DemoCustomVisualization::DemoCustomVisualization(), cloudViewer::data::DemoDopplerICPSequence::DemoDopplerICPSequence(), cloudViewer::data::DemoFeatureMatchingPointClouds::DemoFeatureMatchingPointClouds(), cloudViewer::data::DemoICPPointClouds::DemoICPPointClouds(), cloudViewer::data::DemoPoseGraphOptimization::DemoPoseGraphOptimization(), cloudViewer::data::DownloadDataset::DownloadDataset(), cloudViewer::data::EaglePointCloud::EaglePointCloud(), cloudViewer::data::FlightHelmetModel::FlightHelmetModel(), cloudViewer::data::JackJackL515Bag::JackJackL515Bag(), cloudViewer::data::JuneauImage::JuneauImage(), cloudViewer::data::KnotMesh::KnotMesh(), cloudViewer::data::LivingRoomPointClouds::LivingRoomPointClouds(), cloudViewer::data::LoungeRGBDImages::LoungeRGBDImages(), cloudViewer::data::MetalTexture::MetalTexture(), cloudViewer::data::MonkeyModel::MonkeyModel(), cloudViewer::data::OfficePointClouds::OfficePointClouds(), cloudViewer::data::PaintedPlasterTexture::PaintedPlasterTexture(), cloudViewer::data::PCDPointCloud::PCDPointCloud(), cloudViewer::data::PLYPointCloud::PLYPointCloud(), cloudViewer::data::PTSPointCloud::PTSPointCloud(), cloudViewer::data::pybind_data_classes(), cloudViewer::data::RedwoodIndoorLivingRoom1::RedwoodIndoorLivingRoom1(), cloudViewer::data::RedwoodIndoorLivingRoom2::RedwoodIndoorLivingRoom2(), cloudViewer::data::RedwoodIndoorOffice1::RedwoodIndoorOffice1(), cloudViewer::data::RedwoodIndoorOffice2::RedwoodIndoorOffice2(), cloudViewer::data::SampleFountainRGBDImages::SampleFountainRGBDImages(), cloudViewer::data::SampleL515Bag::SampleL515Bag(), cloudViewer::data::SampleNYURGBDImage::SampleNYURGBDImage(), cloudViewer::data::SampleRedwoodRGBDImages::SampleRedwoodRGBDImages(), cloudViewer::data::SampleSUNRGBDImage::SampleSUNRGBDImage(), cloudViewer::data::SampleTUMRGBDImage::SampleTUMRGBDImage(), cloudViewer::data::SwordModel::SwordModel(), cloudViewer::data::TerrazzoTexture::TerrazzoTexture(), cloudViewer::data::TilesTexture::TilesTexture(), cloudViewer::data::WoodFloorTexture::WoodFloorTexture(), and cloudViewer::data::WoodTexture::WoodTexture().
|
inline |
Get prefix for the dataset.
Definition at line 84 of file Dataset.h.
References prefix_.
Referenced by GetDownloadDir(), GetExtractDir(), and cloudViewer::data::pybind_data_classes().
|
protected |
CloudViewer data root.
Definition at line 100 of file Dataset.h.
Referenced by Dataset(), and GetDataRoot().
|
protected |