#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
#include <CGAL/IO/read_points.h>
#include <CGAL/estimate_scale.h>
#include <CGAL/jet_smooth_point_set.h>
#include <CGAL/grid_simplify_point_set.h>
#include <CGAL/Timer.h>
#include <CGAL/Memory_sizer.h>
#include <vector>
#include <fstream>
typedef Kernel::FT FT;
int main (int argc, char** argv)
{
CGAL::Timer task_timer;
std::vector<Point_3> points;
{
std::cerr << "Error: can't read input file" << std::endl;
return EXIT_FAILURE;
}
task_timer.start();
task_timer.stop();
CGAL::jet_smooth_point_set<Concurrency_tag>(points, static_cast<unsigned int>(k_scale));
task_timer.start();
task_timer.stop();
std::size_t memory = CGAL::Memory_sizer().virtual_size();
double time = task_timer.time();
std::cout << "Scales computed in " << time << " second(s) using "
<< (memory>>20) << " MiB of memory:" << std::endl;
std::cout << " * Global K scale: " << k_scale << std::endl;
std::cout << " * Global range scale: " << range_scale << std::endl;
return EXIT_SUCCESS;
}
FT estimate_global_range_scale(const PointRange &points, const NamedParameters &np=parameters::default_values())
Estimates the global scale in a range sense.
Definition: estimate_scale.h:707
PointRange::iterator grid_simplify_point_set(PointRange &points, double epsilon, const NamedParameters &np=parameters::default_values())
Merges points which belong to the same cell of a grid of cell size = epsilon.
Definition: grid_simplify_point_set.h:235
std::size_t estimate_global_k_neighbor_scale(const PointRange &points, const NamedParameters &np=parameters::default_values())
Estimates the global scale in a K nearest neighbors sense.
Definition: estimate_scale.h:558
bool read_points(const std::string &fname, PointOutputIterator output, const NamedParameters &np=parameters::default_values())
reads the point set from an input file.
Definition: read_points.h:89
std::string data_file_path(const std::string &filename)