Open3D (C++ API)
PointCloudIO.h
Go to the documentation of this file.
1 // ----------------------------------------------------------------------------
2 // - Open3D: www.open3d.org -
3 // ----------------------------------------------------------------------------
4 // The MIT License (MIT)
5 //
6 // Copyright (c) 2018 www.open3d.org
7 //
8 // Permission is hereby granted, free of charge, to any person obtaining a copy
9 // of this software and associated documentation files (the "Software"), to deal
10 // in the Software without restriction, including without limitation the rights
11 // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12 // copies of the Software, and to permit persons to whom the Software is
13 // furnished to do so, subject to the following conditions:
14 //
15 // The above copyright notice and this permission notice shall be included in
16 // all copies or substantial portions of the Software.
17 //
18 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
23 // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
24 // IN THE SOFTWARE.
25 // ----------------------------------------------------------------------------
26 
27 #pragma once
28 
29 #include <string>
30 
32 
33 namespace open3d {
34 namespace io {
35 
38 std::shared_ptr<geometry::PointCloud> CreatePointCloudFromFile(
39  const std::string &filename,
40  const std::string &format = "auto",
41  bool print_progress = false);
42 
46 bool ReadPointCloud(const std::string &filename,
47  geometry::PointCloud &pointcloud,
48  const std::string &format = "auto",
49  bool remove_nan_points = true,
50  bool remove_infinite_points = true,
51  bool print_progress = false);
52 
58 bool WritePointCloud(const std::string &filename,
59  const geometry::PointCloud &pointcloud,
60  bool write_ascii = false,
61  bool compressed = false,
62  bool print_progress = false);
63 
64 bool ReadPointCloudFromXYZ(const std::string &filename,
65  geometry::PointCloud &pointcloud,
66  bool print_progress = false);
67 
68 bool WritePointCloudToXYZ(const std::string &filename,
69  const geometry::PointCloud &pointcloud,
70  bool write_ascii = false,
71  bool compressed = false,
72  bool print_progress = false);
73 
74 bool ReadPointCloudFromXYZN(const std::string &filename,
75  geometry::PointCloud &pointcloud,
76  bool print_progress = false);
77 
78 bool WritePointCloudToXYZN(const std::string &filename,
79  const geometry::PointCloud &pointcloud,
80  bool write_ascii = false,
81  bool compressed = false,
82  bool print_progress = false);
83 
84 bool ReadPointCloudFromXYZRGB(const std::string &filename,
85  geometry::PointCloud &pointcloud,
86  bool print_progress);
87 
88 bool WritePointCloudToXYZRGB(const std::string &filename,
89  const geometry::PointCloud &pointcloud,
90  bool write_ascii = false,
91  bool compressed = false,
92  bool print_progress = false);
93 
94 bool ReadPointCloudFromPLY(const std::string &filename,
95  geometry::PointCloud &pointcloud,
96  bool print_progress = false);
97 
98 bool WritePointCloudToPLY(const std::string &filename,
99  const geometry::PointCloud &pointcloud,
100  bool write_ascii = false,
101  bool compressed = false,
102  bool print_progress = false);
103 
104 bool ReadPointCloudFromPCD(const std::string &filename,
105  geometry::PointCloud &pointcloud,
106  bool print_progress = false);
107 
108 bool WritePointCloudToPCD(const std::string &filename,
109  const geometry::PointCloud &pointcloud,
110  bool write_ascii = false,
111  bool compressed = false,
112  bool print_progress = false);
113 
114 bool ReadPointCloudFromPTS(const std::string &filename,
115  geometry::PointCloud &pointcloud,
116  bool print_progress = false);
117 
118 bool WritePointCloudToPTS(const std::string &filename,
119  const geometry::PointCloud &pointcloud,
120  bool write_ascii = false,
121  bool compressed = false,
122  bool print_progress = false);
123 
124 } // namespace io
125 } // namespace open3d
bool ReadPointCloudFromPLY(const std::string &filename, geometry::PointCloud &pointcloud, bool print_progress=false)
Definition: FilePLY.cpp:392
bool ReadPointCloud(const std::string &filename, geometry::PointCloud &pointcloud, const std::string &format, bool remove_nan_points, bool remove_infinite_points, bool print_progress)
Definition: PointCloudIO.cpp:79
std::shared_ptr< geometry::PointCloud > CreatePointCloudFromFile(const std::string &filename, const std::string &format, bool print_progress)
Definition: PointCloudIO.cpp:70
bool ReadPointCloudFromPTS(const std::string &filename, geometry::PointCloud &pointcloud, bool print_progress=false)
Definition: FilePTS.cpp:41
bool WritePointCloudToPTS(const std::string &filename, const geometry::PointCloud &pointcloud, bool write_ascii=false, bool compressed=false, bool print_progress=false)
Definition: FilePTS.cpp:101
bool WritePointCloudToXYZN(const std::string &filename, const geometry::PointCloud &pointcloud, bool write_ascii=false, bool compressed=false, bool print_progress=false)
Definition: FileXYZN.cpp:67
Definition: Open3DViewer.h:29
bool WritePointCloudToPLY(const std::string &filename, const geometry::PointCloud &pointcloud, bool write_ascii=false, bool compressed=false, bool print_progress=false)
Definition: FilePLY.cpp:457
filament::Texture::InternalFormat format
Definition: FilamentResourceManager.cpp:155
bool ReadPointCloudFromXYZRGB(const std::string &filename, geometry::PointCloud &pointcloud, bool print_progress)
Definition: FileXYZRGB.cpp:41
bool ReadPointCloudFromXYZN(const std::string &filename, geometry::PointCloud &pointcloud, bool print_progress=false)
Definition: FileXYZN.cpp:41
bool WritePointCloud(const std::string &filename, const geometry::PointCloud &pointcloud, bool write_ascii, bool compressed, bool print_progress)
Definition: PointCloudIO.cpp:118
bool ReadPointCloudFromXYZ(const std::string &filename, geometry::PointCloud &pointcloud, bool print_progress=false)
Definition: FileXYZ.cpp:41
bool WritePointCloudToXYZ(const std::string &filename, const geometry::PointCloud &pointcloud, bool write_ascii=false, bool compressed=false, bool print_progress=false)
Definition: FileXYZ.cpp:65
bool WritePointCloudToXYZRGB(const std::string &filename, const geometry::PointCloud &pointcloud, bool write_ascii=false, bool compressed=false, bool print_progress=false)
Definition: FileXYZRGB.cpp:67
bool ReadPointCloudFromPCD(const std::string &filename, geometry::PointCloud &pointcloud, bool print_progress=false)
Definition: FilePCD.cpp:719
bool WritePointCloudToPCD(const std::string &filename, const geometry::PointCloud &pointcloud, bool write_ascii=false, bool compressed=false, bool print_progress=false)
Definition: FilePCD.cpp:756