88 lines
3.7 KiB
C++
Executable File
88 lines
3.7 KiB
C++
Executable File
// ----------------------------------------------------------------------------
|
|
// - Open3D: www.open3d.org -
|
|
// ----------------------------------------------------------------------------
|
|
// Copyright (c) 2018-2023 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 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
|