From cdf9849c57059aa75ed2f9bbf8df15cbc8fad9ad Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Wed, 16 Feb 2022 10:10:48 +0100 Subject: [PATCH] set all neighbors to 1 to avoid dealing with weights in feature detection --- Mesh_3/include/CGAL/Mesh_3/generate_label_weights.h | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/Mesh_3/include/CGAL/Mesh_3/generate_label_weights.h b/Mesh_3/include/CGAL/Mesh_3/generate_label_weights.h index 060850c7320..3ce155ee1ce 100644 --- a/Mesh_3/include/CGAL/Mesh_3/generate_label_weights.h +++ b/Mesh_3/include/CGAL/Mesh_3/generate_label_weights.h @@ -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.image(), i, j, k) = (Weights_type)(1); + static_evaluate(weights.image(), i + 1, j, k) = (Weights_type)(1); + static_evaluate(weights.image(), i, j + 1, k) = (Weights_type)(1); + static_evaluate(weights.image(), i + 1, j + 1, k) = (Weights_type)(1); + static_evaluate(weights.image(), i, j, k + 1) = (Weights_type)(1); + static_evaluate(weights.image(), i + 1, j, k + 1) = (Weights_type)(1); + static_evaluate(weights.image(), i, j + 1, k + 1) = (Weights_type)(1); + static_evaluate(weights.image(), i + 1, j + 1, k + 1) = (Weights_type)(1); + break; } } }