From e34cd8d93838ac8fe346a69e8744cab0934e76bc Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Thu, 2 Mar 2023 15:04:41 +0100 Subject: [PATCH] doc --- Mesh_3/include/CGAL/Labeled_mesh_domain_3.h | 25 +++++++++++++------ .../CGAL/Mesh_3/Detect_features_in_image.h | 4 ++- .../Mesh_3/Detect_features_on_image_bbox.h | 4 ++- 3 files changed, 23 insertions(+), 10 deletions(-) diff --git a/Mesh_3/include/CGAL/Labeled_mesh_domain_3.h b/Mesh_3/include/CGAL/Labeled_mesh_domain_3.h index 04569f71ace..92604909871 100644 --- a/Mesh_3/include/CGAL/Labeled_mesh_domain_3.h +++ b/Mesh_3/include/CGAL/Labeled_mesh_domain_3.h @@ -622,7 +622,12 @@ public: * The weights image can be generated with `CGAL::Mesh_3::generate_label_weights()`. * Its dimensions must be the same as the dimensions of `parameters::image`.} * \cgalParamDefault{CGAL::Image_3()} - * \cgalParamExtra{if `features_detector` is provided, `weights` should be modified accordingly} + * \cgalParamType{CGAL::Image_3&} + * \cgalParamExtra{if `features_detector` is provided, `weights` should be modified accordingly. + * The available functors described in See \ref PkgMesh3FeatureDetection + * implement the necessary modifications.} + * \cgalParamExtra{if `input_features` is provided, `weights` should be modified accordingly + * to keep consistency of the output `MeshDomainWithFeatures_3`} * \cgalParamNEnd * \cgalParamNBegin{value_outside} * \cgalParamDescription{the value attached to voxels @@ -640,14 +645,20 @@ public: * \cgalParamNBegin{features_detector} * \cgalParamDescription{ a functor that implements * `std::vector> operator()(const Image_3& img) const`, + * and `std::vector> operator()(const Image_3& img, Image_3& weights) const`, * where `%Point` matches the mesh domain point type, - * that returns a range of detected polyline features for feature protection. + * that both return a range of detected polyline features for feature protection. + * Only one implementation is used, depending on whether the named parameter `weights` + * is provided or not. * Polyline features are added to the domain for further feature protection. * See \ref PkgMesh3FeatureDetection for available functors.} * \cgalParamDefault{CGAL::Null_functor()} * \cgalParamExtra{The return type of the function depends on whether this parameter - or `input_features` are provided or not.} - * \cgalParamExtra{TODO} + * or `input_features` are provided or not.} + * \cgalParamExtra{If `weights` is provided, it must either be adapted to the detected features, + * or post-processed during feature detection to keep consistency + * of the output `MeshDomainWithFeatures_3`. + * Available functors implement the necessary modifications.} * \cgalParamNEnd * * \cgalParamNBegin{input_features} @@ -661,13 +672,12 @@ public: or `input_features` are provided or not.} * \cgalParamExtra{It is recommended to pass a const-reference for this parameter, * possibly using `std::cref(polylines_range)` to avoid useless copies.} - * \cgalParamExtra{If `weights` is provided, this parameter is ignored} + * \cgalParamExtra{If `weights` is provided, it must be adapted to the input features, + * to keep consistency of the output `MeshDomainWithFeatures_3`} * \cgalParamNEnd * * \cgalNamedParamsEnd * - * \todo{Add warning about using weights and feature detection together} - * * \cgalHeading{Example} * * From the example (\ref Mesh_3/mesh_3D_image.cpp): @@ -689,7 +699,6 @@ public: * * \snippet Mesh_3/mesh_3D_image_with_input_features.cpp Domain creation * - * \todo what if `input_features` and `weights` are both provided? */ template static auto diff --git a/Mesh_3/include/CGAL/Mesh_3/Detect_features_in_image.h b/Mesh_3/include/CGAL/Mesh_3/Detect_features_in_image.h index 346b3fb2b23..e225a81fac2 100644 --- a/Mesh_3/include/CGAL/Mesh_3/Detect_features_in_image.h +++ b/Mesh_3/include/CGAL/Mesh_3/Detect_features_in_image.h @@ -298,7 +298,9 @@ public: } /*! - * @todo documentation + * Similar to the above function, + * but modifies `weights` to set the voxels that are + * part of a polyline feature to 0. */ template std::vector> diff --git a/Mesh_3/include/CGAL/Mesh_3/Detect_features_on_image_bbox.h b/Mesh_3/include/CGAL/Mesh_3/Detect_features_on_image_bbox.h index 62baf48fb1a..b46ae227e73 100644 --- a/Mesh_3/include/CGAL/Mesh_3/Detect_features_on_image_bbox.h +++ b/Mesh_3/include/CGAL/Mesh_3/Detect_features_on_image_bbox.h @@ -106,7 +106,9 @@ public: } /*! - * @todo documentation + * Similar to the above function, + * but modifies `weights` to set the voxels that are + * part of a polyline feature to 0. */ template std::vector>