Open3D (C++ API)
Functions
open3d::io Namespace Reference

Functions

bool ReadFeature (const std::string &filename, registration::Feature &feature)
 
bool WriteFeature (const std::string &filename, const registration::Feature &feature)
 
bool ReadFeatureFromBIN (const std::string &filename, registration::Feature &feature)
 
bool WriteFeatureToBIN (const std::string &filename, const registration::Feature &feature)
 
bool ReadIJsonConvertible (const std::string &filename, utility::IJsonConvertible &object)
 
bool WriteIJsonConvertible (const std::string &filename, const utility::IJsonConvertible &object)
 
bool ReadIJsonConvertibleFromJSON (const std::string &filename, utility::IJsonConvertible &object)
 
bool WriteIJsonConvertibleToJSON (const std::string &filename, const utility::IJsonConvertible &object)
 
bool ReadIJsonConvertibleFromJSONString (const std::string &json_string, utility::IJsonConvertible &object)
 
bool WriteIJsonConvertibleToJSONString (std::string &json_string, const utility::IJsonConvertible &object)
 
std::shared_ptr< geometry::Image > CreateImageFromFile (const std::string &filename)
 
bool ReadImage (const std::string &filename, geometry::Image &image)
 
bool WriteImage (const std::string &filename, const geometry::Image &image, int quality)
 
bool ReadImageFromPNG (const std::string &filename, geometry::Image &image)
 
bool WriteImageToPNG (const std::string &filename, const geometry::Image &image, int quality)
 
bool ReadImageFromJPG (const std::string &filename, geometry::Image &image)
 
bool WriteImageToJPG (const std::string &filename, const geometry::Image &image, int quality=90)
 
std::shared_ptr< color_map::ImageWarpingField > CreateImageWarpingFieldFromFile (const std::string &filename)
 
bool ReadImageWarpingField (const std::string &filename, color_map::ImageWarpingField &warping_field)
 
bool WriteImageWarpingField (const std::string &filename, const color_map::ImageWarpingField &trajectory)
 
std::shared_ptr< geometry::LineSet > CreateLineSetFromFile (const std::string &filename, const std::string &format)
 
bool ReadLineSet (const std::string &filename, geometry::LineSet &lineset, const std::string &format)
 
bool WriteLineSet (const std::string &filename, const geometry::LineSet &lineset, bool write_ascii, bool compressed)
 
bool ReadLineSetFromPLY (const std::string &filename, geometry::LineSet &lineset)
 
bool WriteLineSetToPLY (const std::string &filename, const geometry::LineSet &lineset, bool write_ascii=false, bool compressed=false)
 
std::shared_ptr< camera::PinholeCameraTrajectory > CreatePinholeCameraTrajectoryFromFile (const std::string &filename)
 
bool ReadPinholeCameraTrajectory (const std::string &filename, camera::PinholeCameraTrajectory &trajectory)
 
bool WritePinholeCameraTrajectory (const std::string &filename, const camera::PinholeCameraTrajectory &trajectory)
 
bool ReadPinholeCameraTrajectoryFromLOG (const std::string &filename, camera::PinholeCameraTrajectory &trajectory)
 
bool WritePinholeCameraTrajectoryToLOG (const std::string &filename, const camera::PinholeCameraTrajectory &trajectory)
 
std::shared_ptr< geometry::PointCloud > CreatePointCloudFromFile (const std::string &filename, const std::string &format)
 
bool ReadPointCloud (const std::string &filename, geometry::PointCloud &pointcloud, const std::string &format)
 
bool WritePointCloud (const std::string &filename, const geometry::PointCloud &pointcloud, bool write_ascii, bool compressed)
 
bool ReadPointCloudFromXYZ (const std::string &filename, geometry::PointCloud &pointcloud)
 
bool WritePointCloudToXYZ (const std::string &filename, const geometry::PointCloud &pointcloud, bool write_ascii=false, bool compressed=false)
 
bool ReadPointCloudFromXYZN (const std::string &filename, geometry::PointCloud &pointcloud)
 
bool WritePointCloudToXYZN (const std::string &filename, const geometry::PointCloud &pointcloud, bool write_ascii=false, bool compressed=false)
 
bool ReadPointCloudFromXYZRGB (const std::string &filename, geometry::PointCloud &pointcloud)
 
bool WritePointCloudToXYZRGB (const std::string &filename, const geometry::PointCloud &pointcloud, bool write_ascii=false, bool compressed=false)
 
bool ReadPointCloudFromPLY (const std::string &filename, geometry::PointCloud &pointcloud)
 
bool WritePointCloudToPLY (const std::string &filename, const geometry::PointCloud &pointcloud, bool write_ascii=false, bool compressed=false)
 
bool ReadPointCloudFromPCD (const std::string &filename, geometry::PointCloud &pointcloud)
 
bool WritePointCloudToPCD (const std::string &filename, const geometry::PointCloud &pointcloud, bool write_ascii=false, bool compressed=false)
 
bool ReadPointCloudFromPTS (const std::string &filename, geometry::PointCloud &pointcloud)
 
bool WritePointCloudToPTS (const std::string &filename, const geometry::PointCloud &pointcloud, bool write_ascii=false, bool compressed=false)
 
std::shared_ptr< registration::PoseGraph > CreatePoseGraphFromFile (const std::string &filename)
 
bool ReadPoseGraph (const std::string &filename, registration::PoseGraph &pose_graph)
 
bool WritePoseGraph (const std::string &filename, const registration::PoseGraph &pose_graph)
 
std::shared_ptr< geometry::TriangleMesh > CreateMeshFromFile (const std::string &filename)
 
bool ReadTriangleMesh (const std::string &filename, geometry::TriangleMesh &mesh)
 
bool WriteTriangleMesh (const std::string &filename, const geometry::TriangleMesh &mesh, bool write_ascii, bool compressed)
 
bool ReadTriangleMeshFromPLY (const std::string &filename, geometry::TriangleMesh &mesh)
 
bool WriteTriangleMeshToPLY (const std::string &filename, const geometry::TriangleMesh &mesh, bool write_ascii=false, bool compressed=false)
 
bool ReadTriangleMeshFromSTL (const std::string &filename, geometry::TriangleMesh &mesh)
 
bool WriteTriangleMeshToSTL (const std::string &filename, const geometry::TriangleMesh &mesh, bool write_ascii=false, bool compressed=false)
 
std::shared_ptr< geometry::VoxelGrid > CreateVoxelGridFromFile (const std::string &filename, const std::string &format)
 
bool ReadVoxelGrid (const std::string &filename, geometry::VoxelGrid &voxelgrid, const std::string &format)
 
bool WriteVoxelGrid (const std::string &filename, const geometry::VoxelGrid &voxelgrid, bool write_ascii, bool compressed)
 
bool ReadVoxelGridFromPLY (const std::string &filename, geometry::VoxelGrid &voxelgrid)
 
bool WriteVoxelGridToPLY (const std::string &filename, const geometry::VoxelGrid &voxelgrid, bool write_ascii=false, bool compressed=false)
 

Function Documentation

◆ CreateImageFromFile()

std::shared_ptr< geometry::Image > open3d::io::CreateImageFromFile ( const std::string &  filename)

Factory function to create an image from a file (ImageFactory.cpp) Return an empty image if fail to read the file.

◆ CreateImageWarpingFieldFromFile()

std::shared_ptr< color_map::ImageWarpingField > open3d::io::CreateImageWarpingFieldFromFile ( const std::string &  filename)

Factory function to create a ImageWarpingField from a file Return an empty PinholeCameraTrajectory if fail to read the file.

◆ CreateLineSetFromFile()

std::shared_ptr< geometry::LineSet > open3d::io::CreateLineSetFromFile ( const std::string &  filename,
const std::string &  format = "auto" 
)

Factory function to create a lineset from a file.

Returns
return an empty lineset if fail to read the file.

◆ CreateMeshFromFile()

std::shared_ptr< geometry::TriangleMesh > open3d::io::CreateMeshFromFile ( const std::string &  filename)

Factory function to create a mesh from a file (TriangleMeshFactory.cpp) Return an empty mesh if fail to read the file.

◆ CreatePinholeCameraTrajectoryFromFile()

std::shared_ptr< camera::PinholeCameraTrajectory > open3d::io::CreatePinholeCameraTrajectoryFromFile ( const std::string &  filename)

Factory function to create a PinholeCameraTrajectory from a file (PinholeCameraTrajectoryFactory.cpp) Return an empty PinholeCameraTrajectory if fail to read the file.

◆ CreatePointCloudFromFile()

std::shared_ptr< geometry::PointCloud > open3d::io::CreatePointCloudFromFile ( const std::string &  filename,
const std::string &  format = "auto" 
)

Factory function to create a pointcloud from a file (PointCloudFactory.cpp) Return an empty pointcloud if fail to read the file.

◆ CreatePoseGraphFromFile()

std::shared_ptr< registration::PoseGraph > open3d::io::CreatePoseGraphFromFile ( const std::string &  filename)

Factory function to create a PoseGraph from a file (PinholeCameraTrajectoryFactory.cpp) Return an empty PinholeCameraTrajectory if fail to read the file.

◆ CreateVoxelGridFromFile()

std::shared_ptr< geometry::VoxelGrid > open3d::io::CreateVoxelGridFromFile ( const std::string &  filename,
const std::string &  format = "auto" 
)

Factory function to create a voxelgrid from a file.

Returns
return an empty voxelgrid if fail to read the file.

◆ ReadFeature()

bool open3d::io::ReadFeature ( const std::string &  filename,
registration::Feature &  feature 
)

The general entrance for reading a Feature from a file

Returns
If the read function is successful.

◆ ReadFeatureFromBIN()

bool open3d::io::ReadFeatureFromBIN ( const std::string &  filename,
registration::Feature &  feature 
)

◆ ReadIJsonConvertible()

bool open3d::io::ReadIJsonConvertible ( const std::string &  filename,
utility::IJsonConvertible &  object 
)

The general entrance for reading an IJsonConvertible from a file The function calls read functions based on the extension name of filename.

Returns
return true if the read function is successful, false otherwise.

◆ ReadIJsonConvertibleFromJSON()

bool open3d::io::ReadIJsonConvertibleFromJSON ( const std::string &  filename,
utility::IJsonConvertible &  object 
)

◆ ReadIJsonConvertibleFromJSONString()

bool open3d::io::ReadIJsonConvertibleFromJSONString ( const std::string &  json_string,
utility::IJsonConvertible &  object 
)

◆ ReadImage()

bool open3d::io::ReadImage ( const std::string &  filename,
geometry::Image &  image 
)

The general entrance for reading an Image from a file The function calls read functions based on the extension name of filename.

Returns
return true if the read function is successful, false otherwise.

◆ ReadImageFromJPG()

bool open3d::io::ReadImageFromJPG ( const std::string &  filename,
geometry::Image &  image 
)

◆ ReadImageFromPNG()

bool open3d::io::ReadImageFromPNG ( const std::string &  filename,
geometry::Image &  image 
)

◆ ReadImageWarpingField()

bool open3d::io::ReadImageWarpingField ( const std::string &  filename,
color_map::ImageWarpingField &  warping_field 
)

The general entrance for reading a ImageWarpingField from a file

Returns
If the read function is successful.

◆ ReadLineSet()

bool open3d::io::ReadLineSet ( const std::string &  filename,
geometry::LineSet &  lineset,
const std::string &  format = "auto" 
)

The general entrance for reading a LineSet from a file The function calls read functions based on the extension name of filename.

Returns
return true if the read function is successful, false otherwise.

◆ ReadLineSetFromPLY()

bool open3d::io::ReadLineSetFromPLY ( const std::string &  filename,
geometry::LineSet &  lineset 
)

◆ ReadPinholeCameraTrajectory()

bool open3d::io::ReadPinholeCameraTrajectory ( const std::string &  filename,
camera::PinholeCameraTrajectory &  trajectory 
)

The general entrance for reading a PinholeCameraTrajectory from a file The function calls read functions based on the extension name of filename.

Returns
If the read function is successful.

◆ ReadPinholeCameraTrajectoryFromLOG()

bool open3d::io::ReadPinholeCameraTrajectoryFromLOG ( const std::string &  filename,
camera::PinholeCameraTrajectory &  trajectory 
)

◆ ReadPointCloud()

bool open3d::io::ReadPointCloud ( const std::string &  filename,
geometry::PointCloud &  pointcloud,
const std::string &  format = "auto" 
)

The general entrance for reading a PointCloud from a file The function calls read functions based on the extension name of filename.

Returns
return true if the read function is successful, false otherwise.

◆ ReadPointCloudFromPCD()

bool open3d::io::ReadPointCloudFromPCD ( const std::string &  filename,
geometry::PointCloud &  pointcloud 
)

◆ ReadPointCloudFromPLY()

bool open3d::io::ReadPointCloudFromPLY ( const std::string &  filename,
geometry::PointCloud &  pointcloud 
)

◆ ReadPointCloudFromPTS()

bool open3d::io::ReadPointCloudFromPTS ( const std::string &  filename,
geometry::PointCloud &  pointcloud 
)

◆ ReadPointCloudFromXYZ()

bool open3d::io::ReadPointCloudFromXYZ ( const std::string &  filename,
geometry::PointCloud &  pointcloud 
)

◆ ReadPointCloudFromXYZN()

bool open3d::io::ReadPointCloudFromXYZN ( const std::string &  filename,
geometry::PointCloud &  pointcloud 
)

◆ ReadPointCloudFromXYZRGB()

bool open3d::io::ReadPointCloudFromXYZRGB ( const std::string &  filename,
geometry::PointCloud &  pointcloud 
)

◆ ReadPoseGraph()

bool open3d::io::ReadPoseGraph ( const std::string &  filename,
registration::PoseGraph &  pose_graph 
)

The general entrance for reading a PoseGraph from a file. The function calls read functions based on the extension name of filename.

Returns
return true if the read function is successful, false otherwise.

◆ ReadTriangleMesh()

bool open3d::io::ReadTriangleMesh ( const std::string &  filename,
geometry::TriangleMesh &  mesh 
)

The general entrance for reading a TriangleMesh from a file The function calls read functions based on the extension name of filename.

Returns
return true if the read function is successful, false otherwise.

◆ ReadTriangleMeshFromPLY()

bool open3d::io::ReadTriangleMeshFromPLY ( const std::string &  filename,
geometry::TriangleMesh &  mesh 
)

◆ ReadTriangleMeshFromSTL()

bool open3d::io::ReadTriangleMeshFromSTL ( const std::string &  filename,
geometry::TriangleMesh &  mesh 
)

◆ ReadVoxelGrid()

bool open3d::io::ReadVoxelGrid ( const std::string &  filename,
geometry::VoxelGrid &  voxelgrid,
const std::string &  format = "auto" 
)

The general entrance for reading a VoxelGrid from a file The function calls read functions based on the extension name of filename.

Returns
return true if the read function is successful, false otherwise.

◆ ReadVoxelGridFromPLY()

bool open3d::io::ReadVoxelGridFromPLY ( const std::string &  filename,
geometry::VoxelGrid &  voxelgrid 
)

◆ WriteFeature()

bool open3d::io::WriteFeature ( const std::string &  filename,
const registration::Feature &  feature 
)

The general entrance for writing a Feature to a file

Returns
If the write function is successful.

◆ WriteFeatureToBIN()

bool open3d::io::WriteFeatureToBIN ( const std::string &  filename,
const registration::Feature &  feature 
)

◆ WriteIJsonConvertible()

bool open3d::io::WriteIJsonConvertible ( const std::string &  filename,
const utility::IJsonConvertible &  object 
)

The general entrance for writing an IJsonConvertible to a file The function calls write functions based on the extension name of filename.

Returns
return true if the write function is successful, false otherwise.

◆ WriteIJsonConvertibleToJSON()

bool open3d::io::WriteIJsonConvertibleToJSON ( const std::string &  filename,
const utility::IJsonConvertible &  object 
)

◆ WriteIJsonConvertibleToJSONString()

bool open3d::io::WriteIJsonConvertibleToJSONString ( std::string &  json_string,
const utility::IJsonConvertible &  object 
)

◆ WriteImage()

bool open3d::io::WriteImage ( const std::string &  filename,
const geometry::Image &  image,
int  quality = 90 
)

The general entrance for writing an Image to a file The function calls write functions based on the extension name of filename. If the write function supports quality, the parameter will be used. Otherwise it will be ignored.

Returns
return true if the write function is successful, false otherwise.

◆ WriteImageToJPG()

bool open3d::io::WriteImageToJPG ( const std::string &  filename,
const geometry::Image &  image,
int  quality = 90 
)

◆ WriteImageToPNG()

bool open3d::io::WriteImageToPNG ( const std::string &  filename,
const geometry::Image &  image,
int  quality 
)

◆ WriteImageWarpingField()

bool open3d::io::WriteImageWarpingField ( const std::string &  filename,
const color_map::ImageWarpingField &  warping_field 
)

The general entrance for writing a ImageWarpingField to a file

Returns
If the write function is successful.

◆ WriteLineSet()

bool open3d::io::WriteLineSet ( const std::string &  filename,
const geometry::LineSet &  lineset,
bool  write_ascii = false,
bool  compressed = false 
)

The general entrance for writing a LineSet to a file The function calls write functions based on the extension name of filename. If the write function supports binary encoding and compression, the later two parameters will be used. Otherwise they will be ignored.

Returns
return true if the write function is successful, false otherwise.

◆ WriteLineSetToPLY()

bool open3d::io::WriteLineSetToPLY ( const std::string &  filename,
const geometry::LineSet &  lineset,
bool  write_ascii = false,
bool  compressed = false 
)

◆ WritePinholeCameraTrajectory()

bool open3d::io::WritePinholeCameraTrajectory ( const std::string &  filename,
const camera::PinholeCameraTrajectory &  trajectory 
)

The general entrance for writing a PinholeCameraTrajectory to a file The function calls write functions based on the extension name of filename.

Returns
If the write function is successful.

◆ WritePinholeCameraTrajectoryToLOG()

bool open3d::io::WritePinholeCameraTrajectoryToLOG ( const std::string &  filename,
const camera::PinholeCameraTrajectory &  trajectory 
)

◆ WritePointCloud()

bool open3d::io::WritePointCloud ( const std::string &  filename,
const geometry::PointCloud &  pointcloud,
bool  write_ascii = false,
bool  compressed = false 
)

The general entrance for writing a PointCloud to a file The function calls write functions based on the extension name of filename. If the write function supports binary encoding and compression, the later two parameters will be used. Otherwise they will be ignored.

Returns
return true if the write function is successful, false otherwise.

◆ WritePointCloudToPCD()

bool open3d::io::WritePointCloudToPCD ( const std::string &  filename,
const geometry::PointCloud &  pointcloud,
bool  write_ascii = false,
bool  compressed = false 
)

◆ WritePointCloudToPLY()

bool open3d::io::WritePointCloudToPLY ( const std::string &  filename,
const geometry::PointCloud &  pointcloud,
bool  write_ascii = false,
bool  compressed = false 
)

◆ WritePointCloudToPTS()

bool open3d::io::WritePointCloudToPTS ( const std::string &  filename,
const geometry::PointCloud &  pointcloud,
bool  write_ascii = false,
bool  compressed = false 
)

◆ WritePointCloudToXYZ()

bool open3d::io::WritePointCloudToXYZ ( const std::string &  filename,
const geometry::PointCloud &  pointcloud,
bool  write_ascii = false,
bool  compressed = false 
)

◆ WritePointCloudToXYZN()

bool open3d::io::WritePointCloudToXYZN ( const std::string &  filename,
const geometry::PointCloud &  pointcloud,
bool  write_ascii = false,
bool  compressed = false 
)

◆ WritePointCloudToXYZRGB()

bool open3d::io::WritePointCloudToXYZRGB ( const std::string &  filename,
const geometry::PointCloud &  pointcloud,
bool  write_ascii = false,
bool  compressed = false 
)

◆ WritePoseGraph()

bool open3d::io::WritePoseGraph ( const std::string &  filename,
const registration::PoseGraph &  pose_graph 
)

The general entrance for writing a PoseGraph to a file. The function calls write functions based on the extension name of filename.

Returns
return true if the write function is successful, false otherwise.

◆ WriteTriangleMesh()

bool open3d::io::WriteTriangleMesh ( const std::string &  filename,
const geometry::TriangleMesh &  mesh,
bool  write_ascii = false,
bool  compressed = false 
)

The general entrance for writing a TriangleMesh to a file The function calls write functions based on the extension name of filename. If the write function supports binary encoding and compression, the later two parameters will be used. Otherwise they will be ignored.

Returns
return true if the write function is successful, false otherwise.

◆ WriteTriangleMeshToPLY()

bool open3d::io::WriteTriangleMeshToPLY ( const std::string &  filename,
const geometry::TriangleMesh &  mesh,
bool  write_ascii = false,
bool  compressed = false 
)

◆ WriteTriangleMeshToSTL()

bool open3d::io::WriteTriangleMeshToSTL ( const std::string &  filename,
const geometry::TriangleMesh &  mesh,
bool  write_ascii = false,
bool  compressed = false 
)

◆ WriteVoxelGrid()

bool open3d::io::WriteVoxelGrid ( const std::string &  filename,
const geometry::VoxelGrid &  voxelgrid,
bool  write_ascii = false,
bool  compressed = false 
)

The general entrance for writing a VoxelGrid to a file The function calls write functions based on the extension name of filename. If the write function supports binary encoding and compression, the later two parameters will be used. Otherwise they will be ignored.

Returns
return true if the write function is successful, false otherwise.

◆ WriteVoxelGridToPLY()

bool open3d::io::WriteVoxelGridToPLY ( const std::string &  filename,
const geometry::VoxelGrid &  voxelgrid,
bool  write_ascii = false,
bool  compressed = false 
)