access the point cloud

Questions related to plugins development
Post Reply
Tolier
Posts: 11
Joined: Mon Jul 09, 2018 2:49 pm

access the point cloud

Post by Tolier »

Bonjour,

Question, un fonction permettant d'obtenir les coordonnées de tout le nuage de points ou d'une partie du nuage existe déjà?
Pour exemple, si nous effectuons un clic sur un mur mais que nous voulions le point de plus bas de celui-ci. Pour le trouver, il nous faudrait avoir
accès au point de la zone pour pouvoir prendre un point pas trop éloigné mais le plus bas possible.

Hello,

Question, a function to obtain the coordinates of the entire point cloud or part of the cloud already exists?
For example, if we click on a wall but want the lowest point of it. To find it, we would need access to the point in the area to be able to take a point not too far away but as low as possible.
daniel
Site Admin
Posts: 7382
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: access the point cloud

Post by daniel »

Not sure to understand: do you mean programmatically? If yes, then you can of course scan the whole point cloud anytine (by using ccPointCloud::getPoint(i) for instance).

And if you want to do that after a point click, you'll have to "listen" to the point click (by registering to the picking hub (ccPickingHub). Look how this element is used by various dialogs and tools in CloudCompare's codebase.
Daniel, CloudCompare admin
Tolier
Posts: 11
Joined: Mon Jul 09, 2018 2:49 pm

Re: access the point cloud

Post by Tolier »

Yes, I expressed myself very badly.... My objective is to make a click, then to retrieve the click point with "onitempicked" and it is from here that I would like to retrieve a lowest point in Z therefore being located under the click point.
I used the getPoint(Size) function which loops over the whole cloud... for a cloud of 200 thousand points this but 50ms I think it is not possible to do this on 10 Million points.
Is there a way to delimit a smaller area in the cloud?
Maybe "getBoundingBox"
daniel
Site Admin
Posts: 7382
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: access the point cloud

Post by daniel »

You could/should use the octree. But you'll have to dig in the code to understand how it works.

There's especially a 'cylinder' search with the octree that should help you (see CCLib's "DgmOctree").
Daniel, CloudCompare admin
Post Reply