Batch synchronize process

Feel free to ask any question here
burcarjo
Posts: 8
Joined: Mon May 13, 2013 8:34 am

Re: Batch synchronize process

Post by burcarjo »

Finally I used hDlg->exec(); to keep opened the histogram window.

I'm looking a way to delete points out of a custom defined box (from center).
What method can I use to directly remove a point of my cloudPoint object ?

CCVector3 P;
dataCloudcut->getPoint(i,P);
float dx = std::abs(P.x - C.x);
float dy = std::abs(P.y - C.y);
float dz = std::abs(P.z - C.z);
if (dx>1.0 || dy>1.0 || dz>1.0) {
dataCloudcut-> ..... (remove point)
}


David.
daniel
Site Admin
Posts: 7713
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Batch synchronize process

Post by daniel »

In fact there's no method to delete a given point (as we use internally specific memory structures that don't handle this well at all).

The best way is to create a new point cloud with the points you want to keep. Either you do this really simply (create a new cloud and 'add' points to it) or if you want to keep all the other pieces of information (color, scalar fields, normals, etc.) you must use a 'CCLib::ReferenceCloud' (in which you only push the indexes of the points you want to keep) and eventually you can create a new cloud based on this selection (with the ccPointCloud::partialClone). You have multiple example of this wherever partialClone is used in the code.
Daniel, CloudCompare admin
Post Reply