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>
31 
32 namespace open3d {
33 namespace io {
34 
37 std::shared_ptr<geometry::PointCloud> CreatePointCloudFromFile(
38  const std::string &filename, const std::string &format = "auto");
39 
43 bool ReadPointCloud(const std::string &filename,
44  geometry::PointCloud &pointcloud,
45  const std::string &format = "auto");
46 
52 bool WritePointCloud(const std::string &filename,
53  const geometry::PointCloud &pointcloud,
54  bool write_ascii = false,
55  bool compressed = false);
56 
57 bool ReadPointCloudFromXYZ(const std::string &filename,
58  geometry::PointCloud &pointcloud);
59 
60 bool WritePointCloudToXYZ(const std::string &filename,
61  const geometry::PointCloud &pointcloud,
62  bool write_ascii = false,
63  bool compressed = false);
64 
65 bool ReadPointCloudFromXYZN(const std::string &filename,
66  geometry::PointCloud &pointcloud);
67 
68 bool WritePointCloudToXYZN(const std::string &filename,
69  const geometry::PointCloud &pointcloud,
70  bool write_ascii = false,
71  bool compressed = false);
72 
73 bool ReadPointCloudFromXYZRGB(const std::string &filename,
74  geometry::PointCloud &pointcloud);
75 
76 bool WritePointCloudToXYZRGB(const std::string &filename,
77  const geometry::PointCloud &pointcloud,
78  bool write_ascii = false,
79  bool compressed = false);
80 
81 bool ReadPointCloudFromPLY(const std::string &filename,
82  geometry::PointCloud &pointcloud);
83 
84 bool WritePointCloudToPLY(const std::string &filename,
85  const geometry::PointCloud &pointcloud,
86  bool write_ascii = false,
87  bool compressed = false);
88 
89 bool ReadPointCloudFromPCD(const std::string &filename,
90  geometry::PointCloud &pointcloud);
91 
92 bool WritePointCloudToPCD(const std::string &filename,
93  const geometry::PointCloud &pointcloud,
94  bool write_ascii = false,
95  bool compressed = false);
96 
97 bool ReadPointCloudFromPTS(const std::string &filename,
98  geometry::PointCloud &pointcloud);
99 
100 bool WritePointCloudToPTS(const std::string &filename,
101  const geometry::PointCloud &pointcloud,
102  bool write_ascii = false,
103  bool compressed = false);
104 
105 } // namespace io
106 } // namespace open3d
bool ReadPointCloudFromPTS(const std::string &filename, geometry::PointCloud &pointcloud)
Definition: FilePTS.cpp:36
bool WritePointCloudToPTS(const std::string &filename, const geometry::PointCloud &pointcloud, bool write_ascii=false, bool compressed=false)
Definition: FilePTS.cpp:93
bool WritePointCloudToXYZN(const std::string &filename, const geometry::PointCloud &pointcloud, bool write_ascii=false, bool compressed=false)
Definition: FileXYZN.cpp:60
bool WritePointCloudToXYZ(const std::string &filename, const geometry::PointCloud &pointcloud, bool write_ascii=false, bool compressed=false)
Definition: FileXYZ.cpp:58
bool ReadPointCloudFromPCD(const std::string &filename, geometry::PointCloud &pointcloud)
Definition: FilePCD.cpp:734
bool ReadPointCloudFromXYZRGB(const std::string &filename, geometry::PointCloud &pointcloud)
Definition: FileXYZRGB.cpp:35
bool ReadPointCloudFromPLY(const std::string &filename, geometry::PointCloud &pointcloud)
Definition: FilePLY.cpp:343
bool ReadPointCloud(const std::string &filename, geometry::PointCloud &pointcloud, const std::string &format)
Definition: PointCloudIO.cpp:74
bool ReadPointCloudFromXYZ(const std::string &filename, geometry::PointCloud &pointcloud)
Definition: FileXYZ.cpp:35
bool WritePointCloud(const std::string &filename, const geometry::PointCloud &pointcloud, bool write_ascii, bool compressed)
Definition: PointCloudIO.cpp:102
Definition: PinholeCameraIntrinsic.cpp:33
std::shared_ptr< geometry::PointCloud > CreatePointCloudFromFile(const std::string &filename, const std::string &format)
Definition: PointCloudIO.cpp:67
bool WritePointCloudToXYZRGB(const std::string &filename, const geometry::PointCloud &pointcloud, bool write_ascii=false, bool compressed=false)
Definition: FileXYZRGB.cpp:60
bool WritePointCloudToPCD(const std::string &filename, const geometry::PointCloud &pointcloud, bool write_ascii=false, bool compressed=false)
Definition: FilePCD.cpp:772
bool WritePointCloudToPLY(const std::string &filename, const geometry::PointCloud &pointcloud, bool write_ascii=false, bool compressed=false)
Definition: FilePLY.cpp:405
bool ReadPointCloudFromXYZN(const std::string &filename, geometry::PointCloud &pointcloud)
Definition: FileXYZN.cpp:35