User Tools

Site Tools


groimp-platform:pointcloud

This is an old revision of the document!


Point Cloud

The objects and tools presented in this wiki mostly comes from the plugin Pointcloud. See here to see how install plugins in GroIMP. The wiki is up to date with the version 1.7 of the plugin.

Tools:

Tutorials:

Object design

In GroIMP point cloud are implemented following the design:

The main Objects are:

  • PointCloud : A Node, i.e. an object that can be inserted in a GroIMP graph. The PointCloud is responsible for the display of the points by implementing CollectionDisplayable.
  • Cloud : The representation of the data structure through which the point cloud data is accessed.
  • Point : The base interface that an object must implements to be part of a Cloud. In GroIMP, points are not limited to 3 dimensions.

These three Objects implements CloudContext, meaning when any of the three is selected, you can access the Cloud structure handled. Most of the tools from the package de.grogra.pointcloud.tools are applied on Cloud, and produce Cloud objects. The GUI commands however can works with any CloudContext object.

GUI Visualization & Interactions

The PointCloud visualization in the 3d scene of GroIMP follows the classic GroIMP display scene creation (see here for more detail on how GroIMP build the 3d scene).

As part of the GroIMP graph, the PointCloud display follow the local transformations idea. It is displayed after the transformation of each of his potential ancestor in the graph, including his own transformation. The coordinates of the Points are local as well in regards to the PointCloud node. Nodes imported from the GUI menu are added at the root of the graph, thus, PointCloud are by default not having ancestor's transformations to resolve.

Because the representation of PointCloud as graph can lead to huge amount of nodes (each Point being a node), the visitation of the graph for every 3d update can be very time consuming. Thus, PointCloud display are using the graph resolution display tool, which can keep the display in memory and block visitation of the graph. PointCloud are created with a default resolution index of 3, which can be changed in the attribute editor.

The management of the display is push to a CollectionDisplayHandler. There are currently three implementations of the interface:

  • FloatArrayHandler : Simply handle float arrays which is the data representation of CloudArray and CloudList. It can however be used on any type of Cloud as they implements pointsToFloat(). This DisplayHandler takes a float array of length divisible by three, each point coordinates are in the array stored as: [x0, y0, z0, x1, y1, z1, …].
  • CollectionPointHandler : Takes a collection of Points as input (either a List or a graph). The collection is visited and each Point display data is stored in the CollectionDisplayHandler. It requires that Points have at least three dimensions and will only includes the three first dimensions to the display.
  • CollectionMeshHandler : Similarly to the CollectionPointHandler, it visits the given collection, but it require each points to have at least nine dimensions (a.k.a. to represent at least three 3d points). The set of coordinates of each Point is turned into a Mesh surface. All the Meshes are aggregated into the CollectionMeshHandler.

DisplayHandler require to be pinged to update their data. This can be done manually through the PointCloud using the attribute editor, or automatically when some tools are applied on the PointCloud.

The picking is also managed by the PointCloud through the DisplayHandler. By default, the Points are picked on the 3d scene, but a navigation mode enables to pick the DisplayHandler.

Point Cloud as a graph

Cloud object can be represented as graph in GroIMP, where both the PointCloud and each Point objects are GroIMP Nodes. This structure enables to leverage the power of XL queries onto the point cloud data both for querying and rewriting.

The main objects of a PointCloud as graph are:

  • CloudGraph : the object that extends PointCloud. This is the entry point of the PointCloud.
  • IntermediateCloudNode : intermediate nodes used to balance the load of the graph.
  • PointCloudLeaf ; the implementation of Point of the Cloud. PointCloudLeaf extends Node (or subclasses of Node), thus are part of the project graph.

In GroIMP having one Node with a huge number of edges slows down the graph visiting and querying. Thus, the Cloud data is spread over several layers using IntermediateCloudNode. In order to enables the Point of a PointCloud to be rewritten without minimum modifications in the project graph, IntermediateCloudNode are used as adding/changing/removing Point only affect the leaves of the PointCloud graph.

The PointCloudLeaf can be extended to be imp3d.Point (not to be confused with Point from pointcloud - objects from imp3d are GroIMP objects for the 3d scene see here for more details).

groimp-platform/pointcloud.1730903168.txt.gz · Last modified: 2024/11/06 15:26 by gaetan