delete a point from ccPointCloud at index

Any question about the main GUI application (frontend)
Post Reply
vinayan
Posts: 27
Joined: Thu Nov 03, 2016 4:11 pm

delete a point from ccPointCloud at index

Post by vinayan »

how do I delete a point at an index? . I checked the graphical segmentation tools source. There it uses cloud->getTheVisibilityArray() and sets invisible at the specified index. I am sure I am missing something here.
daniel
Site Admin
Posts: 7330
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: delete a point from ccPointCloud at index

Post by daniel »

There's no easy way to do this in fact. You can indeed use the visibility flags (this is used by the interactive segmentation tool typically). You flags the points that should be removed and then create a new cloud from this 'selection'.

If you really need to remove a single point, it could be better to write your own function. But the challenge will then be to delete all the features attached to this point (color, normal, scalar fields, reference in scan grids, labels, etc.). Not an easy task!
Daniel, CloudCompare admin
vinayan
Posts: 27
Joined: Thu Nov 03, 2016 4:11 pm

Re: delete a point from ccPointCloud at index

Post by vinayan »

yes i did think the color/normal/scalar indices could cause issues..anyway i will try if i can manage this through a function..
Post Reply