From 143fcd3b52ad1335ff6d8ea3c172016ca26968f2 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Thu, 3 Mar 2016 10:35:33 +0100 Subject: [PATCH] Only interpolate for existing labels --- CGAL_ImageIO/include/CGAL/Image_3.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CGAL_ImageIO/include/CGAL/Image_3.h b/CGAL_ImageIO/include/CGAL/Image_3.h index 5a320657dd9..3e865b36eec 100644 --- a/CGAL_ImageIO/include/CGAL/Image_3.h +++ b/CGAL_ImageIO/include/CGAL/Image_3.h @@ -26,7 +26,6 @@ #include #include -#include #include #include #include @@ -485,8 +484,9 @@ Image_3::labellized_trilinear_interpolation(const Coord_type& x, typedef ImageIO::Indicator Indicator; double best_value = 0.; Image_word_type best = 0; - BOOST_FOREACH(Image_word_type iwt, labels) + for(int i = 0; i < lc; ++i) { + Image_word_type iwt = labels[i]; const double r = trilinear_interpolation( x, y, z, value_outside, Indicator(iwt));