Base Open3D dataset class.
More...
#include <Dataset.h>
|
| 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}/${prefix}. More...
|
|
const std::string | GetExtractDir () const |
| Get absolute path to extract directory. i.e. ${data_root}/${extract_prefix}/${prefix}. More...
|
|
Base Open3D dataset class.
The Dataset classes in Open3D 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 Open3D's data root directory.
- A dataset class locates the data root directory in the following order: (a) User-specified by
data_root
when instantiating a dataset object. (b) OPEN3D_DATA_ROOT environment variable. (c) $HOME/open3d_data. By default, (c) will be used, and it is also the recommended way.
- When a dataset object is instantiated, the corresponding data will be downloaded in
${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.
- After the data is downloaded and extracted, the dataset object will NOT load the data for you. Instead, you will get the paths to the data files and use Open3D's I/O functions to load the data. This design exposes where the data is stored and how the data is loaded, allowing users to modify the code and load their own data in a similar way. Please check the documentation of the specific dataset to know more about the specific functionalities provided for it.
◆ Dataset()
open3d::data::Dataset::Dataset |
( |
const std::string & |
prefix, |
|
|
const std::string & |
data_root = "" |
|
) |
| |
Parameterized Constructor.
- Parameters
-
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) OPEN3D_DATA_ROOT environment variable. (c) $HOME/open3d_data. By default, (c) will be used, and it is also the recommended way. |
◆ ~Dataset()
virtual open3d::data::Dataset::~Dataset |
( |
| ) |
|
|
inlinevirtual |
◆ GetDataRoot()
const std::string open3d::data::Dataset::GetDataRoot |
( |
| ) |
const |
|
inline |
Get data root directory. The data root is set at construction time or automatically determined.
◆ GetDownloadDir()
const std::string open3d::data::Dataset::GetDownloadDir |
( |
| ) |
const |
|
inline |
Get absolute path to download directory. i.e. ${data_root}/${download_prefix}/${prefix}.
◆ GetExtractDir()
const std::string open3d::data::Dataset::GetExtractDir |
( |
| ) |
const |
|
inline |
Get absolute path to extract directory. i.e. ${data_root}/${extract_prefix}/${prefix}.
◆ GetPrefix()
const std::string open3d::data::Dataset::GetPrefix |
( |
| ) |
const |
|
inline |
Get prefix for the dataset.
◆ data_root_
std::string open3d::data::Dataset::data_root_ |
|
protected |
◆ prefix_
std::string open3d::data::Dataset::prefix_ |
|
protected |
The documentation for this class was generated from the following files: