tutorials:pointcloud-io
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
tutorials:pointcloud-io [2024/11/05 11:45] – [Point Cloud] gaetan | tutorials:pointcloud-io [2024/12/06 12:09] (current) – [As array] gaetan | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Point Cloud ====== | + | ====== |
- | The objects | + | The import formats both for files and object representation in GroIMP |
GroIMP support two ways of defining a point cloud object: | GroIMP support two ways of defining a point cloud object: | ||
Line 22: | Line 22: | ||
<code java> | <code java> | ||
importNodeFromFile( "/ | importNodeFromFile( "/ | ||
+ | |||
</ | </ | ||
The file at the given path will be loaded with the filter associated with the given mimetype from GroIMP. The node created is automatically added to the scene under the root node of the project graph. | The file at the given path will be loaded with the filter associated with the given mimetype from GroIMP. The node created is automatically added to the scene under the root node of the project graph. | ||
+ | Additionally the node can only be loaded, meaning it is not added to the graph but provided as a variable. | ||
+ | <code java> | ||
+ | Node x = loadNodeFromFile( "/ | ||
+ | </ | ||
+ | |||
+ | Both ways loading and importing can also work with input streams instead of file paths. | ||
The MimeTypes used for Point cloud import in GroIMP are : | The MimeTypes used for Point cloud import in GroIMP are : | ||
Line 40: | Line 47: | ||
{{: | {{: | ||
- | The two current available format are xyz and ply. Even if PLY enables to include " | + | The two current available format are xyz and ply. Even if PLY enables to include " |
The file could also have been imported with the RGG method (using a mimetype that contains //array//): | The file could also have been imported with the RGG method (using a mimetype that contains //array//): | ||
Line 52: | Line 59: | ||
<code java> | <code java> | ||
- | import de.grogra.pointcloud.groimp.PointCloud; | ||
[pc: | [pc: | ||
[pc: | [pc: | ||
Line 78: | Line 84: | ||
The given example import a XYZ file, which only contains Points. So the graph created is of the structure: | The given example import a XYZ file, which only contains Points. So the graph created is of the structure: | ||
- | {{:groimp-platform: | + | {{:tutorials: |
- | If you import a PLY file that include both Vertexes | + | If you import a PLY file that include both vertices |
Each of these point cloud nodes are added under a // | Each of these point cloud nodes are added under a // | ||
- | {{:groimp-platform: | + | {{:tutorials: |
- | This very simple example of a PLY file with 3 vertexes | + | This very simple example of a PLY file with 3 vertices |
Similarly to the point cloud as array, the cloud nodes can be accessed with RGG commands: | Similarly to the point cloud as array, the cloud nodes can be accessed with RGG commands: | ||
<code java> | <code java> | ||
- | import de.grogra.pointcloud.groimp.PointCloud; | ||
[pc: | [pc: | ||
[pc: | [pc: | ||
Line 121: | Line 126: | ||
There are three possible export commands: | 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. | + | * 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. | + | * 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. | + | * 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**. |
tutorials/pointcloud-io.1730803506.txt.gz · Last modified: 2024/11/05 11:45 by gaetan