set all neighbors to 1 to avoid dealing with weights in feature detection

This commit is contained in:
Jane Tournois 2022-02-16 10:10:48 +01:00
parent 9bb393ee11
commit cdf9849c57
1 changed files with 8 additions and 4 deletions

View File

@ -261,10 +261,6 @@ void postprocess_weights_for_feature_protection(const CGAL::Image_3& image,
using CGAL::IMAGEIO::static_evaluate;
const double tx = image.tx();
const double ty = image.ty();
const double tz = image.tz();
for (std::size_t k = 0, end_k = image.zdim() - 1; k < end_k; ++k)
{
for (std::size_t j = 0, end_j = image.ydim() - 1; j < end_j; ++j)
@ -300,6 +296,14 @@ void postprocess_weights_for_feature_protection(const CGAL::Image_3& image,
else
{
static_evaluate<Weights_type>(weights.image(), i, j, k) = (Weights_type)(1);
static_evaluate<Weights_type>(weights.image(), i + 1, j, k) = (Weights_type)(1);
static_evaluate<Weights_type>(weights.image(), i, j + 1, k) = (Weights_type)(1);
static_evaluate<Weights_type>(weights.image(), i + 1, j + 1, k) = (Weights_type)(1);
static_evaluate<Weights_type>(weights.image(), i, j, k + 1) = (Weights_type)(1);
static_evaluate<Weights_type>(weights.image(), i + 1, j, k + 1) = (Weights_type)(1);
static_evaluate<Weights_type>(weights.image(), i, j + 1, k + 1) = (Weights_type)(1);
static_evaluate<Weights_type>(weights.image(), i + 1, j + 1, k + 1) = (Weights_type)(1);
break;
}
}
}