1.7. I/O

1.7.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

1.7.2. Export

Point clouds can be exported separately from the scene using GUI commands in 3d view > View > Export … > Point clouds > . There are three possible export commands:

  • Export all in one: All the point clouds in the scene are exported into one file. The user needs to select one file in the GUI prompt. This method export the Global coordinates of the Points.

  • One per file: Each point cloud is exported to a separate file. For each point cloud a new prompt from the GUI will is required. This method export the Local coordinates of the Points.

  • Selected: Export the selected point clouds (can be several). Each point cloud prompt a GUI file selection. This method export the Local coordinates of the Points.