mirror of https://github.com/CGAL/cgal
Only interpolate for existing labels
This commit is contained in:
parent
3eefc5008c
commit
143fcd3b52
|
|
@ -26,7 +26,6 @@
|
||||||
#include <CGAL/array.h>
|
#include <CGAL/array.h>
|
||||||
|
|
||||||
#include <boost/shared_ptr.hpp>
|
#include <boost/shared_ptr.hpp>
|
||||||
#include <boost/foreach.hpp>
|
|
||||||
#include <boost/format.hpp>
|
#include <boost/format.hpp>
|
||||||
#include <boost/unordered_set.hpp>
|
#include <boost/unordered_set.hpp>
|
||||||
#include <CGAL/ImageIO.h>
|
#include <CGAL/ImageIO.h>
|
||||||
|
|
@ -485,8 +484,9 @@ Image_3::labellized_trilinear_interpolation(const Coord_type& x,
|
||||||
typedef ImageIO::Indicator<Image_word_type> Indicator;
|
typedef ImageIO::Indicator<Image_word_type> Indicator;
|
||||||
double best_value = 0.;
|
double best_value = 0.;
|
||||||
Image_word_type best = 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 =
|
const double r =
|
||||||
trilinear_interpolation<Image_word_type,double,Coord_type, Indicator>(
|
trilinear_interpolation<Image_word_type,double,Coord_type, Indicator>(
|
||||||
x, y, z, value_outside, Indicator(iwt));
|
x, y, z, value_outside, Indicator(iwt));
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue