mirror of https://github.com/CGAL/cgal
fixed some paths to data
This commit is contained in:
parent
cb99aaeb2e
commit
f6144e09ed
|
|
@ -88,11 +88,11 @@ void benchmark_region_growing_on_point_set_2(
|
||||||
int main(int argc, char *argv[]) {
|
int main(int argc, char *argv[]) {
|
||||||
|
|
||||||
// Load xyz data either from a local folder or a user-provided file.
|
// Load xyz data either from a local folder or a user-provided file.
|
||||||
std::ifstream in(argc > 1 ? argv[1] : "data/point_set_2.xyz");
|
std::ifstream in(argc > 1 ? argv[1] : CGAL::data_file_path("points_3/buildings_outline.xyz"));
|
||||||
CGAL::IO::set_ascii_mode(in);
|
CGAL::IO::set_ascii_mode(in);
|
||||||
|
|
||||||
if (!in) {
|
if (!in) {
|
||||||
std::cout << "ERROR: cannot read the file point_set_2.xyz!" << std::endl;
|
std::cout << "ERROR: cannot read the file buildings_outline.xyz!" << std::endl;
|
||||||
return EXIT_FAILURE;
|
return EXIT_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -102,7 +102,7 @@ int main(int argc, char *argv[]) {
|
||||||
input_range.push_back(std::make_pair(Point_2(a, b), Vector_2(d, e)));
|
input_range.push_back(std::make_pair(Point_2(a, b), Vector_2(d, e)));
|
||||||
in.close();
|
in.close();
|
||||||
|
|
||||||
// Default parameter values for the data file point_set_2.xyz.
|
// Default parameter values for the data file buildings_outline.xyz.
|
||||||
const FT distance_threshold = FT(45) / FT(10);
|
const FT distance_threshold = FT(45) / FT(10);
|
||||||
const FT angle_threshold = FT(45);
|
const FT angle_threshold = FT(45);
|
||||||
const std::size_t min_region_size = 5;
|
const std::size_t min_region_size = 5;
|
||||||
|
|
|
||||||
|
|
@ -114,11 +114,11 @@ void benchmark_region_growing_on_point_set_3(
|
||||||
int main(int argc, char *argv[]) {
|
int main(int argc, char *argv[]) {
|
||||||
|
|
||||||
// Load xyz data either from a local folder or a user-provided file.
|
// Load xyz data either from a local folder or a user-provided file.
|
||||||
std::ifstream in(argc > 1 ? argv[1] : "data/point_set_3.xyz");
|
std::ifstream in(argc > 1 ? argv[1] : CGAL::data_file_path("points_3/building.xyz"));
|
||||||
CGAL::IO::set_ascii_mode(in);
|
CGAL::IO::set_ascii_mode(in);
|
||||||
|
|
||||||
if (!in) {
|
if (!in) {
|
||||||
std::cout << "ERROR: cannot read the file point_set_3.xyz!" << std::endl;
|
std::cout << "ERROR: cannot read the file building.xyz!" << std::endl;
|
||||||
return EXIT_FAILURE;
|
return EXIT_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -128,7 +128,7 @@ int main(int argc, char *argv[]) {
|
||||||
input.push_back(std::make_pair(p, n));
|
input.push_back(std::make_pair(p, n));
|
||||||
in.close();
|
in.close();
|
||||||
|
|
||||||
// Default parameter values for the data file point_set_3.xyz.
|
// Default parameter values for the data file building.xyz.
|
||||||
const std::size_t k = 12;
|
const std::size_t k = 12;
|
||||||
const FT distance_threshold = FT(2);
|
const FT distance_threshold = FT(2);
|
||||||
const FT angle_threshold = FT(20);
|
const FT angle_threshold = FT(20);
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@ int main(int argc, char *argv[]) {
|
||||||
|
|
||||||
// Load polyline data either from a local folder or a user-provided file.
|
// Load polyline data either from a local folder or a user-provided file.
|
||||||
const bool is_default_input = argc > 1 ? false : true;
|
const bool is_default_input = argc > 1 ? false : true;
|
||||||
std::ifstream in(is_default_input ? "data/polyline_3.polylines.txt" : argv[1]);
|
std::ifstream in(is_default_input ? CGAL::data_file_path("polylines_3/polyline_3.polylines.txt") : argv[1]);
|
||||||
CGAL::set_ascii_mode(in);
|
CGAL::set_ascii_mode(in);
|
||||||
if (!in) {
|
if (!in) {
|
||||||
std::cerr << "ERROR: cannot read the input file!" << std::endl;
|
std::cerr << "ERROR: cannot read the input file!" << std::endl;
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,7 @@ int main(int argc, char *argv[]) {
|
||||||
|
|
||||||
// Load data either from a local folder or a user-provided file.
|
// Load data either from a local folder or a user-provided file.
|
||||||
const bool is_default_input = argc > 1 ? false : true;
|
const bool is_default_input = argc > 1 ? false : true;
|
||||||
const std::string filename = is_default_input ? "data/am.off" : argv[1];
|
const std::string filename = is_default_input ? CGAL::data_file_path("meshes/am.off") : argv[1];
|
||||||
|
|
||||||
Surface_mesh surface_mesh;
|
Surface_mesh surface_mesh;
|
||||||
if (!CGAL::IO::read_polygon_mesh(filename, surface_mesh, CGAL::parameters::all_default())) {
|
if (!CGAL::IO::read_polygon_mesh(filename, surface_mesh, CGAL::parameters::all_default())) {
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
|
|
@ -33,7 +33,7 @@ using Region_growing = SD::Region_growing<Input_range, Neighbor_query, Region_ty
|
||||||
int main(int argc, char *argv[]) {
|
int main(int argc, char *argv[]) {
|
||||||
|
|
||||||
// Load data.
|
// Load data.
|
||||||
std::ifstream in(argc > 1 ? argv[1] : CGAL::data_file_path("points_3/point_set_2.xyz"));
|
std::ifstream in(argc > 1 ? argv[1] : CGAL::data_file_path("points_3/buildings_outline.xyz"));
|
||||||
CGAL::IO::set_ascii_mode(in);
|
CGAL::IO::set_ascii_mode(in);
|
||||||
assert(in);
|
assert(in);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -41,7 +41,7 @@ bool test_region_growing_on_cube(int argc, char *argv[]) {
|
||||||
const std::size_t min_region_size = 1;
|
const std::size_t min_region_size = 1;
|
||||||
|
|
||||||
// Load data.
|
// Load data.
|
||||||
std::ifstream in(argc > 1 ? argv[1] : "data/cube.off");
|
std::ifstream in(argc > 1 ? argv[1] : CGAL::data_file_path("meshes/cube-sd.off"));
|
||||||
CGAL::IO::set_ascii_mode(in);
|
CGAL::IO::set_ascii_mode(in);
|
||||||
assert(in);
|
assert(in);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,7 @@ bool test_region_growing_on_degenerated_mesh(int argc, char *argv[]) {
|
||||||
const std::size_t min_region_size = 5;
|
const std::size_t min_region_size = 5;
|
||||||
|
|
||||||
// Load data.
|
// Load data.
|
||||||
std::ifstream in(argc > 1 ? argv[1] : "data/degenerated.off");
|
std::ifstream in(argc > 1 ? argv[1] : CGAL::data_file_path("meshes/degenerated-sd.off"));
|
||||||
CGAL::IO::set_ascii_mode(in);
|
CGAL::IO::set_ascii_mode(in);
|
||||||
assert(in);
|
assert(in);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -43,7 +43,7 @@ bool test_region_growing_on_point_set_2(int argc, char *argv[]) {
|
||||||
const std::size_t min_region_size = 5;
|
const std::size_t min_region_size = 5;
|
||||||
|
|
||||||
// Load data.
|
// Load data.
|
||||||
std::ifstream in(argc > 1 ? argv[1] : CGAL::data_file_path("points_3/point_set_2.xyz"));
|
std::ifstream in(argc > 1 ? argv[1] : CGAL::data_file_path("points_3/buildings_outline.xyz"));
|
||||||
CGAL::IO::set_ascii_mode(in);
|
CGAL::IO::set_ascii_mode(in);
|
||||||
assert(in);
|
assert(in);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -46,7 +46,7 @@ bool test(int argc, char** argv, const std::string name, const std::size_t minr,
|
||||||
const std::size_t min_region_size = 5;
|
const std::size_t min_region_size = 5;
|
||||||
|
|
||||||
// Load data.
|
// Load data.
|
||||||
std::ifstream in(argc > 1 ? argv[1] : CGAL::data_file_path("points_3/point_set_2.xyz"));
|
std::ifstream in(argc > 1 ? argv[1] : CGAL::data_file_path("points_3/buildings_outline.xyz"));
|
||||||
CGAL::IO::set_ascii_mode(in);
|
CGAL::IO::set_ascii_mode(in);
|
||||||
assert(in);
|
assert(in);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -43,7 +43,7 @@ bool test_region_growing_on_point_set_3(int argc, char *argv[]) {
|
||||||
const std::size_t min_region_size = 50;
|
const std::size_t min_region_size = 50;
|
||||||
|
|
||||||
// Load data.
|
// Load data.
|
||||||
std::ifstream in(argc > 1 ? argv[1] : CGAL::data_file_path("points_3/point_set_3.xyz"));
|
std::ifstream in(argc > 1 ? argv[1] : CGAL::data_file_path("points_3/building.xyz"));
|
||||||
CGAL::IO::set_ascii_mode(in);
|
CGAL::IO::set_ascii_mode(in);
|
||||||
assert(in);
|
assert(in);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -53,7 +53,7 @@ bool test(
|
||||||
const std::size_t k = 12;
|
const std::size_t k = 12;
|
||||||
|
|
||||||
// Load data.
|
// Load data.
|
||||||
std::ifstream in(argc > 1 ? argv[1] : CGAL::data_file_path("points_3/point_set_3.xyz"));
|
std::ifstream in(argc > 1 ? argv[1] : CGAL::data_file_path("points_3/building.xyz"));
|
||||||
CGAL::IO::set_ascii_mode(in);
|
CGAL::IO::set_ascii_mode(in);
|
||||||
assert(in);
|
assert(in);
|
||||||
|
|
||||||
|
|
@ -155,7 +155,7 @@ int main(int argc, char *argv[]) {
|
||||||
},
|
},
|
||||||
[](const auto& region) -> bool {
|
[](const auto& region) -> bool {
|
||||||
std::cout << "- num regions spheres: " << region.size() << std::endl;
|
std::cout << "- num regions spheres: " << region.size() << std::endl;
|
||||||
return (region.size() > 36 && region.size() < 40);
|
return (region.size() > 65 && region.size() < 69);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
@ -179,7 +179,7 @@ int main(int argc, char *argv[]) {
|
||||||
},
|
},
|
||||||
[](const auto& region) -> bool {
|
[](const auto& region) -> bool {
|
||||||
std::cout << "- num regions cylinders: " << region.size() << std::endl;
|
std::cout << "- num regions cylinders: " << region.size() << std::endl;
|
||||||
return (region.size() > 6 && region.size() < 10);
|
return (region.size() > 8 && region.size() < 12);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,7 @@ bool test_region_growing_on_polygon_mesh(int argc, char *argv[]) {
|
||||||
const std::size_t min_region_size = 5;
|
const std::size_t min_region_size = 5;
|
||||||
|
|
||||||
// Load data.
|
// Load data.
|
||||||
std::ifstream in(argc > 1 ? argv[1] : CGAL::data_file_path("meshes/polygon_mesh.off"));
|
std::ifstream in(argc > 1 ? argv[1] : CGAL::data_file_path("meshes/building.off"));
|
||||||
CGAL::IO::set_ascii_mode(in);
|
CGAL::IO::set_ascii_mode(in);
|
||||||
assert(in);
|
assert(in);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,7 @@ int main(int argc, char *argv[]) {
|
||||||
const std::size_t min_region_size = 5;
|
const std::size_t min_region_size = 5;
|
||||||
|
|
||||||
// Load data.
|
// Load data.
|
||||||
std::ifstream in(argc > 1 ? argv[1] : CGAL::data_file_path("meshes/polygon_mesh.off"));
|
std::ifstream in(argc > 1 ? argv[1] : CGAL::data_file_path("meshes/building.off"));
|
||||||
CGAL::IO::set_ascii_mode(in);
|
CGAL::IO::set_ascii_mode(in);
|
||||||
assert(in);
|
assert(in);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -45,7 +45,7 @@ bool test_region_growing_on_polyline(int argc, char *argv[]) {
|
||||||
const FT angle_threshold = FT(45);
|
const FT angle_threshold = FT(45);
|
||||||
|
|
||||||
// Load data.
|
// Load data.
|
||||||
std::ifstream in(argc > 1 ? argv[1] : "data/polyline_3.polylines.txt");
|
std::ifstream in(argc > 1 ? argv[1] : CGAL::data_file_path("polylines_3/polyline_3.polylines.txt"));
|
||||||
CGAL::set_ascii_mode(in);
|
CGAL::set_ascii_mode(in);
|
||||||
assert(in);
|
assert(in);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -46,7 +46,7 @@ int main(int argc, char *argv[]) {
|
||||||
const FT angle_threshold = FT(45);
|
const FT angle_threshold = FT(45);
|
||||||
|
|
||||||
// Load data.
|
// Load data.
|
||||||
std::ifstream in(argc > 1 ? argv[1] : "data/polyline_3.polylines.txt");
|
std::ifstream in(argc > 1 ? argv[1] : CGAL::data_file_path("polylines_3/polyline_3.polylines.txt"));
|
||||||
CGAL::set_ascii_mode(in);
|
CGAL::set_ascii_mode(in);
|
||||||
assert(in);
|
assert(in);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -191,7 +191,7 @@ bool test_lines_segment_set_3() {
|
||||||
using Region_growing = CGAL::Shape_detection::
|
using Region_growing = CGAL::Shape_detection::
|
||||||
Region_growing<Segment_range, Polyline_graph, Region_type, typename Sorting::Seed_map>;
|
Region_growing<Segment_range, Polyline_graph, Region_type, typename Sorting::Seed_map>;
|
||||||
|
|
||||||
std::ifstream in("data/am.off");
|
std::ifstream in(CGAL::data_file_path("meshes/am.off"));
|
||||||
CGAL::set_ascii_mode(in);
|
CGAL::set_ascii_mode(in);
|
||||||
assert(in);
|
assert(in);
|
||||||
|
|
||||||
|
|
@ -330,7 +330,7 @@ bool test_planes_surface_mesh() {
|
||||||
using Point_3 = typename Kernel::Point_3;
|
using Point_3 = typename Kernel::Point_3;
|
||||||
using Surface_mesh = CGAL::Surface_mesh<Point_3>;
|
using Surface_mesh = CGAL::Surface_mesh<Point_3>;
|
||||||
|
|
||||||
std::ifstream in("data/am.off");
|
std::ifstream in(CGAL::data_file_path("meshes/am.off"));
|
||||||
CGAL::set_ascii_mode(in);
|
CGAL::set_ascii_mode(in);
|
||||||
assert(in);
|
assert(in);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -45,7 +45,7 @@ void test_copied_point_cloud (const Point_set& points, std::size_t nb);
|
||||||
int main (int argc, char** argv)
|
int main (int argc, char** argv)
|
||||||
{
|
{
|
||||||
Point_set points;
|
Point_set points;
|
||||||
const std::string ifilename = (argc > 1) ? argv[1] : CGAL::data_file_path("points_3/point_set_3.xyz");
|
const std::string ifilename = (argc > 1) ? argv[1] : CGAL::data_file_path("points_3/building.xyz");
|
||||||
std::ifstream ifile(ifilename);
|
std::ifstream ifile(ifilename);
|
||||||
|
|
||||||
if (!ifile ||
|
if (!ifile ||
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue