forked from isl-org/Open3D
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPointCloudIO.h
95 lines (74 loc) · 4.04 KB
/
PointCloudIO.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
// ----------------------------------------------------------------------------
// - Open3D: www.open3d.org -
// ----------------------------------------------------------------------------
// Copyright (c) 2018-2024 www.open3d.org
// SPDX-License-Identifier: MIT
// ----------------------------------------------------------------------------
#pragma once
#include <string>
#include "open3d/io/PointCloudIO.h"
#include "open3d/t/geometry/PointCloud.h"
namespace open3d {
namespace t {
namespace io {
using open3d::io::ReadPointCloudOption;
using open3d::io::WritePointCloudOption;
/// Factory function to create a pointcloud from a file
/// Return an empty pointcloud if fail to read the file.
std::shared_ptr<geometry::PointCloud> CreatePointCloudFromFile(
const std::string &filename,
const std::string &format = "auto",
bool print_progress = false);
/// The general entrance for reading a PointCloud from a file
/// The function calls read functions based on the extension name of filename.
/// See \p ReadPointCloudOption for additional options you can pass.
/// \return return true if the read function is successful, false otherwise.
bool ReadPointCloud(const std::string &filename,
geometry::PointCloud &pointcloud,
const ReadPointCloudOption ¶ms = {});
/// The general entrance for writing a PointCloud to a file
/// The function calls write functions based on the extension name of filename.
/// See \p WritePointCloudOption for additional options you can pass.
/// \return return true if the write function is successful, false otherwise.
bool WritePointCloud(const std::string &filename,
const geometry::PointCloud &pointcloud,
const WritePointCloudOption ¶ms = {});
bool ReadPointCloudFromNPZ(const std::string &filename,
geometry::PointCloud &pointcloud,
const ReadPointCloudOption ¶ms);
bool WritePointCloudToNPZ(const std::string &filename,
const geometry::PointCloud &pointcloud,
const WritePointCloudOption ¶ms);
bool ReadPointCloudFromTXT(const std::string &filename,
geometry::PointCloud &pointcloud,
const ReadPointCloudOption ¶ms);
bool WritePointCloudToTXT(const std::string &filename,
const geometry::PointCloud &pointcloud,
const WritePointCloudOption ¶ms);
bool ReadPointCloudFromPCD(const std::string &filename,
geometry::PointCloud &pointcloud,
const ReadPointCloudOption ¶ms);
bool WritePointCloudToPCD(const std::string &filename,
const geometry::PointCloud &pointcloud,
const WritePointCloudOption ¶ms);
bool ReadPointCloudFromPLY(const std::string &filename,
geometry::PointCloud &pointcloud,
const ReadPointCloudOption ¶ms);
bool WritePointCloudToPLY(const std::string &filename,
const geometry::PointCloud &pointcloud,
const WritePointCloudOption ¶ms);
bool ReadPointCloudFromSPLAT(const std::string &filename,
geometry::PointCloud &pointcloud,
const ReadPointCloudOption ¶ms);
bool WritePointCloudToSPLAT(const std::string &filename,
const geometry::PointCloud &pointcloud,
const WritePointCloudOption ¶ms);
bool ReadPointCloudFromPTS(const std::string &filename,
geometry::PointCloud &pointcloud,
const ReadPointCloudOption ¶ms);
bool WritePointCloudToPTS(const std::string &filename,
const geometry::PointCloud &pointcloud,
const WritePointCloudOption ¶ms);
} // namespace io
} // namespace t
} // namespace open3d