10 #include <benchmark/benchmark.h>
32 const std::string& input_file_path,
33 const std::string& output_file_path,
35 const bool write_compressed) {
38 {
"auto",
false,
false,
false});
41 output_file_path, pcd,
45 for (
auto _ : state) {
47 output_file_path, pcd,
54 const std::string& input_file_path) {
57 {
"auto",
false,
false,
false});
59 for (
auto _ : state) {
61 {
"auto",
false,
false,
false});
66 const std::string& input_file_path,
67 const std::string& output_file_path,
69 const bool write_compressed) {
77 for (
auto _ : state) {
79 output_file_path, pcd,
86 const std::string& input_file_path) {
90 for (
auto _ : state) {
92 {
"auto",
false,
false,
false});
96 #define ENUM_BM_IO_EXTENSION_FORMAT(EXTENSION_NAME, FILE_NAME, FORMAT_NAME, \
98 BENCHMARK_CAPTURE(IOWriteLegacyPointCloud, EXTENSION_NAME##_##FORMAT_NAME, \
100 std::string("tensor_") + std::string(FILE_NAME), ASCII, \
102 ->Unit(benchmark::kMillisecond); \
103 BENCHMARK_CAPTURE(IOReadLegacyPointCloud, EXTENSION_NAME##_##FORMAT_NAME, \
104 std::string("tensor_") + std::string(FILE_NAME)) \
105 ->Unit(benchmark::kMillisecond); \
106 BENCHMARK_CAPTURE(IOWriteTensorPointCloud, EXTENSION_NAME##_##FORMAT_NAME, \
108 std::string("legacy_") + std::string(FILE_NAME), ASCII, \
110 ->Unit(benchmark::kMillisecond); \
111 BENCHMARK_CAPTURE(IOReadTensorPointCloud, EXTENSION_NAME##_##FORMAT_NAME, \
112 std::string("legacy_") + std::string(FILE_NAME)) \
113 ->Unit(benchmark::kMillisecond);
115 #define ENUM_BM_IO_EXTENSION(EXTENSION_NAME, EXTENSION) \
116 ENUM_BM_IO_EXTENSION_FORMAT( \
117 EXTENSION_NAME, std::string("pcd_ascii") + std::string(EXTENSION), \
118 ASCII_UNCOMPRESSED, true, false) \
119 ENUM_BM_IO_EXTENSION_FORMAT( \
120 EXTENSION_NAME, std::string("pcd_bin") + std::string(EXTENSION), \
121 BINARY_UNCOMPRESSED, false, false) \
122 ENUM_BM_IO_EXTENSION_FORMAT( \
124 std::string("pcd_bin_compressed") + std::string(EXTENSION), \
125 BINARY_COMPRESSED, false, true)
#define ENUM_BM_IO_EXTENSION(EXTENSION_NAME, EXTENSION)
A 3D cloud and its associated features (color, normals, scalar fields, etc.)
Data class for PLYPointCloud contains the fragment.ply point cloud mesh from the Redwood Living Room ...
std::string GetPath() const
Path to the PLY format point cloud.
A point cloud contains a list of 3D points.
bool ReadPointCloud(const std::string &filename, ccPointCloud &pointcloud, const ReadPointCloudOption ¶ms)
bool WritePointCloud(const std::string &filename, const ccPointCloud &pointcloud, const WritePointCloudOption ¶ms)
void IOReadLegacyPointCloud(benchmark::State &state, const std::string &input_file_path)
void IOWriteLegacyPointCloud(benchmark::State &state, const std::string &input_file_path, const std::string &output_file_path, const bool write_ascii, const bool write_compressed)
void IOWriteTensorPointCloud(benchmark::State &state, const std::string &input_file_path, const std::string &output_file_path, const bool write_ascii, const bool write_compressed)
static const std::string input_path_pcd
data::PLYPointCloud pointcloud_ply_data
void IOReadTensorPointCloud(benchmark::State &state, const std::string &input_file_path)
bool WritePointCloud(const std::string &filename, const geometry::PointCloud &pointcloud, const cloudViewer::io::WritePointCloudOption ¶ms)
bool ReadPointCloud(const std::string &filename, geometry::PointCloud &pointcloud, const cloudViewer::io::ReadPointCloudOption ¶ms)
Generic file read and write utility for python interface.
Optional parameters to WritePointCloud.