Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue 7153 - 3DGS IO #7191

Merged
merged 7 commits into from
Mar 28, 2025
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions cpp/open3d/t/geometry/PointCloud.h
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,41 @@ class PointCloud : public Geometry, public DrawableGeometry {
/// This is a convenience function.
bool HasPointNormals() const { return HasPointAttr("normals"); }

/// Returns true if all of the following are true:
/// 1) attribute "scale" exist
/// 2) attribute "scale"'s length as points' length
/// 3) attribute "scale"'s length > 0
/// This is a convenience function.
bool HasPointScales() const { return HasPointAttr("scale"); }

/// Returns true if all of the following are true:
/// 1) attribute "opacity" exist
/// 2) attribute "opacity"'s length as points' length
/// 3) attribute "opacity"'s length > 0
/// This is a convenience function.
bool HasPointOpacities() const { return HasPointAttr("opacity"); }

/// Returns true if all of the following are true:
/// 1) attribute "rot" exist
/// 2) attribute "rot"'s length as points' length
/// 3) attribute "rot"'s length > 0
/// This is a convenience function.
bool HasPointRots() const { return HasPointAttr("rot"); }

/// Returns true if all of the following are true:
/// 1) attribute "f_dc" exist
/// 2) attribute "f_dc"'s length as points' length
/// 3) attribute "f_dc"'s length > 0
/// This is a convenience function.
bool HasPointFDCs() const { return HasPointAttr("f_dc"); }

/// Returns true if all of the following are true:
/// 1) attribute "f_rest" exist
/// 2) attribute "f_rest"'s length as points' length
/// 3) attribute "f_rest"'s length > 0
/// This is a convenience function.
bool HasPointFRests() const { return HasPointAttr("f_rest"); }

public:
/// Transfer the point cloud to a specified device.
/// \param device The targeted device to convert to.
Expand Down
1 change: 1 addition & 0 deletions cpp/open3d/t/io/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ target_sources(tio PRIVATE
file_format/FileJPG.cpp
file_format/FilePCD.cpp
file_format/FilePLY.cpp
file_format/FileSPLAT.cpp
file_format/FilePNG.cpp
file_format/FilePTS.cpp
file_format/FileTXT.cpp
Expand Down
1 change: 1 addition & 0 deletions cpp/open3d/t/io/PointCloudIO.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ static const std::unordered_map<
{"xyzrgb", WritePointCloudToTXT},
{"pcd", WritePointCloudToPCD},
{"ply", WritePointCloudToPLY},
{"splat", WritePointCloudToSPLAT},
{"pts", WritePointCloudToPTS},
};

Expand Down
8 changes: 8 additions & 0 deletions cpp/open3d/t/io/PointCloudIO.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,14 @@ bool WritePointCloudToPLY(const std::string &filename,
const geometry::PointCloud &pointcloud,
const WritePointCloudOption &params);

bool ReadPointCloudFromSPLAT(const std::string &filename,
geometry::PointCloud &pointcloud,
const ReadPointCloudOption &params);

bool WritePointCloudToSPLAT(const std::string &filename,
const geometry::PointCloud &pointcloud,
const WritePointCloudOption &params);

bool ReadPointCloudFromPTS(const std::string &filename,
geometry::PointCloud &pointcloud,
const ReadPointCloudOption &params);
Expand Down
Loading
Loading