diff --git a/CGAL_ImageIO/include/CGAL/Image_3.h b/CGAL_ImageIO/include/CGAL/Image_3.h index 3050dcfb774..3ae3164931a 100644 --- a/CGAL_ImageIO/include/CGAL/Image_3.h +++ b/CGAL_ImageIO/include/CGAL/Image_3.h @@ -134,9 +134,9 @@ public: double vy() const { return image_ptr->vy; } double vz() const { return image_ptr->vz; } - float value(const unsigned int i, - const unsigned int j, - const unsigned int k) const + float value(const std::size_t i, + const std::size_t j, + const std::size_t k) const { return ::evaluate(image(),i,j,k); } diff --git a/CGAL_ImageIO/src/CGAL_ImageIO/ImageIO.cpp b/CGAL_ImageIO/src/CGAL_ImageIO/ImageIO.cpp index 33ee5d2b4f2..9198b14a801 100644 --- a/CGAL_ImageIO/src/CGAL_ImageIO/ImageIO.cpp +++ b/CGAL_ImageIO/src/CGAL_ImageIO/ImageIO.cpp @@ -1543,9 +1543,9 @@ float triLinInterp(const _image* image, // Gives the value of the image at pixel (i,j,k), converted in float. float evaluate(const _image* image, - const unsigned int i, - const unsigned int j, - const unsigned int k) + const std::size_t i, + const std::size_t j, + const std::size_t k) { using CGAL::IMAGEIO::static_evaluate; diff --git a/CGAL_ImageIO/test/CGAL_ImageIO/test_trilinear_interpolation.cpp b/CGAL_ImageIO/test/CGAL_ImageIO/test_trilinear_interpolation.cpp index f8d99408e45..47246d8f366 100644 --- a/CGAL_ImageIO/test/CGAL_ImageIO/test_trilinear_interpolation.cpp +++ b/CGAL_ImageIO/test/CGAL_ImageIO/test_trilinear_interpolation.cpp @@ -195,7 +195,7 @@ int main() { "../Surface_mesher_Examples/data/skull_2.9.inr" }; - unsigned int file_index = 0; + std::size_t file_index = 0; for( ; file_index < sizeof(filenames); ++file_index) { std::ifstream image_file(filenames[file_index], std::ios_base::binary | std::ios_base::in ); @@ -242,18 +242,18 @@ int main() { if(diff > 0.0001 ) { std::cerr.precision(20); - const int i1 = (int)(d_z / image2.image()->vz); - const int j1 = (int)(d_y / image2.image()->vy); - const int k1 = (int)(d_x / image2.image()->vx); + const std::size_t i1 = static_cast(d_z / image2.image()->vz); + const std::size_t j1 = static_cast(d_y / image2.image()->vy); + const std::size_t k1 = static_cast(d_x / image2.image()->vx); std::cerr << "pos = (" << d_x << ", " << d_y << ", " << d_z << ") => (" << i1 << ", " << j1 << ", " << k1 << ")\n"; std::cerr << "value1 = " << value1 << "\nvalue2 = " << value2 << std::endl; - for(int di = 0; di < 2 ; ++di) - for(int dj = 0; dj < 2 ; ++dj) - for(int dk = 0; dk < 2 ; ++dk) + for(std::size_t di = 0; di < 2 ; ++di) + for(std::size_t dj = 0; dj < 2 ; ++dj) + for(std::size_t dk = 0; dk < 2 ; ++dk) { std::cerr << "value(" << i1 + di << ", " << j1 + dj