Chapter 6. I/O

Table of Contents

6.1. Import
6.2. Export

6.1. Import

Point clouds can be added to the project graph from GUI import as either: CloudList or CloudGraph. The supported file formats are:

  • PLY: with vertices, and possibly edges, and faces. If imported as CloudGraph, the edges and faces will be linked to the vertices Points with refinement edges.

  • XYZ: simple x, y, z format. Each line starts with three values x y and z, separated by spaces, coma, or semi column. All additional values in the row will not be considered.

Point clouds can be loaded from RGG code with:

// This do the same as the GUI menu>import from file
importNodeFromFile( "/path/to/file/leaf1.xyz", "mimeType/astext");
// This load the Node into a variable but do not adds it to the graph
 Node x = loadNodeFromFile( "/path/to/file/leaf1.xyz", "mimeType/astext");

The possible mimetype to use are (replace the mimeType/astext by):

  • model/x-grogra-pointcloud-graph+ply : for PLY file and CloudGraph

  • model/x-grogra-pointcloud-graph+xyz : for XYZ file and CloudGraph

  • model/x-grogra-pointcloud-array+ply : for PLY file and CloudList

  • model/x-grogra-pointcloud-array+xyz : for XYZ file and CloudList