mirror of https://github.com/CGAL/cgal
Rename Grid-Image_3 conversion functions
This commit is contained in:
parent
ccb0a5b04c
commit
10e953e345
|
|
@ -239,7 +239,7 @@ struct Skull_image
|
||||||
|
|
||||||
Grid grid;
|
Grid grid;
|
||||||
Values values { 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;
|
std::cerr << "Error: Cannot convert image to Cartesian grid" << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -45,7 +45,7 @@ int main(int argc, char** argv)
|
||||||
// convert image to a Cartesian grid
|
// convert image to a Cartesian grid
|
||||||
Grid grid;
|
Grid grid;
|
||||||
Values values { 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;
|
std::cerr << "Error: Cannot convert image to Cartesian grid" << std::endl;
|
||||||
return EXIT_FAILURE;
|
return EXIT_FAILURE;
|
||||||
|
|
|
||||||
|
|
@ -89,6 +89,6 @@ The output is a polygon soup (i.e., a container of point coordinates and indexed
|
||||||
- `CGAL::Isosurfacing::dual_contouring()`
|
- `CGAL::Isosurfacing::dual_contouring()`
|
||||||
|
|
||||||
\cgalCRPSection{I/O}
|
\cgalCRPSection{I/O}
|
||||||
- `CGAL::Isosurfacing::IO::read_Image_3()`
|
- `CGAL::Isosurfacing::IO::convert_image_to_grid()`
|
||||||
- `CGAL::Isosurfacing::IO::write_Image_3()`
|
- `CGAL::Isosurfacing::IO::convert_grid_to_image()`
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -98,7 +98,7 @@ int main(int argc, char* argv[])
|
||||||
// convert image to a Cartesian grid
|
// convert image to a Cartesian grid
|
||||||
Grid grid;
|
Grid grid;
|
||||||
Values values { grid }; // 'values' keeps a reference to the 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;
|
std::cerr << "Error: Cannot convert image to Cartesian grid" << std::endl;
|
||||||
return EXIT_FAILURE;
|
return EXIT_FAILURE;
|
||||||
|
|
|
||||||
|
|
@ -102,7 +102,7 @@ void run(const char* filename,
|
||||||
// convert image to a Cartesian grid
|
// convert image to a Cartesian grid
|
||||||
Grid grid;
|
Grid grid;
|
||||||
Values values { grid }; // 'values' keeps a reference to the 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;
|
std::cerr << "Error: Cannot convert image to Cartesian grid" << std::endl;
|
||||||
return;
|
return;
|
||||||
|
|
|
||||||
|
|
@ -42,7 +42,7 @@ namespace IO {
|
||||||
// We need to have the API pass us an existing grid / values pair because the values
|
// We need to have the API pass us an existing grid / values pair because the values
|
||||||
// usually keep a reference to the grid.
|
// usually keep a reference to the grid.
|
||||||
template <typename Grid, typename Values>
|
template <typename Grid, typename Values>
|
||||||
bool read_Image_3(const CGAL::Image_3& image,
|
bool convert_image_to_grid(const CGAL::Image_3& image,
|
||||||
Grid& grid,
|
Grid& grid,
|
||||||
Values& values)
|
Values& values)
|
||||||
{
|
{
|
||||||
|
|
@ -86,7 +86,7 @@ bool read_Image_3(const CGAL::Image_3& image,
|
||||||
* \param values the field of values
|
* \param values the field of values
|
||||||
*/
|
*/
|
||||||
template <typename Grid, typename Values>
|
template <typename Grid, typename Values>
|
||||||
CGAL::Image_3 write_Image_3(const Grid& grid,
|
CGAL::Image_3 convert_grid_to_image(const Grid& grid,
|
||||||
const Values& values)
|
const Values& values)
|
||||||
{
|
{
|
||||||
using Geom_traits = typename Grid::Geom_traits;
|
using Geom_traits = typename Grid::Geom_traits;
|
||||||
|
|
|
||||||
|
|
@ -145,7 +145,7 @@ void test_image()
|
||||||
// convert image to a Cartesian grid
|
// convert image to a Cartesian grid
|
||||||
Grid grid;
|
Grid grid;
|
||||||
Values values { grid }; // 'values' keeps a reference to the 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;
|
std::cerr << "Error: Cannot convert image to Cartesian grid" << std::endl;
|
||||||
assert(false);
|
assert(false);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue