ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
cloudViewer::io Namespace Reference

Namespaces

 k4a_plugin
 
 rpc
 

Classes

struct  TextureImages
 
struct  ReadTriangleModelOptions
 
class  AzureKinectRecorder
 
class  AzureKinectSensor
 
class  AzureKinectSensorConfig
 
class  MKVMetadata
 
class  MKVReader
 
class  MKVWriter
 
class  RGBDRecorder
 
class  RGBDSensor
 
class  RGBDSensorConfig
 
struct  ArrayAdapter
 
struct  IntArrayBase
 
struct  IntArray
 
struct  ReadTriangleMeshOptions
 
struct  ReadPointCloudOption
 Optional parameters to ReadPointCloud. More...
 
struct  WritePointCloudOption
 Optional parameters to WritePointCloud. More...
 

Enumerations

enum  FileGeometry { CONTENTS_UNKNOWN = 0 , CONTAINS_POINTS = (1 << 0) , CONTAINS_LINES = (1 << 1) , CONTAINS_TRIANGLES = (1 << 2) }
 

Functions

void LoadTextures (const std::string &filename, const aiScene *scene, const aiMaterial *mat, TextureImages &maps)
 
bool ReadTriangleMeshUsingASSIMP (const std::string &filename, ccMesh &mesh, const ReadTriangleMeshOptions &params)
 
bool ReadModelUsingAssimp (const std::string &filename, visualization::rendering::TriangleMeshModel &model, const ReadTriangleModelOptions &params)
 
FileGeometry ReadFileGeometryType (const std::string &path)
 
FileGeometry ReadFileGeometryTypeGLTF (const std::string &path)
 
FileGeometry ReadFileGeometryTypeOBJ (const std::string &path)
 
FileGeometry ReadFileGeometryTypeFBX (const std::string &path)
 
FileGeometry ReadFileGeometryTypeOFF (const std::string &path)
 
FileGeometry ReadFileGeometryTypePCD (const std::string &path)
 
FileGeometry ReadFileGeometryTypePLY (const std::string &path)
 
FileGeometry ReadFileGeometryTypePTS (const std::string &path)
 
FileGeometry ReadFileGeometryTypeSTL (const std::string &path)
 
FileGeometry ReadFileGeometryTypeXYZ (const std::string &path)
 
FileGeometry ReadFileGeometryTypeXYZN (const std::string &path)
 
FileGeometry ReadFileGeometryTypeXYZRGB (const std::string &path)
 
bool ReadPointCloudFromPCD (const std::string &filename, ccPointCloud &pointcloud, const ReadPointCloudOption &params)
 
bool WritePointCloudToPCD (const std::string &filename, const ccPointCloud &pointcloud, const WritePointCloudOption &params)
 
bool ReadPointCloudFromXYZ (const std::string &filename, ccPointCloud &pointcloud, const ReadPointCloudOption &params)
 
bool ReadPointCloudInMemoryFromXYZ (const unsigned char *buffer, const size_t length, ccPointCloud &pointcloud, const ReadPointCloudOption &params)
 
bool WritePointCloudToXYZ (const std::string &filename, const ccPointCloud &pointcloud, const WritePointCloudOption &params)
 
bool WritePointCloudInMemoryToXYZ (unsigned char *&buffer, size_t &length, const ccPointCloud &pointcloud, const WritePointCloudOption &params)
 
bool ReadPointCloudFromXYZN (const std::string &filename, ccPointCloud &pointcloud, const ReadPointCloudOption &params)
 
bool WritePointCloudToXYZN (const std::string &filename, const ccPointCloud &pointcloud, const WritePointCloudOption &params)
 
bool ReadPointCloudFromXYZRGB (const std::string &filename, ccPointCloud &pointcloud, const ReadPointCloudOption &params)
 
bool WritePointCloudToXYZRGB (const std::string &filename, const ccPointCloud &pointcloud, const WritePointCloudOption &params)
 
bool ReadPointCloudFromPLY (const std::string &filename, ccPointCloud &pointcloud, const ReadPointCloudOption &params)
 
bool WritePointCloudToPLY (const std::string &filename, const ccPointCloud &pointcloud, const WritePointCloudOption &params)
 
bool ReadPointCloudFromPTS (const std::string &filename, ccPointCloud &pointcloud, const ReadPointCloudOption &params)
 
bool WritePointCloudToPTS (const std::string &filename, const ccPointCloud &pointcloud, const WritePointCloudOption &params)
 
std::shared_ptr< pipelines::color_map::ImageWarpingFieldCreateImageWarpingFieldFromFile (const std::string &filename)
 
bool ReadImageWarpingField (const std::string &filename, pipelines::color_map::ImageWarpingField &warping_field)
 
bool WriteImageWarpingField (const std::string &filename, const pipelines::color_map::ImageWarpingField &trajectory)
 
bool ReadTriangleModel (const std::string &filename, visualization::rendering::TriangleMeshModel &model, ReadTriangleModelOptions params)
 
std::shared_ptr< ccPointCloudCreatePointCloudFromFile (const std::string &filename, const std::string &format, bool print_progress)
 
std::shared_ptr< ccPointCloudCreatePointCloudFromMemory (const unsigned char *buffer, const size_t length, const std::string &format, bool print_progress)
 
bool ReadPointCloud (const std::string &filename, ccPointCloud &pointcloud, const ReadPointCloudOption &params)
 
bool ReadPointCloud (const std::string &filename, ccPointCloud &pointcloud, const std::string &file_format, bool remove_nan_points, bool remove_infinite_points, bool print_progress)
 
bool ReadPointCloud (const unsigned char *buffer, const size_t length, ccPointCloud &pointcloud, const ReadPointCloudOption &params)
 
bool WritePointCloud (const std::string &filename, const ccPointCloud &pointcloud, const WritePointCloudOption &params)
 
bool WritePointCloud (const std::string &filename, const ccPointCloud &pointcloud, const std::string &file_format, bool write_ascii, bool compressed, bool print_progress)
 
bool WritePointCloud (unsigned char *&buffer, size_t &length, const ccPointCloud &pointcloud, const WritePointCloudOption &params)
 
std::shared_ptr< pipelines::registration::PoseGraphCreatePoseGraphFromFile (const std::string &filename)
 
bool ReadPoseGraph (const std::string &filename, pipelines::registration::PoseGraph &pose_graph)
 
bool WritePoseGraph (const std::string &filename, const pipelines::registration::PoseGraph &pose_graph)
 
void ConvertBGRAToRGB (geometry::Image &bgra, geometry::Image &rgb)
 
static std::map< std::string, k4a_image_format_t > string_to_k4a_image_format_t ({ {"K4A_IMAGE_FORMAT_COLOR_MJPG", K4A_IMAGE_FORMAT_COLOR_MJPG}, {"K4A_IMAGE_FORMAT_COLOR_NV12", K4A_IMAGE_FORMAT_COLOR_NV12}, {"K4A_IMAGE_FORMAT_COLOR_YUY2", K4A_IMAGE_FORMAT_COLOR_YUY2}, {"K4A_IMAGE_FORMAT_COLOR_BGRA32", K4A_IMAGE_FORMAT_COLOR_BGRA32}, {"K4A_IMAGE_FORMAT_DEPTH16", K4A_IMAGE_FORMAT_DEPTH16}, {"K4A_IMAGE_FORMAT_IR16", K4A_IMAGE_FORMAT_IR16}, {"K4A_IMAGE_FORMAT_CUSTOM", K4A_IMAGE_FORMAT_CUSTOM}, })
 
std::shared_ptr< ccMeshCreateMeshFromFile (const std::string &filename, bool print_progress)
 
bool ReadTriangleMesh (const std::string &filename, ccMesh &mesh, ReadTriangleMeshOptions params)
 
bool WriteTriangleMesh (const std::string &filename, const ccMesh &mesh, bool write_ascii, bool compressed, bool write_vertex_normals, bool write_vertex_colors, bool write_triangle_uvs, bool print_progress)
 
bool IsPointInsidePolygon (const Eigen::MatrixX2d &polygon, double x, double y)
 
bool AddTrianglesByEarClipping (ccMesh &mesh, std::vector< unsigned int > &indices)
 
bool ReadTriangleMeshFromPLY (const std::string &filename, ccMesh &mesh, const ReadTriangleMeshOptions &params)
 
bool WriteTriangleMeshToPLY (const std::string &filename, const ccMesh &mesh, bool write_ascii, bool compressed, bool write_vertex_normals, bool write_vertex_colors, bool write_triangle_uvs, bool print_progress)
 
bool ReadTriangleMeshFromSTL (const std::string &filename, ccMesh &mesh, bool print_progress)
 
bool WriteTriangleMeshToSTL (const std::string &filename, const ccMesh &mesh, bool write_ascii, bool compressed, bool write_vertex_normals, bool write_vertex_colors, bool write_triangle_uvs, bool print_progress)
 
bool ReadTriangleMeshFromOBJ (const std::string &filename, ccMesh &mesh, const ReadTriangleMeshOptions &)
 
bool WriteTriangleMeshToOBJ (const std::string &filename, const ccMesh &mesh, bool write_ascii, bool compressed, bool write_vertex_normals, bool write_vertex_colors, bool write_triangle_uvs, bool print_progress)
 
bool ReadTriangleMeshFromOFF (const std::string &filename, ccMesh &mesh, const ReadTriangleMeshOptions &params)
 
bool WriteTriangleMeshToOFF (const std::string &filename, const ccMesh &mesh, bool write_ascii, bool compressed, bool write_vertex_normals, bool write_vertex_colors, bool write_triangle_uvs, bool print_progress)
 
bool ReadTriangleMeshFromGLTF (const std::string &filename, ccMesh &mesh, const ReadTriangleMeshOptions &params)
 
bool WriteTriangleMeshToGLTF (const std::string &filename, const ccMesh &mesh, bool write_ascii, bool compressed, bool write_vertex_normals, bool write_vertex_colors, bool write_triangle_uvs, bool print_progress)
 
std::shared_ptr< ccHObjectCreateEntityFromFile (const std::string &filename, const std::string &format="auto", bool print_progress=false)
 
bool ReadEntity (const std::string &filename, ccHObject &obj, const std::string &format="auto", bool print_progress=false)
 
bool WriteEntity (const std::string &filename, const ccHObject &obj, bool write_ascii=false, bool compressed=false, bool print_progress=false)
 
bool AutoReadEntity (const std::string &filename, ccHObject &entity, const ReadPointCloudOption &params)
 
bool AutoWriteEntity (const std::string &filename, const ccHObject &entity, const WritePointCloudOption &params)
 
bool AutoReadMesh (const std::string &filename, ccMesh &mesh, const ReadTriangleMeshOptions &params={})
 
bool AutoWriteMesh (const std::string &filename, const ccMesh &mesh, bool write_ascii=false, bool compressed=false, bool write_vertex_normals=true, bool write_vertex_colors=true, bool write_triangle_uvs=true, bool print_progress=false)
 
bool ReadFeature (const std::string &filename, utility::Feature &feature)
 
bool WriteFeature (const std::string &filename, const utility::Feature &feature)
 
bool ReadFeatureFromBIN (const std::string &filename, utility::Feature &feature)
 
bool WriteFeatureToBIN (const std::string &filename, const utility::Feature &feature)
 
bool ReadIJsonConvertible (const std::string &filename, cloudViewer::utility::IJsonConvertible &object)
 
bool WriteIJsonConvertible (const std::string &filename, const cloudViewer::utility::IJsonConvertible &object)
 
bool ReadIJsonConvertibleFromJSON (const std::string &filename, cloudViewer::utility::IJsonConvertible &object)
 
bool WriteIJsonConvertibleToJSON (const std::string &filename, const cloudViewer::utility::IJsonConvertible &object)
 
bool ReadIJsonConvertibleFromJSONString (const std::string &json_string, cloudViewer::utility::IJsonConvertible &object)
 
bool WriteIJsonConvertibleToJSONString (std::string &json_string, const cloudViewer::utility::IJsonConvertible &object)
 
std::shared_ptr< geometry::ImageCreateImageFromFile (const std::string &filename)
 
std::shared_ptr< geometry::ImageCreateImageFromMemory (const std::string &image_format, const unsigned char *image_data_ptr, size_t image_data_size)
 Factory function to create an image from memory. More...
 
bool ReadImage (const std::string &filename, geometry::Image &image)
 
bool ReadImageFromMemory (const std::string &image_format, const unsigned char *image_data_ptr, size_t image_data_size, geometry::Image &image)
 
bool WriteImage (const std::string &filename, const geometry::Image &image, int quality=kCloudViewerImageIODefaultQuality)
 
bool ReadImageFromPNG (const std::string &filename, geometry::Image &image)
 
bool ReadPNGFromMemory (const unsigned char *image_data_ptr, size_t image_data_size, geometry::Image &image)
 
bool WriteImageToPNG (const std::string &filename, const geometry::Image &image, int quality=kCloudViewerImageIODefaultQuality)
 
bool ReadImageFromJPG (const std::string &filename, geometry::Image &image)
 
bool ReadJPGFromMemory (const unsigned char *image_data_ptr, size_t image_data_size, geometry::Image &image)
 
bool WriteImageToJPG (const std::string &filename, const geometry::Image &image, int quality=kCloudViewerImageIODefaultQuality)
 
std::shared_ptr< geometry::LineSetCreateLineSetFromFile (const std::string &filename, const std::string &format="auto", bool print_progress=false)
 
bool ReadLineSet (const std::string &filename, geometry::LineSet &lineset, const std::string &format="auto", bool print_progress=false)
 
bool WriteLineSet (const std::string &filename, const geometry::LineSet &lineset, bool write_ascii=false, bool compressed=false, bool print_progress=false)
 
bool ReadLineSetFromPLY (const std::string &filename, geometry::LineSet &lineset, bool print_progress=false)
 
bool WriteLineSetToPLY (const std::string &filename, const geometry::LineSet &lineset, bool write_ascii=false, bool compressed=false, bool print_progress=false)
 
std::shared_ptr< geometry::OctreeCreateOctreeFromFile (const std::string &filename, const std::string &format="auto")
 
bool ReadOctree (const std::string &filename, geometry::Octree &octree, const std::string &format="auto")
 
bool WriteOctree (const std::string &filename, const geometry::Octree &octree)
 
bool ReadOctreeFromJson (const std::string &filename, geometry::Octree &octree)
 
bool WriteOctreeToJson (const std::string &filename, const geometry::Octree &octree)
 
std::shared_ptr< camera::PinholeCameraTrajectoryCreatePinholeCameraTrajectoryFromFile (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)
 
bool ReadPinholeCameraTrajectoryFromTUM (const std::string &filename, camera::PinholeCameraTrajectory &trajectory)
 
bool WritePinholeCameraTrajectoryToTUM (const std::string &filename, const camera::PinholeCameraTrajectory &trajectory)
 
std::shared_ptr< geometry::VoxelGridCreateVoxelGridFromFile (const std::string &filename, const std::string &format="auto", bool print_progress=false)
 
bool ReadVoxelGrid (const std::string &filename, geometry::VoxelGrid &voxelgrid, const std::string &format="auto", bool print_progress=false)
 
bool WriteVoxelGrid (const std::string &filename, const geometry::VoxelGrid &voxelgrid, bool write_ascii=false, bool compressed=false, bool print_progress=false)
 
bool ReadVoxelGridFromPLY (const std::string &filename, geometry::VoxelGrid &voxelgrid, bool print_progress=false)
 
bool WriteVoxelGridToPLY (const std::string &filename, const geometry::VoxelGrid &voxelgrid, bool write_ascii=false, bool compressed=false, bool print_progress=false)
 
void pybind_class_io (py::module &m_io)
 
void pybind_io (py::module &m)
 
void pybind_rpc (py::module &m)
 
void pybind_sensor (py::module &m)
 

Variables

const unsigned int kPostProcessFlags_compulsory
 
const unsigned int kPostProcessFlags_fast
 
static std::map< std::string, FileGeometry(*)(const std::string &)> gExt2Func
 
static const std::unordered_map< std::string, std::function< bool(const std::string &, ccPointCloud &, const ReadPointCloudOption &)> > file_extension_to_pointcloud_read_function
 
static const std::unordered_map< std::string, std::function< bool(const unsigned char *, const size_t, ccPointCloud &, const ReadPointCloudOption &)> > in_memory_to_pointcloud_read_function
 
static const std::unordered_map< std::string, std::function< bool(const std::string &, const ccPointCloud &, const WritePointCloudOption &)> > file_extension_to_pointcloud_write_function
 
static const std::unordered_map< std::string, std::function< bool(unsigned char *&, size_t &, const ccPointCloud &, const WritePointCloudOption &)> > in_memory_to_pointcloud_write_function
 
static std::map< k4a_image_format_t, std::string > k4a_image_format_t_to_string
 
static std::map< k4a_color_resolution_t, std::string > k4a_color_resolution_t_to_string
 
static std::map< k4a_depth_mode_t, std::string > k4a_depth_mode_t_to_string
 
static std::map< k4a_fps_t, std::string > k4a_fps_t_to_string
 
static std::map< k4a_wired_sync_mode_t, std::string > k4a_wired_sync_mode_t_to_string
 
static std::map< std::string, k4a_color_resolution_t > string_to_k4a_color_resolution_t
 
static std::map< std::string, k4a_depth_mode_t > string_to_k4a_depth_mode_t
 
static std::map< std::string, k4a_fps_t > string_to_k4a_fps_t
 
static std::map< std::string, k4a_wired_sync_mode_t > string_to_k4a_wired_sync_mode_t
 
static std::unordered_map< std::string, std::string > standard_config
 
constexpr int kCloudViewerImageIODefaultQuality = -1
 
static const std::unordered_map< std::string, std::string > map_shared_argument_docstrings
 

Enumeration Type Documentation

◆ FileGeometry

Enumerator
CONTENTS_UNKNOWN 
CONTAINS_POINTS 
CONTAINS_LINES 
CONTAINS_TRIANGLES 

Definition at line 15 of file FileFormatIO.h.

Function Documentation

◆ AddTrianglesByEarClipping()

bool cloudViewer::io::AddTrianglesByEarClipping ( ccMesh mesh,
std::vector< unsigned int > &  indices 
)

Function to convert a polygon into a collection of triangles whose vertices are only those of the polygon. Assume that the vertices are connected by edges based on their order, and the final vertex connected to the first. The triangles are added to the mesh that is passed as reference. The mesh should contain all vertices prior to calling this function.

Returns
return true if triangulation is successful, false otherwise.

Definition at line 314 of file TriangleMeshIO.cpp.

References ccMesh::addTriangle(), ccMesh::getVertice(), and IsPointInsidePolygon().

◆ AutoReadEntity()

bool cloudViewer::io::AutoReadEntity ( const std::string &  filename,
ccHObject entity,
const ReadPointCloudOption params 
)

◆ AutoReadMesh()

bool cloudViewer::io::AutoReadMesh ( const std::string &  filename,
ccMesh mesh,
const ReadTriangleMeshOptions params = {} 
)

◆ AutoWriteEntity()

bool cloudViewer::io::AutoWriteEntity ( const std::string &  filename,
const ccHObject entity,
const WritePointCloudOption params 
)

◆ AutoWriteMesh()

bool cloudViewer::io::AutoWriteMesh ( const std::string &  filename,
const ccMesh mesh,
bool  write_ascii = false,
bool  compressed = false,
bool  write_vertex_normals = true,
bool  write_vertex_colors = true,
bool  write_triangle_uvs = true,
bool  print_progress = false 
)

◆ ConvertBGRAToRGB()

◆ CreateEntityFromFile()

std::shared_ptr<ccHObject> cloudViewer::io::CreateEntityFromFile ( const std::string &  filename,
const std::string &  format = "auto",
bool  print_progress = false 
)

Factory function to create a ccHObject from a file.

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

◆ CreateImageFromFile()

std::shared_ptr<geometry::Image> cloudViewer::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.

Referenced by cloudViewer::visualization::rendering::FilamentResourceManager::CreateTexture(), LoadTextures(), main(), ReadTriangleMeshFromOBJ(), and cloudViewer::visualization::gui::UIImage::UIImage().

◆ CreateImageFromMemory()

std::shared_ptr<geometry::Image> cloudViewer::io::CreateImageFromMemory ( const std::string &  image_format,
const unsigned char *  image_data_ptr,
size_t  image_data_size 
)

Factory function to create an image from memory.

Referenced by LoadTextures().

◆ CreateImageWarpingFieldFromFile()

std::shared_ptr< pipelines::color_map::ImageWarpingField > cloudViewer::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.

Definition at line 55 of file ImageWarpingFieldIO.cpp.

References filename, and ReadImageWarpingField().

◆ CreateLineSetFromFile()

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

Factory function to create a lineset from a file.

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

Referenced by main().

◆ CreateMeshFromFile()

std::shared_ptr< ccMesh > cloudViewer::io::CreateMeshFromFile ( const std::string &  filename,
bool  print_progress = false 
)

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

Definition at line 192 of file TriangleMeshIO.cpp.

Referenced by main(), and cloudViewer::benchmarks::SamplePointsFixture::SetUp().

◆ CreateOctreeFromFile()

std::shared_ptr<geometry::Octree> cloudViewer::io::CreateOctreeFromFile ( const std::string &  filename,
const std::string &  format = "auto" 
)

Factory function to create a octree from a file.

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

◆ CreatePinholeCameraTrajectoryFromFile()

std::shared_ptr<camera::PinholeCameraTrajectory> cloudViewer::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< ccPointCloud > cloudViewer::io::CreatePointCloudFromFile ( const std::string &  filename,
const std::string &  format = "auto",
bool  print_progress = false 
)

◆ CreatePointCloudFromMemory()

std::shared_ptr< ccPointCloud > cloudViewer::io::CreatePointCloudFromMemory ( const unsigned char *  buffer,
const size_t  length,
const std::string &  format,
bool  print_progress = false 
)

Factory function to create a pointcloud from memory Return an empty pointcloud if fail to read from buffer.

Definition at line 93 of file PointCloudIO.cpp.

◆ CreatePoseGraphFromFile()

std::shared_ptr< pipelines::registration::PoseGraph > cloudViewer::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.

Definition at line 53 of file PoseGraphIO.cpp.

References filename, and ReadPoseGraph().

◆ CreateVoxelGridFromFile()

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

Factory function to create a voxelgrid from a file.

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

Referenced by main().

◆ IsPointInsidePolygon()

bool cloudViewer::io::IsPointInsidePolygon ( const Eigen::MatrixX2d &  polygon,
double  x,
double  y 
)

Definition at line 288 of file TriangleMeshIO.cpp.

References cross().

Referenced by AddTrianglesByEarClipping().

◆ LoadTextures()

◆ pybind_class_io()

void cloudViewer::io::pybind_class_io ( py::module &  m_io)

◆ pybind_io()

void cloudViewer::io::pybind_io ( py::module &  m)

Definition at line 15 of file io.cpp.

References pybind_class_io(), pybind_rpc(), and pybind_sensor().

Referenced by cloudViewer::PYBIND11_MODULE().

◆ pybind_rpc()

◆ pybind_sensor()

◆ ReadEntity()

bool cloudViewer::io::ReadEntity ( const std::string &  filename,
ccHObject obj,
const std::string &  format = "auto",
bool  print_progress = false 
)

The general entrance for reading a ccHObject 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.

◆ ReadFeature()

bool cloudViewer::io::ReadFeature ( const std::string &  filename,
utility::Feature feature 
)

The general entrance for reading a Feature from a file

Returns
If the read function is successful.

◆ ReadFeatureFromBIN()

bool cloudViewer::io::ReadFeatureFromBIN ( const std::string &  filename,
utility::Feature feature 
)

◆ ReadFileGeometryType()

FileGeometry cloudViewer::io::ReadFileGeometryType ( const std::string &  path)

Returns the kind of geometry that the file contains. This is a quick function designed to query the file in order to determine whether to call ReadTriangleMesh(), ReadLineSet(), or ReadPointCloud()

Definition at line 31 of file FileFormatIO.cpp.

References CONTENTS_UNKNOWN, cloudViewer::utility::filesystem::GetFileExtensionInLowerCase(), gExt2Func, and cloudViewer::t::geometry::path.

Referenced by cloudViewer::visualization::GuiVisualizer::LoadGeometry(), and pybind_class_io().

◆ ReadFileGeometryTypeFBX()

FileGeometry cloudViewer::io::ReadFileGeometryTypeFBX ( const std::string &  path)

Definition at line 561 of file TriangleMeshIO.cpp.

References CONTAINS_POINTS, and CONTAINS_TRIANGLES.

◆ ReadFileGeometryTypeGLTF()

FileGeometry cloudViewer::io::ReadFileGeometryTypeGLTF ( const std::string &  path)

Definition at line 1352 of file TriangleMeshIO.cpp.

References CONTAINS_POINTS, and CONTAINS_TRIANGLES.

◆ ReadFileGeometryTypeOBJ()

FileGeometry cloudViewer::io::ReadFileGeometryTypeOBJ ( const std::string &  path)

Definition at line 724 of file TriangleMeshIO.cpp.

References CONTAINS_POINTS, and CONTAINS_TRIANGLES.

◆ ReadFileGeometryTypeOFF()

FileGeometry cloudViewer::io::ReadFileGeometryTypeOFF ( const std::string &  path)

Definition at line 1096 of file TriangleMeshIO.cpp.

References CONTAINS_POINTS, and CONTAINS_TRIANGLES.

◆ ReadFileGeometryTypePCD()

FileGeometry cloudViewer::io::ReadFileGeometryTypePCD ( const std::string &  path)

Definition at line 1037 of file FileIOFactory.cpp.

References CONTAINS_POINTS.

◆ ReadFileGeometryTypePLY()

FileGeometry cloudViewer::io::ReadFileGeometryTypePLY ( const std::string &  path)

◆ ReadFileGeometryTypePTS()

FileGeometry cloudViewer::io::ReadFileGeometryTypePTS ( const std::string &  path)

Definition at line 1599 of file FileIOFactory.cpp.

References CONTAINS_POINTS.

◆ ReadFileGeometryTypeSTL()

FileGeometry cloudViewer::io::ReadFileGeometryTypeSTL ( const std::string &  path)

Definition at line 565 of file TriangleMeshIO.cpp.

References CONTAINS_POINTS, and CONTAINS_TRIANGLES.

◆ ReadFileGeometryTypeXYZ()

FileGeometry cloudViewer::io::ReadFileGeometryTypeXYZ ( const std::string &  path)

Definition at line 1109 of file FileIOFactory.cpp.

References CONTAINS_POINTS.

◆ ReadFileGeometryTypeXYZN()

FileGeometry cloudViewer::io::ReadFileGeometryTypeXYZN ( const std::string &  path)

Definition at line 1249 of file FileIOFactory.cpp.

References CONTAINS_POINTS.

◆ ReadFileGeometryTypeXYZRGB()

FileGeometry cloudViewer::io::ReadFileGeometryTypeXYZRGB ( const std::string &  path)

Definition at line 1333 of file FileIOFactory.cpp.

References CONTAINS_POINTS.

◆ ReadIJsonConvertible()

bool cloudViewer::io::ReadIJsonConvertible ( const std::string &  filename,
cloudViewer::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.

Referenced by cloudViewer::VisualizerForAlignment::KeyPressCallback(), cloudViewer::VisualizerForAlignment::LoadSessionFromFile(), cloudViewer::visualization::ViewControlWithCustomAnimation::LoadTrajectoryFromJsonFile(), main(), cloudViewer::visualization::pybind_renderoption(), and cloudViewer::visualization::pybind_visualization_utility_methods().

◆ ReadIJsonConvertibleFromJSON()

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

◆ ReadIJsonConvertibleFromJSONString()

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

◆ ReadImage()

bool cloudViewer::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 cloudViewer::io::ReadImageFromJPG ( const std::string &  filename,
geometry::Image image 
)

◆ ReadImageFromMemory()

bool cloudViewer::io::ReadImageFromMemory ( const std::string &  image_format,
const unsigned char *  image_data_ptr,
size_t  image_data_size,
geometry::Image image 
)

The general entrance for reading an Image from memory The function calls read functions based on format of image.

Parameters
image_formatthe format of image, "png" or "jpg".
image_data_ptrthe pointer to image data in memory.
image_data_sizethe size of image data in memory.
Returns
return true if the read function is successful, false otherwise.

◆ ReadImageFromPNG()

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

◆ ReadImageWarpingField()

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

The general entrance for reading a ImageWarpingField from a file

Returns
If the read function is successful.

Definition at line 62 of file ImageWarpingFieldIO.cpp.

References filename, cloudViewer::utility::filesystem::GetFileExtensionInLowerCase(), and LogWarning.

Referenced by CreateImageWarpingFieldFromFile().

◆ ReadJPGFromMemory()

bool cloudViewer::io::ReadJPGFromMemory ( const unsigned char *  image_data_ptr,
size_t  image_data_size,
geometry::Image image 
)

Read a JPG image from memory.

Parameters
image_data_ptrthe pointer to image data in memory.
image_data_sizethe size of image data in memory.
Returns
return true if the read function is successful, false otherwise.

◆ ReadLineSet()

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

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 cloudViewer::io::ReadLineSetFromPLY ( const std::string &  filename,
geometry::LineSet lineset,
bool  print_progress = false 
)

◆ ReadModelUsingAssimp()

bool cloudViewer::io::ReadModelUsingAssimp ( const std::string &  filename,
visualization::rendering::TriangleMeshModel model,
const ReadTriangleModelOptions params 
)

Definition at line 312 of file FileASSIMP.cpp.

References ccPointCloud::addEigenColor(), ccPointCloud::addEigenNorm(), cloudViewer::PointCloudTpl< T >::addEigenPoint(), AI_MATKEY_ANISOTROPY, AI_MATKEY_CLEARCOAT_THICKNESS, AI_MATKEY_SHEEN, cloudViewer::io::TextureImages::albedo, cloudViewer::visualization::rendering::MaterialRecord::albedo_img, cloudViewer::io::TextureImages::ao, cloudViewer::visualization::rendering::MaterialRecord::ao_img, cloudViewer::visualization::rendering::MaterialRecord::ao_rough_metal_img, cloudViewer::visualization::rendering::MaterialRecord::base_anisotropy, cloudViewer::visualization::rendering::MaterialRecord::base_clearcoat, cloudViewer::visualization::rendering::MaterialRecord::base_clearcoat_roughness, cloudViewer::visualization::rendering::MaterialRecord::base_color, cloudViewer::visualization::rendering::MaterialRecord::base_metallic, cloudViewer::visualization::rendering::MaterialRecord::base_reflectance, cloudViewer::visualization::rendering::MaterialRecord::base_roughness, color, cloudViewer::visualization::rendering::MaterialRecord::emissive_color, face, filename, cloudViewer::io::TextureImages::gltf_rough_metal, cloudViewer::visualization::rendering::MaterialRecord::has_alpha, kPostProcessFlags_fast, LoadTextures(), LogError, LogInfo, LogWarning, cloudViewer::visualization::rendering::TriangleMeshModel::materials_, max(), cloudViewer::visualization::rendering::TriangleMeshModel::meshes_, cloudViewer::io::TextureImages::metallic, cloudViewer::visualization::rendering::MaterialRecord::metallic_img, cloudViewer::visualization::rendering::MaterialRecord::name, cloudViewer::io::TextureImages::normal, normal, cloudViewer::visualization::rendering::MaterialRecord::normal_img, normals, params, cloudViewer::io::TextureImages::reflectance, cloudViewer::visualization::rendering::MaterialRecord::reflectance_img, ccPointCloud::reserveTheNormsTable(), ccPointCloud::reserveThePointsTable(), ccPointCloud::reserveTheRGBTable(), cloudViewer::io::TextureImages::roughness, cloudViewer::visualization::rendering::MaterialRecord::roughness_img, scaling, ccObject::setEnabled(), ccObject::setLocked(), cloudViewer::utility::CountingProgressReporter::SetTotal(), cloudViewer::visualization::rendering::MaterialRecord::shader, ccPointCloud::shrinkToFit(), and cloudViewer::utility::CountingProgressReporter::Update().

Referenced by ReadTriangleModel().

◆ ReadOctree()

bool cloudViewer::io::ReadOctree ( const std::string &  filename,
geometry::Octree octree,
const std::string &  format = "auto" 
)

The general entrance for reading a Octree 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.

◆ ReadOctreeFromJson()

bool cloudViewer::io::ReadOctreeFromJson ( const std::string &  filename,
geometry::Octree octree 
)

◆ ReadPinholeCameraTrajectory()

bool cloudViewer::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 cloudViewer::io::ReadPinholeCameraTrajectoryFromLOG ( const std::string &  filename,
camera::PinholeCameraTrajectory trajectory 
)

◆ ReadPinholeCameraTrajectoryFromTUM()

bool cloudViewer::io::ReadPinholeCameraTrajectoryFromTUM ( const std::string &  filename,
camera::PinholeCameraTrajectory trajectory 
)

◆ ReadPNGFromMemory()

bool cloudViewer::io::ReadPNGFromMemory ( const unsigned char *  image_data_ptr,
size_t  image_data_size,
geometry::Image image 
)

Read a PNG image from memory.

Parameters
image_data_ptrthe pointer to image data in memory.
image_data_sizethe size of image data in memory.
Returns
return true if the read function is successful, false otherwise.

◆ ReadPointCloud() [1/3]

◆ ReadPointCloud() [2/3]

bool cloudViewer::io::ReadPointCloud ( const std::string &  filename,
ccPointCloud pointcloud,
const std::string &  file_format,
bool  remove_nan_points,
bool  remove_infinite_points,
bool  print_progress 
)

Definition at line 134 of file PointCloudIO.cpp.

◆ ReadPointCloud() [3/3]

bool cloudViewer::io::ReadPointCloud ( const unsigned char *  buffer,
const size_t  length,
ccPointCloud pointcloud,
const ReadPointCloudOption params = {} 
)

The general entrance for reading a PointCloud from memory The function calls read functions based on the format. See ReadPointCloudOption for additional options you can pass.

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

Definition at line 158 of file PointCloudIO.cpp.

References format, in_memory_to_pointcloud_read_function, length(), LogDebug, LogWarning, params, ccPointCloud::RemoveNonFinitePoints(), and cloudViewer::PointCloudTpl< T >::size().

◆ ReadPointCloudFromPCD()

bool cloudViewer::io::ReadPointCloudFromPCD ( const std::string &  filename,
ccPointCloud pointcloud,
const ReadPointCloudOption params 
)

◆ ReadPointCloudFromPLY()

◆ ReadPointCloudFromPTS()

◆ ReadPointCloudFromXYZ()

◆ ReadPointCloudFromXYZN()

◆ ReadPointCloudFromXYZRGB()

◆ ReadPointCloudInMemoryFromXYZ()

◆ ReadPoseGraph()

bool cloudViewer::io::ReadPoseGraph ( const std::string &  filename,
pipelines::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.

Definition at line 60 of file PoseGraphIO.cpp.

References filename, cloudViewer::utility::filesystem::GetFileExtensionInLowerCase(), and LogWarning.

Referenced by CreatePoseGraphFromFile().

◆ ReadTriangleMesh()

bool cloudViewer::io::ReadTriangleMesh ( const std::string &  filename,
ccMesh mesh,
ReadTriangleMeshOptions  params = {} 
)

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.

Definition at line 206 of file TriangleMeshIO.cpp.

References cloudViewer::t::io::file_extension_to_trianglemesh_read_function, filename, ccMesh::getAssociatedCloud(), cloudViewer::utility::filesystem::GetFileExtensionInLowerCase(), ccMesh::getVerticeSize(), cloudViewer::GenericMesh::hasTriangles(), ccMesh::HasVertices(), LogDebug, LogError, LogWarning, params, ccMesh::size(), and cloudViewer::utility::ToUpper().

Referenced by cloudViewer::t::geometry::IOReadLegacyTriangleMesh(), main(), and cloudViewer::t::io::ReadTriangleMesh().

◆ ReadTriangleMeshFromGLTF()

◆ ReadTriangleMeshFromOBJ()

◆ ReadTriangleMeshFromOFF()

bool cloudViewer::io::ReadTriangleMeshFromOFF ( const std::string &  filename,
ccMesh mesh,
const ReadTriangleMeshOptions params 
)

Definition at line 1100 of file TriangleMeshIO.cpp.

References filename.

◆ ReadTriangleMeshFromPLY()

◆ ReadTriangleMeshFromSTL()

bool cloudViewer::io::ReadTriangleMeshFromSTL ( const std::string &  filename,
ccMesh mesh,
bool  print_progress 
)

Definition at line 569 of file TriangleMeshIO.cpp.

◆ ReadTriangleMeshUsingASSIMP()

◆ ReadTriangleModel()

bool cloudViewer::io::ReadTriangleModel ( const std::string &  filename,
visualization::rendering::TriangleMeshModel model,
ReadTriangleModelOptions  params 
)

◆ ReadVoxelGrid()

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

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 cloudViewer::io::ReadVoxelGridFromPLY ( const std::string &  filename,
geometry::VoxelGrid voxelgrid,
bool  print_progress = false 
)

◆ string_to_k4a_image_format_t()

static std::map<std::string, k4a_image_format_t> cloudViewer::io::string_to_k4a_image_format_t ( { {"K4A_IMAGE_FORMAT_COLOR_MJPG", K4A_IMAGE_FORMAT_COLOR_MJPG}, {"K4A_IMAGE_FORMAT_COLOR_NV12", K4A_IMAGE_FORMAT_COLOR_NV12}, {"K4A_IMAGE_FORMAT_COLOR_YUY2", K4A_IMAGE_FORMAT_COLOR_YUY2}, {"K4A_IMAGE_FORMAT_COLOR_BGRA32", K4A_IMAGE_FORMAT_COLOR_BGRA32}, {"K4A_IMAGE_FORMAT_DEPTH16", K4A_IMAGE_FORMAT_DEPTH16}, {"K4A_IMAGE_FORMAT_IR16", K4A_IMAGE_FORMAT_IR16}, {"K4A_IMAGE_FORMAT_CUSTOM", K4A_IMAGE_FORMAT_CUSTOM}, }  )
static

◆ WriteEntity()

bool cloudViewer::io::WriteEntity ( const std::string &  filename,
const ccHObject obj,
bool  write_ascii = false,
bool  compressed = false,
bool  print_progress = false 
)

The general entrance for writing a ccHObject 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.

◆ WriteFeature()

bool cloudViewer::io::WriteFeature ( const std::string &  filename,
const utility::Feature feature 
)

The general entrance for writing a Feature to a file

Returns
If the write function is successful.

◆ WriteFeatureToBIN()

bool cloudViewer::io::WriteFeatureToBIN ( const std::string &  filename,
const utility::Feature feature 
)

◆ WriteIJsonConvertible()

◆ WriteIJsonConvertibleToJSON()

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

◆ WriteIJsonConvertibleToJSONString()

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

◆ WriteImage()

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

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.

Parameters
qualityPNG: [0-9] <=2 fast write for storing intermediate data >=3 (default) normal write for balanced speed and file size JPEG: [0-100] Typically in [70,95]. 90 is default (good quality).
Returns
return true if the write function is successful, false otherwise.

Referenced by cloudViewer::visualization::Visualizer::CaptureDepthImage(), cloudViewer::visualization::Visualizer::CaptureScreenImage(), cloudViewer::visualization::GuiVisualizer::ExportCurrentImage(), cloudViewer::visualization::visualizer::O3DVisualizer::Impl::ExportCurrentImage(), cloudViewer::pipelines::color_map::RunNonRigidOptimizer(), and cloudViewer::pipelines::color_map::RunRigidOptimizer().

◆ WriteImageToJPG()

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

◆ WriteImageToPNG()

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

◆ WriteImageWarpingField()

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

The general entrance for writing a ImageWarpingField to a file

Returns
If the write function is successful.

Definition at line 86 of file ImageWarpingFieldIO.cpp.

References filename, cloudViewer::utility::filesystem::GetFileExtensionInLowerCase(), and LogWarning.

Referenced by cloudViewer::pipelines::color_map::RunNonRigidOptimizer().

◆ WriteLineSet()

bool cloudViewer::io::WriteLineSet ( const std::string &  filename,
const geometry::LineSet lineset,
bool  write_ascii = false,
bool  compressed = false,
bool  print_progress = 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 cloudViewer::io::WriteLineSetToPLY ( const std::string &  filename,
const geometry::LineSet lineset,
bool  write_ascii = false,
bool  compressed = false,
bool  print_progress = false 
)

◆ WriteOctree()

bool cloudViewer::io::WriteOctree ( const std::string &  filename,
const geometry::Octree octree 
)

The general entrance for writing a Octree 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.

◆ WriteOctreeToJson()

bool cloudViewer::io::WriteOctreeToJson ( const std::string &  filename,
const geometry::Octree octree 
)

◆ WritePinholeCameraTrajectory()

bool cloudViewer::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.

Referenced by cloudViewer::pipelines::color_map::RunNonRigidOptimizer(), and cloudViewer::pipelines::color_map::RunRigidOptimizer().

◆ WritePinholeCameraTrajectoryToLOG()

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

◆ WritePinholeCameraTrajectoryToTUM()

bool cloudViewer::io::WritePinholeCameraTrajectoryToTUM ( const std::string &  filename,
const camera::PinholeCameraTrajectory trajectory 
)

◆ WritePointCloud() [1/3]

bool cloudViewer::io::WritePointCloud ( const std::string &  filename,
const ccPointCloud pointcloud,
const std::string &  file_format,
bool  write_ascii,
bool  compressed,
bool  print_progress 
)

Definition at line 212 of file PointCloudIO.cpp.

◆ WritePointCloud() [2/3]

bool cloudViewer::io::WritePointCloud ( const std::string &  filename,
const ccPointCloud pointcloud,
const WritePointCloudOption params = {} 
)

◆ WritePointCloud() [3/3]

bool cloudViewer::io::WritePointCloud ( unsigned char *&  buffer,
size_t &  length,
const ccPointCloud pointcloud,
const WritePointCloudOption params = {} 
)

The general entrance for writing a PointCloud to memory The function calls write functions based on the format. WARNING: buffer gets initialized by WritePointCloud, you need to delete it when finished when ret is true See WritePointCloudOption for additional options you can pass.

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

Definition at line 234 of file PointCloudIO.cpp.

References format, in_memory_to_pointcloud_write_function, length(), LogDebug, LogWarning, params, and cloudViewer::PointCloudTpl< T >::size().

◆ WritePointCloudInMemoryToXYZ()

◆ WritePointCloudToPCD()

bool cloudViewer::io::WritePointCloudToPCD ( const std::string &  filename,
const ccPointCloud pointcloud,
const WritePointCloudOption params 
)

◆ WritePointCloudToPLY()

◆ WritePointCloudToPTS()

◆ WritePointCloudToXYZ()

◆ WritePointCloudToXYZN()

◆ WritePointCloudToXYZRGB()

◆ WritePoseGraph()

bool cloudViewer::io::WritePoseGraph ( const std::string &  filename,
const pipelines::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.

Definition at line 81 of file PoseGraphIO.cpp.

References filename, cloudViewer::utility::filesystem::GetFileExtensionInLowerCase(), and LogWarning.

◆ WriteTriangleMesh()

bool cloudViewer::io::WriteTriangleMesh ( const std::string &  filename,
const ccMesh mesh,
bool  write_ascii = false,
bool  compressed = false,
bool  write_vertex_normals = true,
bool  write_vertex_colors = true,
bool  write_triangle_uvs = true,
bool  print_progress = 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. At current only .obj format supports uv coordinates (triangle_uvs) and textures.

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

Definition at line 255 of file TriangleMeshIO.cpp.

Referenced by main(), cloudViewer::pipelines::color_map::RunNonRigidOptimizer(), cloudViewer::pipelines::color_map::RunRigidOptimizer(), and cloudViewer::visualization::VisualizerWithEditing::SaveCroppingResult().

◆ WriteTriangleMeshToGLTF()

bool cloudViewer::io::WriteTriangleMeshToGLTF ( const std::string &  filename,
const ccMesh mesh,
bool  write_ascii,
bool  compressed,
bool  write_vertex_normals,
bool  write_vertex_colors,
bool  write_triangle_uvs,
bool  print_progress 
)

Definition at line 1670 of file TriangleMeshIO.cpp.

◆ WriteTriangleMeshToOBJ()

bool cloudViewer::io::WriteTriangleMeshToOBJ ( const std::string &  filename,
const ccMesh mesh,
bool  write_ascii,
bool  compressed,
bool  write_vertex_normals,
bool  write_vertex_colors,
bool  write_triangle_uvs,
bool  print_progress 
)

Definition at line 923 of file TriangleMeshIO.cpp.

◆ WriteTriangleMeshToOFF()

bool cloudViewer::io::WriteTriangleMeshToOFF ( const std::string &  filename,
const ccMesh mesh,
bool  write_ascii,
bool  compressed,
bool  write_vertex_normals,
bool  write_vertex_colors,
bool  write_triangle_uvs,
bool  print_progress 
)

Definition at line 1229 of file TriangleMeshIO.cpp.

◆ WriteTriangleMeshToPLY()

bool cloudViewer::io::WriteTriangleMeshToPLY ( const std::string &  filename,
const ccMesh mesh,
bool  write_ascii,
bool  compressed,
bool  write_vertex_normals,
bool  write_vertex_colors,
bool  write_triangle_uvs,
bool  print_progress 
)

Definition at line 461 of file TriangleMeshIO.cpp.

◆ WriteTriangleMeshToSTL()

bool cloudViewer::io::WriteTriangleMeshToSTL ( const std::string &  filename,
const ccMesh mesh,
bool  write_ascii,
bool  compressed,
bool  write_vertex_normals,
bool  write_vertex_colors,
bool  write_triangle_uvs,
bool  print_progress 
)

Definition at line 662 of file TriangleMeshIO.cpp.

◆ WriteVoxelGrid()

bool cloudViewer::io::WriteVoxelGrid ( const std::string &  filename,
const geometry::VoxelGrid voxelgrid,
bool  write_ascii = false,
bool  compressed = false,
bool  print_progress = 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 cloudViewer::io::WriteVoxelGridToPLY ( const std::string &  filename,
const geometry::VoxelGrid voxelgrid,
bool  write_ascii = false,
bool  compressed = false,
bool  print_progress = false 
)

Variable Documentation

◆ file_extension_to_pointcloud_read_function

const std::unordered_map< std::string, std::function<bool(const std::string &, ccPointCloud &, const ReadPointCloudOption &)> > cloudViewer::io::file_extension_to_pointcloud_read_function
static
Initial value:
{
{"ptx", AutoReadEntity},
{"vtk", AutoReadEntity},
{"bin", AutoReadEntity},
}
bool ReadPointCloudFromPLY(const std::string &filename, ccPointCloud &pointcloud, const ReadPointCloudOption &params)
bool ReadPointCloudFromXYZN(const std::string &filename, ccPointCloud &pointcloud, const ReadPointCloudOption &params)
bool AutoReadEntity(const std::string &filename, ccHObject &entity, const ReadPointCloudOption &params)
bool ReadPointCloudFromPCD(const std::string &filename, ccPointCloud &pointcloud, const ReadPointCloudOption &params)
bool ReadPointCloudFromXYZ(const std::string &filename, ccPointCloud &pointcloud, const ReadPointCloudOption &params)
bool ReadPointCloudFromXYZRGB(const std::string &filename, ccPointCloud &pointcloud, const ReadPointCloudOption &params)
bool ReadPointCloudFromPTS(const std::string &filename, ccPointCloud &pointcloud, const ReadPointCloudOption &params)

Definition at line 33 of file PointCloudIO.cpp.

Referenced by ReadPointCloud().

◆ file_extension_to_pointcloud_write_function

const std::unordered_map< std::string, std::function<bool(const std::string &, const ccPointCloud &, const WritePointCloudOption &)> > cloudViewer::io::file_extension_to_pointcloud_write_function
static
Initial value:
{
{"ptx", AutoWriteEntity},
{"vtk", AutoWriteEntity},
{"bin", AutoWriteEntity},
}
bool WritePointCloudToPCD(const std::string &filename, const ccPointCloud &pointcloud, const WritePointCloudOption &params)
bool WritePointCloudToPTS(const std::string &filename, const ccPointCloud &pointcloud, const WritePointCloudOption &params)
bool AutoWriteEntity(const std::string &filename, const ccHObject &entity, const WritePointCloudOption &params)
bool WritePointCloudToXYZ(const std::string &filename, const ccPointCloud &pointcloud, const WritePointCloudOption &params)
bool WritePointCloudToPLY(const std::string &filename, const ccPointCloud &pointcloud, const WritePointCloudOption &params)
bool WritePointCloudToXYZN(const std::string &filename, const ccPointCloud &pointcloud, const WritePointCloudOption &params)
bool WritePointCloudToXYZRGB(const std::string &filename, const ccPointCloud &pointcloud, const WritePointCloudOption &params)

Definition at line 61 of file PointCloudIO.cpp.

Referenced by WritePointCloud().

◆ gExt2Func

std::map<std::string, FileGeometry (*)(const std::string&)> cloudViewer::io::gExt2Func
static
Initial value:
= {
}
FileGeometry ReadFileGeometryTypePCD(const std::string &path)
FileGeometry ReadFileGeometryTypePTS(const std::string &path)
FileGeometry ReadFileGeometryTypeOFF(const std::string &path)
FileGeometry ReadFileGeometryTypeXYZ(const std::string &path)
FileGeometry ReadFileGeometryTypeOBJ(const std::string &path)
FileGeometry ReadFileGeometryTypeGLTF(const std::string &path)
FileGeometry ReadFileGeometryTypeXYZN(const std::string &path)
FileGeometry ReadFileGeometryTypePLY(const std::string &path)
FileGeometry ReadFileGeometryTypeSTL(const std::string &path)
FileGeometry ReadFileGeometryTypeFBX(const std::string &path)
FileGeometry ReadFileGeometryTypeXYZRGB(const std::string &path)

Definition at line 16 of file FileFormatIO.cpp.

Referenced by ReadFileGeometryType().

◆ in_memory_to_pointcloud_read_function

const std::unordered_map< std::string, std::function<bool(const unsigned char *, const size_t, ccPointCloud &, const ReadPointCloudOption &)> > cloudViewer::io::in_memory_to_pointcloud_read_function
static
Initial value:
{
}
bool ReadPointCloudInMemoryFromXYZ(const unsigned char *buffer, const size_t length, ccPointCloud &pointcloud, const ReadPointCloudOption &params)

Definition at line 52 of file PointCloudIO.cpp.

Referenced by ReadPointCloud().

◆ in_memory_to_pointcloud_write_function

const std::unordered_map< std::string, std::function<bool(unsigned char *&, size_t &, const ccPointCloud &, const WritePointCloudOption &)> > cloudViewer::io::in_memory_to_pointcloud_write_function
static
Initial value:
{
}
bool WritePointCloudInMemoryToXYZ(unsigned char *&buffer, size_t &length, const ccPointCloud &pointcloud, const WritePointCloudOption &params)

Definition at line 80 of file PointCloudIO.cpp.

Referenced by WritePointCloud().

◆ k4a_color_resolution_t_to_string

std::map<k4a_color_resolution_t, std::string> cloudViewer::io::k4a_color_resolution_t_to_string
static
Initial value:
{
{K4A_COLOR_RESOLUTION_OFF, "K4A_COLOR_RESOLUTION_OFF"},
{K4A_COLOR_RESOLUTION_720P, "K4A_COLOR_RESOLUTION_720P"},
{K4A_COLOR_RESOLUTION_1080P, "K4A_COLOR_RESOLUTION_1080P"},
{K4A_COLOR_RESOLUTION_1440P, "K4A_COLOR_RESOLUTION_1440P"},
{K4A_COLOR_RESOLUTION_1536P, "K4A_COLOR_RESOLUTION_1536P"},
{K4A_COLOR_RESOLUTION_2160P, "K4A_COLOR_RESOLUTION_2160P"},
{K4A_COLOR_RESOLUTION_3072P, "K4A_COLOR_RESOLUTION_3072P"},
}

Definition at line 35 of file AzureKinectSensorConfig.cpp.

Referenced by cloudViewer::io::AzureKinectSensorConfig::ConvertFromNativeConfig().

◆ k4a_depth_mode_t_to_string

std::map<k4a_depth_mode_t, std::string> cloudViewer::io::k4a_depth_mode_t_to_string
static
Initial value:
{
{K4A_DEPTH_MODE_OFF, "K4A_DEPTH_MODE_OFF"},
{K4A_DEPTH_MODE_NFOV_2X2BINNED, "K4A_DEPTH_MODE_NFOV_2X2BINNED"},
{K4A_DEPTH_MODE_NFOV_UNBINNED, "K4A_DEPTH_MODE_NFOV_UNBINNED"},
{K4A_DEPTH_MODE_WFOV_2X2BINNED, "K4A_DEPTH_MODE_WFOV_2X2BINNED"},
{K4A_DEPTH_MODE_WFOV_UNBINNED, "K4A_DEPTH_MODE_WFOV_UNBINNED"},
{K4A_DEPTH_MODE_PASSIVE_IR, "K4A_DEPTH_MODE_PASSIVE_IR"},
}

Definition at line 45 of file AzureKinectSensorConfig.cpp.

Referenced by cloudViewer::io::AzureKinectSensorConfig::ConvertFromNativeConfig().

◆ k4a_fps_t_to_string

std::map<k4a_fps_t, std::string> cloudViewer::io::k4a_fps_t_to_string
static
Initial value:
{
{K4A_FRAMES_PER_SECOND_5, "K4A_FRAMES_PER_SECOND_5"},
{K4A_FRAMES_PER_SECOND_15, "K4A_FRAMES_PER_SECOND_15"},
{K4A_FRAMES_PER_SECOND_30, "K4A_FRAMES_PER_SECOND_30"},
}

Definition at line 54 of file AzureKinectSensorConfig.cpp.

Referenced by cloudViewer::io::AzureKinectSensorConfig::ConvertFromNativeConfig().

◆ k4a_image_format_t_to_string

std::map<k4a_image_format_t, std::string> cloudViewer::io::k4a_image_format_t_to_string
static
Initial value:
{
{K4A_IMAGE_FORMAT_COLOR_MJPG, "K4A_IMAGE_FORMAT_COLOR_MJPG"},
{K4A_IMAGE_FORMAT_COLOR_NV12, "K4A_IMAGE_FORMAT_COLOR_NV12"},
{K4A_IMAGE_FORMAT_COLOR_YUY2, "K4A_IMAGE_FORMAT_COLOR_YUY2"},
{K4A_IMAGE_FORMAT_COLOR_BGRA32, "K4A_IMAGE_FORMAT_COLOR_BGRA32"},
{K4A_IMAGE_FORMAT_DEPTH16, "K4A_IMAGE_FORMAT_DEPTH16"},
{K4A_IMAGE_FORMAT_IR16, "K4A_IMAGE_FORMAT_IR16"},
{K4A_IMAGE_FORMAT_CUSTOM, "K4A_IMAGE_FORMAT_CUSTOM"},
}

Definition at line 24 of file AzureKinectSensorConfig.cpp.

Referenced by cloudViewer::io::AzureKinectSensorConfig::ConvertFromNativeConfig().

◆ k4a_wired_sync_mode_t_to_string

std::map<k4a_wired_sync_mode_t, std::string> cloudViewer::io::k4a_wired_sync_mode_t_to_string
static
Initial value:
{
{K4A_WIRED_SYNC_MODE_STANDALONE,
"K4A_WIRED_SYNC_MODE_STANDALONE"},
{K4A_WIRED_SYNC_MODE_MASTER, "K4A_WIRED_SYNC_MODE_MASTER"},
{K4A_WIRED_SYNC_MODE_SUBORDINATE,
"K4A_WIRED_SYNC_MODE_SUBORDINATE"},
}

Definition at line 61 of file AzureKinectSensorConfig.cpp.

Referenced by cloudViewer::io::AzureKinectSensorConfig::ConvertFromNativeConfig().

◆ kCloudViewerImageIODefaultQuality

constexpr int cloudViewer::io::kCloudViewerImageIODefaultQuality = -1
constexpr

Definition at line 47 of file ImageIO.h.

◆ kPostProcessFlags_compulsory

const unsigned int cloudViewer::io::kPostProcessFlags_compulsory
Initial value:
=
aiProcess_JoinIdenticalVertices | aiProcess_SortByPType |
aiProcess_PreTransformVertices

Definition at line 39 of file FileASSIMP.cpp.

Referenced by ReadTriangleMeshUsingASSIMP().

◆ kPostProcessFlags_fast

const unsigned int cloudViewer::io::kPostProcessFlags_fast
Initial value:
=
kPostProcessFlags_compulsory | aiProcess_GenNormals |
aiProcess_Triangulate | aiProcess_GenUVCoords |
aiProcess_RemoveRedundantMaterials | aiProcess_OptimizeMeshes
const unsigned int kPostProcessFlags_compulsory
Definition: FileASSIMP.cpp:37

Definition at line 43 of file FileASSIMP.cpp.

Referenced by ReadModelUsingAssimp(), and ReadTriangleMeshUsingASSIMP().

◆ map_shared_argument_docstrings

const std::unordered_map<std::string, std::string> cloudViewer::io::map_shared_argument_docstrings
static

Definition at line 41 of file class_io.cpp.

Referenced by pybind_sensor().

◆ standard_config

std::unordered_map<std::string, std::string> cloudViewer::io::standard_config
static
Initial value:
{
{"color_format", "K4A_IMAGE_FORMAT_COLOR_MJPG"},
{"color_resolution", "K4A_COLOR_RESOLUTION_720P"},
{"depth_mode", "K4A_DEPTH_MODE_WFOV_2X2BINNED"},
{"camera_fps", "K4A_FRAMES_PER_SECOND_30"},
{"synchronized_images_only", "false"},
{"depth_delay_off_color_usec", "0"},
{"wired_sync_mode", "K4A_WIRED_SYNC_MODE_STANDALONE"},
{"subordinate_delay_off_master_usec", "0"},
{"disable_streaming_indicator", "false"},
}

Definition at line 114 of file AzureKinectSensorConfig.cpp.

Referenced by cloudViewer::io::AzureKinectSensorConfig::AzureKinectSensorConfig(), and cloudViewer::io::AzureKinectSensorConfig::IsValidConfig().

◆ string_to_k4a_color_resolution_t

std::map<std::string, k4a_color_resolution_t> cloudViewer::io::string_to_k4a_color_resolution_t
static
Initial value:
{
{"K4A_COLOR_RESOLUTION_OFF", K4A_COLOR_RESOLUTION_OFF},
{"K4A_COLOR_RESOLUTION_720P", K4A_COLOR_RESOLUTION_720P},
{"K4A_COLOR_RESOLUTION_1080P", K4A_COLOR_RESOLUTION_1080P},
{"K4A_COLOR_RESOLUTION_1440P", K4A_COLOR_RESOLUTION_1440P},
{"K4A_COLOR_RESOLUTION_1536P", K4A_COLOR_RESOLUTION_1536P},
{"K4A_COLOR_RESOLUTION_2160P", K4A_COLOR_RESOLUTION_2160P},
{"K4A_COLOR_RESOLUTION_3072P", K4A_COLOR_RESOLUTION_3072P},
}

Definition at line 80 of file AzureKinectSensorConfig.cpp.

Referenced by cloudViewer::io::AzureKinectSensorConfig::ConvertToNativeConfig(), and cloudViewer::io::AzureKinectSensorConfig::IsValidConfig().

◆ string_to_k4a_depth_mode_t

std::map<std::string, k4a_depth_mode_t> cloudViewer::io::string_to_k4a_depth_mode_t
static
Initial value:
{
{"K4A_DEPTH_MODE_OFF", K4A_DEPTH_MODE_OFF},
{"K4A_DEPTH_MODE_NFOV_2X2BINNED", K4A_DEPTH_MODE_NFOV_2X2BINNED},
{"K4A_DEPTH_MODE_NFOV_UNBINNED", K4A_DEPTH_MODE_NFOV_UNBINNED},
{"K4A_DEPTH_MODE_WFOV_2X2BINNED", K4A_DEPTH_MODE_WFOV_2X2BINNED},
{"K4A_DEPTH_MODE_WFOV_UNBINNED", K4A_DEPTH_MODE_WFOV_UNBINNED},
{"K4A_DEPTH_MODE_PASSIVE_IR", K4A_DEPTH_MODE_PASSIVE_IR},
}

Definition at line 90 of file AzureKinectSensorConfig.cpp.

Referenced by cloudViewer::io::AzureKinectSensorConfig::ConvertToNativeConfig(), and cloudViewer::io::AzureKinectSensorConfig::IsValidConfig().

◆ string_to_k4a_fps_t

std::map<std::string, k4a_fps_t> cloudViewer::io::string_to_k4a_fps_t
static
Initial value:
{
{"K4A_FRAMES_PER_SECOND_5", K4A_FRAMES_PER_SECOND_5},
{"K4A_FRAMES_PER_SECOND_15", K4A_FRAMES_PER_SECOND_15},
{"K4A_FRAMES_PER_SECOND_30", K4A_FRAMES_PER_SECOND_30},
}

Definition at line 99 of file AzureKinectSensorConfig.cpp.

Referenced by cloudViewer::io::AzureKinectSensorConfig::ConvertToNativeConfig(), and cloudViewer::io::AzureKinectSensorConfig::IsValidConfig().

◆ string_to_k4a_wired_sync_mode_t

std::map<std::string, k4a_wired_sync_mode_t> cloudViewer::io::string_to_k4a_wired_sync_mode_t
static
Initial value:
{
{"K4A_WIRED_SYNC_MODE_STANDALONE",
K4A_WIRED_SYNC_MODE_STANDALONE},
{"K4A_WIRED_SYNC_MODE_MASTER", K4A_WIRED_SYNC_MODE_MASTER},
{"K4A_WIRED_SYNC_MODE_SUBORDINATE",
K4A_WIRED_SYNC_MODE_SUBORDINATE},
}

Definition at line 106 of file AzureKinectSensorConfig.cpp.

Referenced by cloudViewer::io::AzureKinectSensorConfig::ConvertToNativeConfig(), and cloudViewer::io::AzureKinectSensorConfig::IsValidConfig().