Reducing the Size of a Cloud with Random Decimation

/////////////////////////////////////////////////////////////////////
// The code reduce the size of a cloud by removing points randomly //
/////////////////////////////////////////////////////////////////////

EPointCloud pc;
pc.Load("");

// Explicitly decimate the point cloud to keep 5000 points
ERandomDecimator decimator(5000);
EPointCloud pcDecimated;

decimator.Decimate(pc, pcDecimated);
/////////////////////////////////////////////////////////////////////
// The code reduce the size of a cloud by removing points randomly //
/////////////////////////////////////////////////////////////////////

EPointCloud pc = new EPointCloud();
pc.Load("");

// Explicitly decimate the point cloud to keep 5000 points
ERandomDecimator decimator = new ERandomDecimator(5000);
EPointCloud pcDecimated = new EPointCloud();

decimator.Decimate(pc, pcDecimated);