Page 1 of 1

delete a point from ccPointCloud at index

Posted: Wed Nov 16, 2016 7:32 am
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.

Re: delete a point from ccPointCloud at index

Posted: Wed Nov 16, 2016 7:45 pm
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!

Re: delete a point from ccPointCloud at index

Posted: Thu Nov 17, 2016 3:48 pm
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..