From 10e953e3452adb2140e68ebcf20cdb1df84a2d74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Thu, 4 Apr 2024 12:41:25 +0200 Subject: [PATCH] Rename Grid-Image_3 conversion functions --- Isosurfacing_3/benchmark/Isosurfacing_3/benchmark.cpp | 2 +- .../contouring_seq_vs_parallel_image.cpp | 2 +- .../doc/Isosurfacing_3/PackageDescription.txt | 4 ++-- .../examples/Isosurfacing_3/contouring_inrimage.cpp | 2 +- .../examples/Isosurfacing_3/contouring_vtk_image.cpp | 2 +- .../include/CGAL/Isosurfacing_3/IO/Image_3.h | 10 +++++----- .../test/Isosurfacing_3/test_dual_contouring.cpp | 2 +- 7 files changed, 12 insertions(+), 12 deletions(-) diff --git a/Isosurfacing_3/benchmark/Isosurfacing_3/benchmark.cpp b/Isosurfacing_3/benchmark/Isosurfacing_3/benchmark.cpp index 7b3f615fd05..a2d1e2a73fa 100644 --- a/Isosurfacing_3/benchmark/Isosurfacing_3/benchmark.cpp +++ b/Isosurfacing_3/benchmark/Isosurfacing_3/benchmark.cpp @@ -239,7 +239,7 @@ struct Skull_image Grid grid; Values values { grid }; - if(!CGAL::Isosurfacing::IO::read_Image_3(image, grid, values)) + if(!CGAL::Isosurfacing::IO::convert_image_to_grid(image, grid, values)) std::cerr << "Error: Cannot convert image to Cartesian grid" << std::endl; } diff --git a/Isosurfacing_3/benchmark/Isosurfacing_3/contouring_seq_vs_parallel_image.cpp b/Isosurfacing_3/benchmark/Isosurfacing_3/contouring_seq_vs_parallel_image.cpp index 4a1c7e1a4fb..8085431820f 100644 --- a/Isosurfacing_3/benchmark/Isosurfacing_3/contouring_seq_vs_parallel_image.cpp +++ b/Isosurfacing_3/benchmark/Isosurfacing_3/contouring_seq_vs_parallel_image.cpp @@ -45,7 +45,7 @@ int main(int argc, char** argv) // convert image to a Cartesian grid Grid grid; Values values { grid }; - if(!IS::IO::read_Image_3(image, grid, values)) + if(!IS::IO::convert_image_to_grid(image, grid, values)) { std::cerr << "Error: Cannot convert image to Cartesian grid" << std::endl; return EXIT_FAILURE; diff --git a/Isosurfacing_3/doc/Isosurfacing_3/PackageDescription.txt b/Isosurfacing_3/doc/Isosurfacing_3/PackageDescription.txt index 82f7dfb506e..324d35bf61b 100644 --- a/Isosurfacing_3/doc/Isosurfacing_3/PackageDescription.txt +++ b/Isosurfacing_3/doc/Isosurfacing_3/PackageDescription.txt @@ -89,6 +89,6 @@ The output is a polygon soup (i.e., a container of point coordinates and indexed - `CGAL::Isosurfacing::dual_contouring()` \cgalCRPSection{I/O} -- `CGAL::Isosurfacing::IO::read_Image_3()` -- `CGAL::Isosurfacing::IO::write_Image_3()` +- `CGAL::Isosurfacing::IO::convert_image_to_grid()` +- `CGAL::Isosurfacing::IO::convert_grid_to_image()` */ diff --git a/Isosurfacing_3/examples/Isosurfacing_3/contouring_inrimage.cpp b/Isosurfacing_3/examples/Isosurfacing_3/contouring_inrimage.cpp index ace05f79030..25588f00182 100644 --- a/Isosurfacing_3/examples/Isosurfacing_3/contouring_inrimage.cpp +++ b/Isosurfacing_3/examples/Isosurfacing_3/contouring_inrimage.cpp @@ -98,7 +98,7 @@ int main(int argc, char* argv[]) // convert image to a Cartesian grid Grid grid; Values values { grid }; // 'values' keeps a reference to the grid - if(!IS::IO::read_Image_3(image, grid, values)) + if(!IS::IO::convert_image_to_grid(image, grid, values)) { std::cerr << "Error: Cannot convert image to Cartesian grid" << std::endl; return EXIT_FAILURE; diff --git a/Isosurfacing_3/examples/Isosurfacing_3/contouring_vtk_image.cpp b/Isosurfacing_3/examples/Isosurfacing_3/contouring_vtk_image.cpp index 8d87a909bd3..f36c48e8aff 100644 --- a/Isosurfacing_3/examples/Isosurfacing_3/contouring_vtk_image.cpp +++ b/Isosurfacing_3/examples/Isosurfacing_3/contouring_vtk_image.cpp @@ -102,7 +102,7 @@ void run(const char* filename, // convert image to a Cartesian grid Grid grid; Values values { grid }; // 'values' keeps a reference to the grid - if(!IS::IO::read_Image_3(image, grid, values)) + if(!IS::IO::convert_image_to_grid(image, grid, values)) { std::cerr << "Error: Cannot convert image to Cartesian grid" << std::endl; return; diff --git a/Isosurfacing_3/include/CGAL/Isosurfacing_3/IO/Image_3.h b/Isosurfacing_3/include/CGAL/Isosurfacing_3/IO/Image_3.h index a29e9c6fd3f..5694252dfd4 100644 --- a/Isosurfacing_3/include/CGAL/Isosurfacing_3/IO/Image_3.h +++ b/Isosurfacing_3/include/CGAL/Isosurfacing_3/IO/Image_3.h @@ -42,9 +42,9 @@ namespace IO { // We need to have the API pass us an existing grid / values pair because the values // usually keep a reference to the grid. template -bool read_Image_3(const CGAL::Image_3& image, - Grid& grid, - Values& values) +bool convert_image_to_grid(const CGAL::Image_3& image, + Grid& grid, + Values& values) { using Geom_traits = typename Grid::Geom_traits; using FT = typename Geom_traits::FT; @@ -86,8 +86,8 @@ bool read_Image_3(const CGAL::Image_3& image, * \param values the field of values */ template -CGAL::Image_3 write_Image_3(const Grid& grid, - const Values& values) +CGAL::Image_3 convert_grid_to_image(const Grid& grid, + const Values& values) { using Geom_traits = typename Grid::Geom_traits; diff --git a/Isosurfacing_3/test/Isosurfacing_3/test_dual_contouring.cpp b/Isosurfacing_3/test/Isosurfacing_3/test_dual_contouring.cpp index dc33909a25c..19c814ba174 100644 --- a/Isosurfacing_3/test/Isosurfacing_3/test_dual_contouring.cpp +++ b/Isosurfacing_3/test/Isosurfacing_3/test_dual_contouring.cpp @@ -145,7 +145,7 @@ void test_image() // convert image to a Cartesian grid Grid grid; Values values { grid }; // 'values' keeps a reference to the grid - if(!IS::IO::read_Image_3(image, grid, values)) + if(!IS::IO::convert_image_to_grid(image, grid, values)) { std::cerr << "Error: Cannot convert image to Cartesian grid" << std::endl; assert(false);