From 18bf568569f292a3add7c14f6fe16742e88715ed Mon Sep 17 00:00:00 2001 From: Clement Jamin Date: Tue, 4 Nov 2014 22:50:38 +0100 Subject: [PATCH 01/12] Fix missing curly bracket --- Documentation/biblio/cgal_manual.bib | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Documentation/biblio/cgal_manual.bib b/Documentation/biblio/cgal_manual.bib index 17b89e34bff..3237a3e994f 100644 --- a/Documentation/biblio/cgal_manual.bib +++ b/Documentation/biblio/cgal_manual.bib @@ -2335,9 +2335,9 @@ ADDRESS = "Saarbr{\"u}cken, Germany" series = {Texts and Monographs in Symbolic Computation} } -@ARTICLE{WLOP2009, +@article{wlop-2009, title = {Consolidation of unorganized point clouds for surface reconstruction}, - author = H. Huang and D. Li and H. Zhang and U. Ascher and D. Cohen-Or}, + author = {H. Huang and D. Li and H. Zhang and U. Ascher and D. Cohen-Or}, journal = {ACM Transactions on Graphics}, volume = {28}, issue = {5}, @@ -2345,7 +2345,7 @@ ADDRESS = "Saarbr{\"u}cken, Germany" year = {2009} } -@ARTICLE{EAR2013 +@article{ear-2013, title = {Edge-Aware Point Set Resampling}, author = {H. Huang and S. Wu and M. Gong and D. Cohen-Or and U. Ascher and H. Zhang}, journal = {ACM Transactions on Graphics}, From 7f64df43bafee4f5c18b890770769388b75fe484 Mon Sep 17 00:00:00 2001 From: Clement Jamin Date: Tue, 4 Nov 2014 22:51:10 +0100 Subject: [PATCH 02/12] Use cgalCite --- .../doc/Point_set_processing_3/Point_set_processing_3.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Point_set_processing_3/doc/Point_set_processing_3/Point_set_processing_3.txt b/Point_set_processing_3/doc/Point_set_processing_3/Point_set_processing_3.txt index 8be5b1db879..b1d37c91597 100644 --- a/Point_set_processing_3/doc/Point_set_processing_3/Point_set_processing_3.txt +++ b/Point_set_processing_3/doc/Point_set_processing_3/Point_set_processing_3.txt @@ -143,10 +143,9 @@ one arbitrarily chosen point. This algorithm is slower than Function `wlop_simplify_and_regularize_point_set()` not only simplifies, but also regularizes downsampled points. This is an implementation of -the WLOP (Weighted Locally Optimal Projection) algorithm -[Huang et al. 2009]. +the Weighted Locally Optimal Projection (WLOP) algorithm \cgalCite{wlop-2009}. + - \subsection Point_set_processing_3Example_3 Grid simplification example The following example reads a point set and simplifies it by clustering. @@ -194,7 +193,8 @@ projecting each point onto a smooth parametric surface patch Function `bilateral_smooth_point_set()` smooths the input point set by iteratively projecting each point onto the implicit surface patch fitted over its `k` nearest neighbors. -Bilateral projection preserves sharp features according to the normal (gradient) information. Normals are thus required as input. See formula (2) and (4) in paper [Huang et al. 2013]. +Bilateral projection preserves sharp features according to the normal (gradient) information. +Normals are thus required as input. See formula (2) and (4) in \cgalCite{ear-2013}. \subsection Point_set_processing_3Example_5 Jet smoothing example From e33b778ec0f3ff223f0d31a0709d71a1267e2a28 Mon Sep 17 00:00:00 2001 From: Clement Jamin Date: Tue, 4 Nov 2014 23:01:07 +0100 Subject: [PATCH 03/12] update cgalCite refs --- .../include/CGAL/bilateral_smooth_point_set.h | 2 +- .../include/CGAL/edge_aware_upsample_point_set.h | 2 +- .../include/CGAL/wlop_simplify_and_regularize_point_set.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Point_set_processing_3/include/CGAL/bilateral_smooth_point_set.h b/Point_set_processing_3/include/CGAL/bilateral_smooth_point_set.h index e1eae332c5b..b8ab7ba84ad 100644 --- a/Point_set_processing_3/include/CGAL/bilateral_smooth_point_set.h +++ b/Point_set_processing_3/include/CGAL/bilateral_smooth_point_set.h @@ -323,7 +323,7 @@ public: /// point onto the implicit surface patch fitted over its k nearest neighbors. /// Bilateral projection preserves sharp features according to the normal /// (gradient) information. Both point positions and normals will be modified. -/// For more details, please see formula (2) and (4) in paper \cgalCite{EAR2013}. +/// For more details, please see formula (2) and (4) in paper \cgalCite{ear-2013}. /// \pre Normals must be unit vectors /// \pre k >= 2 /// diff --git a/Point_set_processing_3/include/CGAL/edge_aware_upsample_point_set.h b/Point_set_processing_3/include/CGAL/edge_aware_upsample_point_set.h index c3618443d02..46075b46b4d 100644 --- a/Point_set_processing_3/include/CGAL/edge_aware_upsample_point_set.h +++ b/Point_set_processing_3/include/CGAL/edge_aware_upsample_point_set.h @@ -274,7 +274,7 @@ update_new_point( /// approaching the edge singularities, which generates a denser point set that /// has applications in point-based rendering, hole filling, /// and sparse surface reconstruction. -/// For more details, please refert to this paper: \cgalCite{EAR2013}. +/// For more details, please refert to this paper: \cgalCite{ear-2013}. /// @tparam OutputIteratorValueType type of objects that in `OutputIterator`. /// It is default to `value_type_traits::%type` /// and can be omitted when the default is fine. It should contain both diff --git a/Point_set_processing_3/include/CGAL/wlop_simplify_and_regularize_point_set.h b/Point_set_processing_3/include/CGAL/wlop_simplify_and_regularize_point_set.h index 7bfdd4727a4..b4e70d2ea19 100644 --- a/Point_set_processing_3/include/CGAL/wlop_simplify_and_regularize_point_set.h +++ b/Point_set_processing_3/include/CGAL/wlop_simplify_and_regularize_point_set.h @@ -304,7 +304,7 @@ compute_density_weight_for_sample_point( /// dense point cloud. /// The core of the algorithm is a Weighted Locally Optimal projection operator /// with a density uniformization term. -/// For more details, please refer to this paper: \cgalCite{WLOP2009}. +/// For more details, please refer to this paper: \cgalCite{wlop-2009}. /// @tparam Concurrency_tag enables sequential versus parallel algorithm. /// Possible values are `Sequential_tag` /// and `Parallel_tag`. From 0f2fdb97d5eff60f7287bdac514e6518c9af845a Mon Sep 17 00:00:00 2001 From: Clement Jamin Date: Tue, 4 Nov 2014 23:17:31 +0100 Subject: [PATCH 04/12] Return output iterator + fix const --- .../CGAL/edge_aware_upsample_point_set.h | 21 +++++++++---------- .../wlop_simplify_and_regularize_point_set.h | 10 ++++----- 2 files changed, 15 insertions(+), 16 deletions(-) diff --git a/Point_set_processing_3/include/CGAL/edge_aware_upsample_point_set.h b/Point_set_processing_3/include/CGAL/edge_aware_upsample_point_set.h index 46075b46b4d..d5fb6cb469b 100644 --- a/Point_set_processing_3/include/CGAL/edge_aware_upsample_point_set.h +++ b/Point_set_processing_3/include/CGAL/edge_aware_upsample_point_set.h @@ -302,7 +302,7 @@ template -void +OutputIterator edge_aware_upsample_point_set( ForwardIterator first, ///< iterator over the first input point. ForwardIterator beyond, ///< past-the-end iterator over the input points. @@ -314,7 +314,7 @@ edge_aware_upsample_point_set( ///< control the preservation of sharp features. The bigger ///< the smoother the result will be. ///< The range of possible value is [0, 90]. - const typename Kernel::FT edge_senstivity, ///< + typename Kernel::FT edge_senstivity, ///< ///< larger values of edge-sensitivity give higher priority ///< to inserting points along the sharp features. ///< The range of possible value is [0, 1]. @@ -546,7 +546,7 @@ edge_aware_upsample_point_set( *output++ = pwn; } - return; + return output; } @@ -557,7 +557,7 @@ template -void +OutputIterator edge_aware_upsample_point_set( ForwardIterator first, ///< iterator over the first input point ForwardIterator beyond, ///< past-the-end iterator @@ -594,7 +594,7 @@ template -void +OutputIterator edge_aware_upsample_point_set( ForwardIterator first, ///< iterator over the first input point ForwardIterator beyond, ///< past-the-end iterator @@ -629,7 +629,7 @@ template -void +OutputIterator edge_aware_upsample_point_set( ForwardIterator first, ///< iterator over the first input point ForwardIterator beyond, ///< past-the-end iterator @@ -663,7 +663,7 @@ template -void +OutputIterator edge_aware_upsample_point_set( ForwardIterator first, ///< iterator over the first input point ForwardIterator beyond, ///< past-the-end iterator @@ -694,11 +694,10 @@ edge_aware_upsample_point_set( /// @cond SKIP_IN_MANUAL -template -bool +OutputIterator edge_aware_upsample_point_set( ForwardIterator first, ///< iterator over the first input point ForwardIterator beyond, ///< past-the-end iterator @@ -711,7 +710,7 @@ edge_aware_upsample_point_set( ) { // just deduce value_type of OutputIterator - return upsample_point_set + return edge_aware_upsample_point_set ::type>( first, beyond, output, diff --git a/Point_set_processing_3/include/CGAL/wlop_simplify_and_regularize_point_set.h b/Point_set_processing_3/include/CGAL/wlop_simplify_and_regularize_point_set.h index b4e70d2ea19..271b8fd519f 100644 --- a/Point_set_processing_3/include/CGAL/wlop_simplify_and_regularize_point_set.h +++ b/Point_set_processing_3/include/CGAL/wlop_simplify_and_regularize_point_set.h @@ -330,7 +330,7 @@ template -void +OutputIterator wlop_simplify_and_regularize_point_set( RandomAccessIterator first, ///< iterator over the first input point. RandomAccessIterator beyond, ///< past-the-end iterator over the input points. @@ -574,7 +574,7 @@ wlop_simplify_and_regularize_point_set( *output++ = *sample_iter; } - return; + return output; } /// @cond SKIP_IN_MANUAL @@ -585,7 +585,7 @@ template -void +OutputIterator wlop_simplify_and_regularize_point_set( RandomAccessIterator first, ///< iterator over the first input point RandomAccessIterator beyond, ///< past-the-end iterator @@ -623,7 +623,7 @@ template -void +OutputIterator wlop_simplify_and_regularize_point_set( RandomAccessIterator first, ///< iterator over the first input point RandomAccessIterator beyond, ///< past-the-end iterator @@ -659,7 +659,7 @@ wlop_simplify_and_regularize_point_set( template -void +OutputIterator wlop_simplify_and_regularize_point_set( RandomAccessIterator first, ///< iterator over the first input point RandomAccessIterator beyond, ///< past-the-end iterator From af24514f8fc01b418e2865134259bfd87bf8f7a0 Mon Sep 17 00:00:00 2001 From: Clement Jamin Date: Tue, 4 Nov 2014 23:26:07 +0100 Subject: [PATCH 05/12] Fix typos and sentences --- .../CGAL/edge_aware_upsample_point_set.h | 47 ++++++++++--------- 1 file changed, 24 insertions(+), 23 deletions(-) diff --git a/Point_set_processing_3/include/CGAL/edge_aware_upsample_point_set.h b/Point_set_processing_3/include/CGAL/edge_aware_upsample_point_set.h index d5fb6cb469b..1f02683e675 100644 --- a/Point_set_processing_3/include/CGAL/edge_aware_upsample_point_set.h +++ b/Point_set_processing_3/include/CGAL/edge_aware_upsample_point_set.h @@ -63,7 +63,7 @@ base_point_selection( const rich_grid_internal::Rich_point& query, ///< 3D point to project const std::vector >& neighbor_points,///< neighbor sample points - const typename Kernel::FT edge_senstivity,///< edge senstivity parameter + const typename Kernel::FT edge_sensitivity,///< edge senstivity parameter unsigned int& output_base_index ///< base point index ) { @@ -86,7 +86,7 @@ base_point_selection( Vector diff_v_t = t - v.pt; Point mid_point = v.pt + (diff_v_t * FT(0.5)); - FT dot_produce = std::pow((FT(2.0) - vm * tm), edge_senstivity); + FT dot_produce = std::pow((FT(2.0) - vm * tm), edge_sensitivity); Vector diff_t_mid = mid_point - t; FT project_t = diff_t_mid * tm; @@ -314,14 +314,15 @@ edge_aware_upsample_point_set( ///< control the preservation of sharp features. The bigger ///< the smoother the result will be. ///< The range of possible value is [0, 90]. - typename Kernel::FT edge_senstivity, ///< + typename Kernel::FT edge_sensitivity, ///< ///< larger values of edge-sensitivity give higher priority ///< to inserting points along the sharp features. ///< The range of possible value is [0, 1]. const typename Kernel::FT neighbor_radius, ///< ///< initial size of neighbors, ///< indicates the radius of the biggest hole that will be filled. - const unsigned int number_of_output,///< points number of the output. + const unsigned int number_of_output_points,///< required number of points in + ///< the output const Kernel& /*kernel*/ ///< geometric traits. ) { @@ -337,14 +338,14 @@ edge_aware_upsample_point_set( CGAL_point_set_processing_precondition(first != beyond); CGAL_point_set_processing_precondition(sharpness_angle >= 0 &&sharpness_angle <= 90); - CGAL_point_set_processing_precondition(edge_senstivity >= 0 - &&edge_senstivity <= 1); + CGAL_point_set_processing_precondition(edge_sensitivity >= 0 + &&edge_sensitivity <= 1); CGAL_point_set_processing_precondition(neighbor_radius > 0); - edge_senstivity *= 10; // just project [0, 1] to [0, 10]. + edge_sensitivity *= 10; // just project [0, 1] to [0, 10]. std::size_t number_of_input = std::distance(first, beyond); - CGAL_point_set_processing_precondition(number_of_output > number_of_input); + CGAL_point_set_processing_precondition(number_of_output_points > number_of_input); Timer task_timer; @@ -422,7 +423,7 @@ edge_aware_upsample_point_set( double density2 = upsample_internal:: base_point_selection(v, neighbor_rich_points, - edge_senstivity, + edge_sensitivity, base_index); sum_density += density2; count_density++; @@ -470,7 +471,7 @@ edge_aware_upsample_point_set( FT density2 = upsample_internal:: base_point_selection(v, neighbor_rich_points, - edge_senstivity, + edge_sensitivity, base_index); // test if it pass the density threshold @@ -506,7 +507,7 @@ edge_aware_upsample_point_set( current_radius, sharpness_bandwidth); - if (rich_point_set.size() >= number_of_output) + if (rich_point_set.size() >= number_of_output_points) { break; } @@ -516,14 +517,14 @@ edge_aware_upsample_point_set( #endif if (count_not_pass == 0 || loop >= max_loop_time || - rich_point_set.size() >= number_of_output) + rich_point_set.size() >= number_of_output_points) { break; } } - if (rich_point_set.size() >= number_of_output) + if (rich_point_set.size() >= number_of_output_points) { break; } @@ -565,7 +566,7 @@ edge_aware_upsample_point_set( PointPMap point_pmap, ///< property map: OutputIterator -> Point_3. NormalPMap normal_pmap, ///< property map: OutputIterator -> Vector_3. double sharpness_angle, ///< control sharpness(0-90) - double edge_senstivity, ///< edge senstivity(0-5) + double edge_sensitivity, ///< edge senstivity(0-5) double neighbor_radius, ///< initial size of neighbors. const unsigned int number_of_output_points,///< number of iterations. const Kernel& kernel) ///< geometric traits. @@ -578,7 +579,7 @@ edge_aware_upsample_point_set( point_pmap, normal_pmap, sharpness_angle, - edge_senstivity, + edge_sensitivity, neighbor_radius, number_of_output_points, kernel); @@ -602,7 +603,7 @@ edge_aware_upsample_point_set( PointPMap point_pmap, ///< property map: OutputIterator -> Point_3. NormalPMap normal_pmap, ///< property map: OutputIterator -> Vector_3. double sharpness_angle, ///< control sharpness(0-90) - double edge_senstivity, ///< edge senstivity(0-5) + double edge_sensitivity, ///< edge senstivity(0-5) double neighbor_radius, ///< initial size of neighbors. const unsigned int number_of_output_points///< number of iterations. ) @@ -616,7 +617,7 @@ edge_aware_upsample_point_set( point_pmap, normal_pmap, sharpness_angle, - edge_senstivity, + edge_sensitivity, neighbor_radius, number_of_output_points, Kernel()); @@ -637,7 +638,7 @@ edge_aware_upsample_point_set( PointPMap point_pmap, ///< property map: OutputIterator -> Point_3. NormalPMap normal_pmap, ///< property map: OutputIterator -> Vector_3. double sharpness_angle, ///< control sharpness(0-90) - double edge_senstivity, ///< edge senstivity(0-5) + double edge_sensitivity, ///< edge senstivity(0-5) double neighbor_radius, ///< initial size of neighbors. const unsigned int number_of_output_points///< number of iterations. ) @@ -650,7 +651,7 @@ edge_aware_upsample_point_set( point_pmap, normal_pmap, sharpness_angle, - edge_senstivity, + edge_sensitivity, neighbor_radius, number_of_output_points); } @@ -670,7 +671,7 @@ edge_aware_upsample_point_set( OutputIterator output, ///< output iterator over points. NormalPMap normal_pmap,///< property map: OutputIterator->Vector_3. double sharpness_angle, ///< control sharpness(0-90) - double edge_senstivity, ///< edge senstivity(0-5) + double edge_sensitivity, ///< edge senstivity(0-5) double neighbor_radius, ///< initial size of neighbors. const unsigned int number_of_output_points///< number of iterations. ) @@ -686,7 +687,7 @@ edge_aware_upsample_point_set( #endif normal_pmap, sharpness_angle, - edge_senstivity, + edge_sensitivity, neighbor_radius, number_of_output_points); } @@ -704,7 +705,7 @@ edge_aware_upsample_point_set( OutputIterator output, ///< output iterator over points. NormalPMap normal_pmap, ///< property map: OutputIterator -> Vector_3. double sharpness_angle, ///< control sharpness(0-90) - double edge_senstivity, ///< edge senstivity(0-5) + double edge_sensitivity, ///< edge senstivity(0-5) double neighbor_radius, ///< initial size of neighbors. const unsigned int number_of_output_points///< number of iterations. ) @@ -716,7 +717,7 @@ edge_aware_upsample_point_set( output, normal_pmap, sharpness_angle, - edge_senstivity, + edge_sensitivity, neighbor_radius, number_of_output_points); } From 6a09ac08e94509fa0c6f0db7249b76097f549db7 Mon Sep 17 00:00:00 2001 From: Clement Jamin Date: Tue, 4 Nov 2014 23:29:24 +0100 Subject: [PATCH 06/12] Redondant --- .../include/CGAL/edge_aware_upsample_point_set.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/Point_set_processing_3/include/CGAL/edge_aware_upsample_point_set.h b/Point_set_processing_3/include/CGAL/edge_aware_upsample_point_set.h index 1f02683e675..5efce645e91 100644 --- a/Point_set_processing_3/include/CGAL/edge_aware_upsample_point_set.h +++ b/Point_set_processing_3/include/CGAL/edge_aware_upsample_point_set.h @@ -290,9 +290,6 @@ update_new_point( /// @tparam Kernel Geometric traits class. /// It can be omitted and deduced automatically from PointPMap value_type. /// Kernel_traits are used for deducing the Kernel. - -/// @param output output iterator -/// /// // This variant requires all parameters. From a23848013f70b5617279d04149e9cd0ef152e7c4 Mon Sep 17 00:00:00 2001 From: Clement Jamin Date: Tue, 4 Nov 2014 23:32:25 +0100 Subject: [PATCH 07/12] Remove useless comma --- .../doc/Point_set_processing_3/Point_set_processing_3.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Point_set_processing_3/doc/Point_set_processing_3/Point_set_processing_3.txt b/Point_set_processing_3/doc/Point_set_processing_3/Point_set_processing_3.txt index b1d37c91597..d255a34ef5e 100644 --- a/Point_set_processing_3/doc/Point_set_processing_3/Point_set_processing_3.txt +++ b/Point_set_processing_3/doc/Point_set_processing_3/Point_set_processing_3.txt @@ -172,7 +172,7 @@ Computing density weights for each point is an optional preprocessing. For examp Comparison between with and without density: Left: input. Middle: `require_uniform_sampling = false`. Right: `require_uniform_sampling=true`. \cgalFigureEnd -\subsubsection Point_set_processing_3WLOP_parallel_performance Parallel Performance: +\subsubsection Point_set_processing_3WLOP_parallel_performance Parallel Performance A parallel version of WLOP is provided and requires the executable to be linked against the Intel TBB library. To control the number of threads used, the user may use the tbb::task_scheduler_init class. From 6aec1354d305f6ff44c098bc4e12ec02156114fc Mon Sep 17 00:00:00 2001 From: Clement Jamin Date: Tue, 4 Nov 2014 23:42:23 +0100 Subject: [PATCH 08/12] Add refs to the user manual + minor fixes --- .../include/CGAL/edge_aware_upsample_point_set.h | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/Point_set_processing_3/include/CGAL/edge_aware_upsample_point_set.h b/Point_set_processing_3/include/CGAL/edge_aware_upsample_point_set.h index 5efce645e91..6b8e3cc31da 100644 --- a/Point_set_processing_3/include/CGAL/edge_aware_upsample_point_set.h +++ b/Point_set_processing_3/include/CGAL/edge_aware_upsample_point_set.h @@ -308,18 +308,21 @@ edge_aware_upsample_point_set( PointPMap point_pmap, ///< property map: value_type of ForwardIterator -> Point_3 NormalPMap normal_pmap, ///< property map: value_type of ForwardIterator -> Vector_3. const typename Kernel::FT sharpness_angle, ///< - ///< control the preservation of sharp features. The bigger + ///< controls the preservation of sharp features. The bigger ///< the smoother the result will be. ///< The range of possible value is [0, 90]. + ///< See section \ref Point_set_processing_3Upsample_Parameter2 + ///< for an example. typename Kernel::FT edge_sensitivity, ///< ///< larger values of edge-sensitivity give higher priority ///< to inserting points along the sharp features. ///< The range of possible value is [0, 1]. + ///< See section \ref Point_set_processing_3Upsample_Parameter1 + ///< for an example. const typename Kernel::FT neighbor_radius, ///< - ///< initial size of neighbors, ///< indicates the radius of the biggest hole that will be filled. - const unsigned int number_of_output_points,///< required number of points in - ///< the output + const unsigned int number_of_output_points,///< required number of output + ///< points const Kernel& /*kernel*/ ///< geometric traits. ) { From b545546290b1ed32712f8b63c48482c5868ac915 Mon Sep 17 00:00:00 2001 From: Clement Jamin Date: Wed, 5 Nov 2014 09:50:43 +0100 Subject: [PATCH 09/12] Simplify output iterators (no property maps anymore) --- .../include/CGAL/bilateral_smooth_point_set.h | 4 +- .../CGAL/edge_aware_upsample_point_set.h | 150 ++---------------- .../wlop_simplify_and_regularize_point_set.h | 69 +++----- 3 files changed, 44 insertions(+), 179 deletions(-) diff --git a/Point_set_processing_3/include/CGAL/bilateral_smooth_point_set.h b/Point_set_processing_3/include/CGAL/bilateral_smooth_point_set.h index b8ab7ba84ad..881881e41d9 100644 --- a/Point_set_processing_3/include/CGAL/bilateral_smooth_point_set.h +++ b/Point_set_processing_3/include/CGAL/bilateral_smooth_point_set.h @@ -331,11 +331,11 @@ public: /// Possible values are `Sequential_tag` /// and `Parallel_tag`. /// @tparam ForwardIterator iterator over input points. -/// @tparam PointPMap is a model of `WritablePropertyMap` +/// @tparam PointPMap is a model of `ReadablePropertyMap` /// with a value_type = Point_3. /// It can be omitted if ForwardIterator::value_type is convertible to /// Point_3. -/// @tparam NormalPMap is a model of `WritablePropertyMap` +/// @tparam NormalPMap is a model of `ReadablePropertyMap` /// with a value_type = Vector_3. /// @tparam Kernel Geometric traits class. /// It can be omitted and deduced automatically from PointPMap value_type. diff --git a/Point_set_processing_3/include/CGAL/edge_aware_upsample_point_set.h b/Point_set_processing_3/include/CGAL/edge_aware_upsample_point_set.h index 6b8e3cc31da..0d09b81c251 100644 --- a/Point_set_processing_3/include/CGAL/edge_aware_upsample_point_set.h +++ b/Point_set_processing_3/include/CGAL/edge_aware_upsample_point_set.h @@ -29,6 +29,7 @@ #include #include +#include #include #if BOOST_VERSION >= 104000 @@ -275,17 +276,18 @@ update_new_point( /// has applications in point-based rendering, hole filling, /// and sparse surface reconstruction. /// For more details, please refert to this paper: \cgalCite{ear-2013}. -/// @tparam OutputIteratorValueType type of objects that in `OutputIterator`. -/// It is default to `value_type_traits::%type` -/// and can be omitted when the default is fine. It should contain both -/// points position and normal information. -/// @tparam OutputIterator output iterator where output points (and normals) are put. +/// @tparam OutputIterator Type of the output iterator. +/// The type of the objects is +/// std::pair. +/// Note that the user may use a +/// function_output_iterator +/// to output objects with a different type. /// @tparam ForwardIterator iterator over input points. -/// @tparam PointPMap is a model of `WritablePropertyMap` +/// @tparam PointPMap is a model of `ReadablePropertyMap` /// with a value_type = Point_3. /// It can be omitted if ForwardIterator::value_type is convertible to /// Point_3. -/// @tparam NormalPMap is a model of `WritablePropertyMap` +/// @tparam NormalPMap is a model of `ReadablePropertyMap` /// with a value_type = Vector_3. /// @tparam Kernel Geometric traits class. /// It can be omitted and deduced automatically from PointPMap value_type. @@ -293,8 +295,7 @@ update_new_point( /// // This variant requires all parameters. -template Point_3 NormalPMap normal_pmap, ///< property map: value_type of ForwardIterator -> Vector_3. const typename Kernel::FT sharpness_angle, ///< @@ -326,13 +327,13 @@ edge_aware_upsample_point_set( const Kernel& /*kernel*/ ///< geometric traits. ) { - typedef OutputIteratorValueType Point_with_normal; - // basic geometric types typedef typename Kernel::Point_3 Point; typedef typename Kernel::Vector_3 Vector; typedef typename Kernel::FT FT; typedef typename rich_grid_internal::Rich_point Rich_point; + typedef std::pair Point_with_normal; + // preconditions CGAL_point_set_processing_precondition(first != beyond); @@ -535,63 +536,16 @@ edge_aware_upsample_point_set( Rich_point& v = rich_point_set[i]; Point point = v.pt; Vector normal = v.normal; - - Point_with_normal pwn; -#ifdef CGAL_USE_PROPERTY_MAPS_API_V1 - put(point_pmap, &pwn, point); // point_pmap[&pwn] = point - put(normal_pmap, &pwn, normal); // normal_pmap[&pwn] = normal -#else - put(point_pmap, pwn, point); // point_pmap[pwn] = point - put(normal_pmap, pwn, normal); // normal_pmap[pwn] = normal -#endif - *output++ = pwn; + *output++ = std::make_pair(point, normal); } return output; } - -/// @cond SKIP_IN_MANUAL -template -OutputIterator -edge_aware_upsample_point_set( - ForwardIterator first, ///< iterator over the first input point - ForwardIterator beyond, ///< past-the-end iterator - OutputIterator output, ///< output iterator over points. - PointPMap point_pmap, ///< property map: OutputIterator -> Point_3. - NormalPMap normal_pmap, ///< property map: OutputIterator -> Vector_3. - double sharpness_angle, ///< control sharpness(0-90) - double edge_sensitivity, ///< edge senstivity(0-5) - double neighbor_radius, ///< initial size of neighbors. - const unsigned int number_of_output_points,///< number of iterations. - const Kernel& kernel) ///< geometric traits. -{ - // just deduce value_type of OutputIterator - return edge_aware_upsample_point_set - ::type>( - first, beyond, - output, - point_pmap, - normal_pmap, - sharpness_angle, - edge_sensitivity, - neighbor_radius, - number_of_output_points, - kernel); -} -/// @endcond - - - /// @cond SKIP_IN_MANUAL // This variant deduces the kernel from the point property map. -template @@ -610,8 +564,7 @@ edge_aware_upsample_point_set( { typedef typename boost::property_traits::value_type Point; typedef typename Kernel_traits::Kernel Kernel; - return edge_aware_upsample_point_set - ( + return edge_aware_upsample_point_set( first, beyond, output, point_pmap, @@ -625,75 +578,6 @@ edge_aware_upsample_point_set( /// @endcond -/// @cond SKIP_IN_MANUAL -template -OutputIterator -edge_aware_upsample_point_set( - ForwardIterator first, ///< iterator over the first input point - ForwardIterator beyond, ///< past-the-end iterator - OutputIterator output, ///< output iterator over points. - PointPMap point_pmap, ///< property map: OutputIterator -> Point_3. - NormalPMap normal_pmap, ///< property map: OutputIterator -> Vector_3. - double sharpness_angle, ///< control sharpness(0-90) - double edge_sensitivity, ///< edge senstivity(0-5) - double neighbor_radius, ///< initial size of neighbors. - const unsigned int number_of_output_points///< number of iterations. - ) -{ - // just deduce value_type of OutputIterator - return edge_aware_upsample_point_set - ::type>(// not sure - first, beyond, - output, - point_pmap, - normal_pmap, - sharpness_angle, - edge_sensitivity, - neighbor_radius, - number_of_output_points); -} -/// @endcond - - -/// @cond SKIP_IN_MANUAL -// This variant creates a default point property map = Identity_property_map. -template -OutputIterator -edge_aware_upsample_point_set( - ForwardIterator first, ///< iterator over the first input point - ForwardIterator beyond, ///< past-the-end iterator - OutputIterator output, ///< output iterator over points. - NormalPMap normal_pmap,///< property map: OutputIterator->Vector_3. - double sharpness_angle, ///< control sharpness(0-90) - double edge_sensitivity, ///< edge senstivity(0-5) - double neighbor_radius, ///< initial size of neighbors. - const unsigned int number_of_output_points///< number of iterations. - ) -{ - return edge_aware_upsample_point_set - ( - first, beyond, - output, -#ifdef CGAL_USE_PROPERTY_MAPS_API_V1 - make_dereference_property_map(output), -#else - make_identity_property_map(OutputIteratorValueType()), -#endif - normal_pmap, - sharpness_angle, - edge_sensitivity, - neighbor_radius, - number_of_output_points); -} -/// @endcond - - /// @cond SKIP_IN_MANUAL template ::%type` -/// and can be omitted when the default is fine. -/// @tparam OutputIterator iterator over output points. +/// @tparam OutputIterator Type of the output iterator. +/// The type of the objects is Kernel::Point_3. /// @tparam RandomAccessIterator iterator over input points. -/// @tparam PointPMapIn is a model of `WritablePropertyMap` +/// @tparam PointPMap is a model of `ReadablePropertyMap` /// with a value_type = Point_3. /// It can be omitted if RandomAccessIterator value_type is convertible /// to Point_3. -/// @tparam PointPMapOut counterpart of PointPMapIn. /// @tparam Kernel Geometric traits class. /// It can be omitted and deduced automatically from PointPMap value_type. /// Kernel_traits are used for deducing the Kernel. // This variant requires all parameters. template OutputIterator wlop_simplify_and_regularize_point_set( RandomAccessIterator first, ///< iterator over the first input point. RandomAccessIterator beyond, ///< past-the-end iterator over the input points. - OutputIterator output, ///< add back-inserter - PointPMapIn point_pmap_input, ///< property map: value_type of + OutputIterator output, ///< output iterator where output points are put. + PointPMap point_pmap, ///< property map: value_type of ///< RandomAccessIterator -> Point_3 - PointPMapOut point_pmap_output, ///< property map: value_type of - ///< OutputIterator -> Point_3 double select_percentage, ///< percentage of points to retain. ///< Default: 5%. double radius, ///< neighbors radius. @@ -398,9 +391,9 @@ wlop_simplify_and_regularize_point_set( for(it = first_sample_iter; it != beyond; ++it) { #ifdef CGAL_USE_PROPERTY_MAPS_API_V1 - sample_points.push_back(get(point_pmap_input, it)); + sample_points.push_back(get(point_pmap, it)); #else - sample_points.push_back(get(point_pmap_input, *it)); + sample_points.push_back(get(point_pmap, *it)); #endif } @@ -411,9 +404,9 @@ wlop_simplify_and_regularize_point_set( for (RandomAccessIterator temp = first; temp != beyond; ++temp) { #ifdef CGAL_USE_PROPERTY_MAPS_API_V1 - Point original_p = get(point_pmap_input, temp); + Point original_p = get(point_pmap, temp); #else - Point original_p = get(point_pmap_input, *temp); + Point original_p = get(point_pmap, *temp); #endif bbox += original_p.bbox(); } @@ -456,9 +449,9 @@ wlop_simplify_and_regularize_point_set( compute_density_weight_for_original_point ( #ifdef CGAL_USE_PROPERTY_MAPS_API_V1 - get(point_pmap_input, cur), + get(point_pmap, cur), #else - get(point_pmap_input, *cur), + get(point_pmap, *cur), #endif orignal_aabb_tree, radius2); @@ -476,9 +469,9 @@ wlop_simplify_and_regularize_point_set( compute_density_weight_for_original_point ( #ifdef CGAL_USE_PROPERTY_MAPS_API_V1 - get(point_pmap_input, it), + get(point_pmap, it), #else - get(point_pmap_input, *it), + get(point_pmap, *it), #endif orignal_aabb_tree, radius2); @@ -580,18 +573,15 @@ wlop_simplify_and_regularize_point_set( /// @cond SKIP_IN_MANUAL // This variant deduces the kernel from the iterator type. template + typename PointPMap> OutputIterator wlop_simplify_and_regularize_point_set( RandomAccessIterator first, ///< iterator over the first input point RandomAccessIterator beyond, ///< past-the-end iterator OutputIterator output, ///< add back-inserter - PointPMapIn point_pmap_input, ///< property map RandomAccessIterator -> Point_3 - PointPMapOut point_pmap_output, ///< property map OutputIterator + PointPMap point_pmap, ///< property map RandomAccessIterator -> Point_3 const double select_percentage, ///< percentage of points to retain double neighbor_radius, ///< size of neighbors. const unsigned int max_iter_number, ///< number of iterations. @@ -599,14 +589,13 @@ wlop_simplify_and_regularize_point_set( /// to generate more rugularized result. ) { - typedef typename boost::property_traits::value_type Point; + typedef typename boost::property_traits::value_type Point; typedef typename Kernel_traits::Kernel Kernel; - typedef typename value_type_traits::type OutputIteratorType; - return wlop_simplify_and_regularize_point_set - ( + + return wlop_simplify_and_regularize_point_set( first, beyond, output, - point_pmap_input, + point_pmap, point_pmap_output, select_percentage, neighbor_radius, @@ -618,8 +607,7 @@ wlop_simplify_and_regularize_point_set( /// @cond SKIP_IN_MANUAL /// This variant creates a default point property map=Dereference_property_map. -template @@ -628,7 +616,7 @@ wlop_simplify_and_regularize_point_set( RandomAccessIterator first, ///< iterator over the first input point RandomAccessIterator beyond, ///< past-the-end iterator OutputIterator output, ///< add back-inserter - PointPMap point_pmap_input, ///< property map RandomAccessIterator -> Point_3 + PointPMap point_pmap, ///< property map RandomAccessIterator -> Point_3 const double select_percentage = 5, ///< percentage of points to retain double neighbor_radius = -1, ///< size of neighbors. const unsigned int max_iter_number = 35, ///< number of iterations. @@ -637,15 +625,10 @@ wlop_simplify_and_regularize_point_set( ) { return wlop_simplify_and_regularize_point_set - ( + ( first, beyond, output, - point_pmap_input, - #ifdef CGAL_USE_PROPERTY_MAPS_API_V1 - make_dereference_property_map(output), - #else - make_identity_property_map(OutputIteratorValueType()), - #endif + point_pmap, select_percentage, neighbor_radius, max_iter_number, @@ -671,9 +654,7 @@ wlop_simplify_and_regularize_point_set( ///to generate a more uniform result. ) { - typedef typename value_type_traits::type OutputIteratorType; - return wlop_simplify_and_regularize_point_set - ( + return wlop_simplify_and_regularize_point_set( first, beyond, output, #ifdef CGAL_USE_PROPERTY_MAPS_API_V1 From 27237f86549ffe844a0cb0a1ebe7629a40ce00f2 Mon Sep 17 00:00:00 2001 From: Clement Jamin Date: Wed, 5 Nov 2014 10:27:02 +0100 Subject: [PATCH 10/12] Doc improvements --- .../include/CGAL/bilateral_smooth_point_set.h | 8 ++++---- .../CGAL/edge_aware_upsample_point_set.h | 4 ++-- .../wlop_simplify_and_regularize_point_set.h | 18 +++++++++--------- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/Point_set_processing_3/include/CGAL/bilateral_smooth_point_set.h b/Point_set_processing_3/include/CGAL/bilateral_smooth_point_set.h index 881881e41d9..847fbe2eaf0 100644 --- a/Point_set_processing_3/include/CGAL/bilateral_smooth_point_set.h +++ b/Point_set_processing_3/include/CGAL/bilateral_smooth_point_set.h @@ -342,8 +342,8 @@ public: /// Kernel_traits are used for deducing the Kernel. /// /// @return Average point movement error. It's a convergence criterium for the algorithm. -/// This value could help user decide how many times of iteration is -/// sufficient. +/// This value can help the user to decide how many iterations are +/// sufficient. // This variant requires all parameters. template double bilateral_smooth_point_set( - ForwardIterator first, ///< iterator over the first input point. - ForwardIterator beyond, ///< past-the-end iterator over the input points. + ForwardIterator first, ///< forward iterator to the first input point. + ForwardIterator beyond, ///< iterator to the past-the-end input point. PointPMap point_pmap, ///< property map: value_type of ForwardIterator -> Point_3. NormalPMap normal_pmap, ///< property map: value_type of ForwardIterator -> Vector_3. unsigned int k, ///< size of neighborhood. The bigger the smoother the result will be. diff --git a/Point_set_processing_3/include/CGAL/edge_aware_upsample_point_set.h b/Point_set_processing_3/include/CGAL/edge_aware_upsample_point_set.h index 0d09b81c251..4ac45817828 100644 --- a/Point_set_processing_3/include/CGAL/edge_aware_upsample_point_set.h +++ b/Point_set_processing_3/include/CGAL/edge_aware_upsample_point_set.h @@ -551,8 +551,8 @@ template OutputIterator edge_aware_upsample_point_set( - ForwardIterator first, ///< iterator over the first input point - ForwardIterator beyond, ///< past-the-end iterator + ForwardIterator first, ///< forward iterator to the first input point. + ForwardIterator beyond, ///< past-the-end iterator. OutputIterator output, ///< output iterator over points. PointPMap point_pmap, ///< property map: OutputIterator -> Point_3. NormalPMap normal_pmap, ///< property map: OutputIterator -> Vector_3. diff --git a/Point_set_processing_3/include/CGAL/wlop_simplify_and_regularize_point_set.h b/Point_set_processing_3/include/CGAL/wlop_simplify_and_regularize_point_set.h index fb4bed4545f..dd34f246f7e 100644 --- a/Point_set_processing_3/include/CGAL/wlop_simplify_and_regularize_point_set.h +++ b/Point_set_processing_3/include/CGAL/wlop_simplify_and_regularize_point_set.h @@ -327,8 +327,8 @@ template OutputIterator wlop_simplify_and_regularize_point_set( - RandomAccessIterator first, ///< iterator over the first input point. - RandomAccessIterator beyond, ///< past-the-end iterator over the input points. + RandomAccessIterator first, ///< random-access iterator to the first input point. + RandomAccessIterator beyond, ///< past-the-end iterator. OutputIterator output, ///< output iterator where output points are put. PointPMap point_pmap, ///< property map: value_type of ///< RandomAccessIterator -> Point_3 @@ -613,10 +613,10 @@ template OutputIterator wlop_simplify_and_regularize_point_set( - RandomAccessIterator first, ///< iterator over the first input point - RandomAccessIterator beyond, ///< past-the-end iterator - OutputIterator output, ///< add back-inserter - PointPMap point_pmap, ///< property map RandomAccessIterator -> Point_3 + RandomAccessIterator first, ///< forward iterator to the first input point. + RandomAccessIterator beyond, ///< past-the-end iterator. + OutputIterator output, ///< add back-inserter + PointPMap point_pmap, ///< property map RandomAccessIterator -> Point_3 const double select_percentage = 5, ///< percentage of points to retain double neighbor_radius = -1, ///< size of neighbors. const unsigned int max_iter_number = 35, ///< number of iterations. @@ -644,9 +644,9 @@ template OutputIterator wlop_simplify_and_regularize_point_set( - RandomAccessIterator first, ///< iterator over the first input point - RandomAccessIterator beyond, ///< past-the-end iterator - OutputIterator output, ///< add back-inserter + RandomAccessIterator first, ///< iterator to the first input point. + RandomAccessIterator beyond, ///< past-the-end iterator. + OutputIterator output, ///< add back-inserter. const double select_percentage = 5, ///< percentage of points to retain double neighbor_radius = -1, ///< size of neighbors. const unsigned int max_iter_number = 35, ///< number of iterations. From b207f6a364565932317152d19adc3432716f644b Mon Sep 17 00:00:00 2001 From: Clement Jamin Date: Wed, 5 Nov 2014 10:51:12 +0100 Subject: [PATCH 11/12] General pass on the ref manual --- .../include/CGAL/bilateral_smooth_point_set.h | 37 ++++++++++--------- .../CGAL/edge_aware_upsample_point_set.h | 35 +++++++++--------- .../wlop_simplify_and_regularize_point_set.h | 28 +++++++------- 3 files changed, 52 insertions(+), 48 deletions(-) diff --git a/Point_set_processing_3/include/CGAL/bilateral_smooth_point_set.h b/Point_set_processing_3/include/CGAL/bilateral_smooth_point_set.h index 847fbe2eaf0..e82f3308061 100644 --- a/Point_set_processing_3/include/CGAL/bilateral_smooth_point_set.h +++ b/Point_set_processing_3/include/CGAL/bilateral_smooth_point_set.h @@ -332,14 +332,14 @@ public: /// and `Parallel_tag`. /// @tparam ForwardIterator iterator over input points. /// @tparam PointPMap is a model of `ReadablePropertyMap` -/// with a value_type = Point_3. -/// It can be omitted if ForwardIterator::value_type is convertible to -/// Point_3. +/// with a value_type = `Kernel::Point_3`. +/// It can be omitted if `ForwardIterator::value_type` is convertible to +/// `Kernel::Point_3`. /// @tparam NormalPMap is a model of `ReadablePropertyMap` -/// with a value_type = Vector_3. +/// with a value_type = `Kernel::Vector_3`. /// @tparam Kernel Geometric traits class. -/// It can be omitted and deduced automatically from PointPMap value_type. -/// Kernel_traits are used for deducing the Kernel. +/// It can be omitted and deduced automatically from PointPMap's value_type. +/// `Kernel_traits` are used for deducing the kernel. /// /// @return Average point movement error. It's a convergence criterium for the algorithm. /// This value can help the user to decide how many iterations are @@ -354,12 +354,13 @@ template Point_3. NormalPMap normal_pmap, ///< property map: value_type of ForwardIterator -> Vector_3. - unsigned int k, ///< size of neighborhood. The bigger the smoother the result will be. - typename Kernel::FT sharpness_angle, ///< control sharpness of the result, - ///< the bigger the smoother the result will be. + unsigned int k, ///< size of neighborhood. The bigger the value is, + ///< the smoother the result will be. + typename Kernel::FT sharpness_angle, ///< control sharpness of the result. + ///< The bigger the value is, the smoother the result will be. ///< The range of possible value is [0, 90]. const Kernel& /*kernel*/) ///< geometric traits. { @@ -575,9 +576,9 @@ template double bilateral_smooth_point_set( - ForwardIterator first, ///< first input point. - ForwardIterator beyond, ///< past-the-end input point. - PointPMap point_pmap, ///< property map OutputIterator -> Point_3. + ForwardIterator first, ///< forward iterator to the first input point. + ForwardIterator beyond, ///< past-the-end iterator. + PointPMap point_pmap, ///< property map OutputIterator -> Point_3. NormalPMap normal_pmap, ///< property map ForwardIterator -> Vector_3. const unsigned int k, ///< number of neighbors. double sharpness_angle ///< control sharpness(0-90) @@ -602,11 +603,11 @@ template double bilateral_smooth_point_set( - ForwardIterator first, ///< first input point. - ForwardIterator beyond, ///< past-the-end input point. - const unsigned int k, ///< number of neighbors. - double sharpness_angle, ///< control sharpness(0-90) - NormalPMap normal_pmap) ///< property map OutputIterator -> Vector_3. + ForwardIterator first, ///< forward iterator to the first input point. + ForwardIterator beyond, ///< past-the-end iterator. + const unsigned int k, ///< number of neighbors. + double sharpness_angle, ///< control sharpness(0-90) + NormalPMap normal_pmap) ///< property map OutputIterator -> Vector_3. { return bilateral_smooth_point_set( first, beyond, diff --git a/Point_set_processing_3/include/CGAL/edge_aware_upsample_point_set.h b/Point_set_processing_3/include/CGAL/edge_aware_upsample_point_set.h index 4ac45817828..3ec0cd9e26f 100644 --- a/Point_set_processing_3/include/CGAL/edge_aware_upsample_point_set.h +++ b/Point_set_processing_3/include/CGAL/edge_aware_upsample_point_set.h @@ -271,27 +271,27 @@ update_new_point( // ---------------------------------------------------------------------------- /// \ingroup PkgPointSetProcessing -/// This method progressively upsample the point set while +/// This method progressively upsamples the point set while /// approaching the edge singularities, which generates a denser point set that /// has applications in point-based rendering, hole filling, /// and sparse surface reconstruction. -/// For more details, please refert to this paper: \cgalCite{ear-2013}. +/// For more details, please refert to \cgalCite{ear-2013}. /// @tparam OutputIterator Type of the output iterator. /// The type of the objects is -/// std::pair. +/// `std::pair`. /// Note that the user may use a /// function_output_iterator /// to output objects with a different type. /// @tparam ForwardIterator iterator over input points. /// @tparam PointPMap is a model of `ReadablePropertyMap` -/// with a value_type = Point_3. +/// with a value_type = `Kernel::Point_3`. /// It can be omitted if ForwardIterator::value_type is convertible to -/// Point_3. +/// `Kernel::Point_3`. /// @tparam NormalPMap is a model of `ReadablePropertyMap` -/// with a value_type = Vector_3. +/// with a value_type = `Kernel::Vector_3`. /// @tparam Kernel Geometric traits class. -/// It can be omitted and deduced automatically from PointPMap value_type. -/// Kernel_traits are used for deducing the Kernel. +/// It can be omitted and deduced automatically from PointPMap's value_type. +/// `Kernel_traits` are used for deducing the kernel. /// // This variant requires all parameters. @@ -302,22 +302,23 @@ template OutputIterator edge_aware_upsample_point_set( - ForwardIterator first, ///< iterator over the first input point. - ForwardIterator beyond, ///< past-the-end iterator over the input points. + ForwardIterator first, ///< forward iterator to the first input point. + ForwardIterator beyond, ///< past-the-end iterator. OutputIterator output, ///< output iterator where output points and normals ///< are put. - PointPMap point_pmap, ///< property map: value_type of ForwardIterator -> Point_3 - NormalPMap normal_pmap, ///< property map: value_type of ForwardIterator -> Vector_3. + PointPMap point_pmap, ///< property map: value_type of `ForwardIterator` -> `Kernel::Point_3` + NormalPMap normal_pmap, ///< property map: value_type of `ForwardIterator` -> `Kernel::Vector_3`. const typename Kernel::FT sharpness_angle, ///< - ///< controls the preservation of sharp features. The bigger + ///< controls the preservation of sharp features. + ///< The bigger the value is, ///< the smoother the result will be. ///< The range of possible value is [0, 90]. ///< See section \ref Point_set_processing_3Upsample_Parameter2 ///< for an example. typename Kernel::FT edge_sensitivity, ///< ///< larger values of edge-sensitivity give higher priority - ///< to inserting points along the sharp features. - ///< The range of possible value is [0, 1]. + ///< to inserting points along sharp features. + ///< The range of possible values is [0, 1]. ///< See section \ref Point_set_processing_3Upsample_Parameter1 ///< for an example. const typename Kernel::FT neighbor_radius, ///< @@ -554,8 +555,8 @@ edge_aware_upsample_point_set( ForwardIterator first, ///< forward iterator to the first input point. ForwardIterator beyond, ///< past-the-end iterator. OutputIterator output, ///< output iterator over points. - PointPMap point_pmap, ///< property map: OutputIterator -> Point_3. - NormalPMap normal_pmap, ///< property map: OutputIterator -> Vector_3. + PointPMap point_pmap, ///< property map: `ForwardIterator` -> Point_3. + NormalPMap normal_pmap, ///< property map: `ForwardIterator` -> Vector_3. double sharpness_angle, ///< control sharpness(0-90) double edge_sensitivity, ///< edge senstivity(0-5) double neighbor_radius, ///< initial size of neighbors. diff --git a/Point_set_processing_3/include/CGAL/wlop_simplify_and_regularize_point_set.h b/Point_set_processing_3/include/CGAL/wlop_simplify_and_regularize_point_set.h index dd34f246f7e..f9b4273d455 100644 --- a/Point_set_processing_3/include/CGAL/wlop_simplify_and_regularize_point_set.h +++ b/Point_set_processing_3/include/CGAL/wlop_simplify_and_regularize_point_set.h @@ -304,20 +304,20 @@ compute_density_weight_for_sample_point( /// dense point cloud. /// The core of the algorithm is a Weighted Locally Optimal projection operator /// with a density uniformization term. -/// For more details, please refer to this paper: \cgalCite{wlop-2009}. +/// For more details, please refer to \cgalCite{wlop-2009}. /// @tparam Concurrency_tag enables sequential versus parallel algorithm. /// Possible values are `Sequential_tag` /// and `Parallel_tag`. /// @tparam OutputIterator Type of the output iterator. -/// The type of the objects is Kernel::Point_3. -/// @tparam RandomAccessIterator iterator over input points. +/// The type of the objects is `Kernel::Point_3`. +/// @tparam RandomAccessIterator Iterator over input points. /// @tparam PointPMap is a model of `ReadablePropertyMap` -/// with a value_type = Point_3. +/// with a value_type = `Kernel::Point_3`. /// It can be omitted if RandomAccessIterator value_type is convertible -/// to Point_3. +/// to `Kernel::Point_3`. /// @tparam Kernel Geometric traits class. -/// It can be omitted and deduced automatically from PointPMap value_type. -/// Kernel_traits are used for deducing the Kernel. +/// It can be omitted and deduced automatically from PointPMap's value_type. +/// `Kernel_traits` are used for deducing the kernel. // This variant requires all parameters. template Point_3 + ///< `RandomAccessIterator` -> `Kernel::Point_3` double select_percentage, ///< percentage of points to retain. ///< Default: 5%. double radius, ///< neighbors radius. - ///< key parameter that need to be fine tune. + ///< key parameter that needs to be finely tuned. ///< The result will be irregular if this value is too small. ///< The process will be slow, and the result will be ///< too smooth if this value is too big. - ///< Usually, a radius that containing "4 rings" of + ///< Usually, a radius containing the "4 ring" of ///< neighbor points is a good start. ///< Default: 0.05 * diameter of bounding box. unsigned int iter_number, ///< number of iterations. Default: 35. - ///< the more iterations, the more regular the result will be. - bool require_uniform_sampling,///< an optional preprocessing, turn it on if the distribution - ///< of input is highly nonuniform. Default: false. + ///< More iterations give a more regular result. + bool require_uniform_sampling,///< an optional preprocessing, which should be + ///< turned on if the distribution + ///< of the input points is highly nonuniform. + ///< Default: false. const Kernel& ///< geometric traits. ) { From af7db507315303f7b6a073bc43aab82bdc752b32 Mon Sep 17 00:00:00 2001 From: Clement Jamin Date: Wed, 5 Nov 2014 10:55:51 +0100 Subject: [PATCH 12/12] A few more doc fixes --- .../include/CGAL/edge_aware_upsample_point_set.h | 2 +- .../include/CGAL/wlop_simplify_and_regularize_point_set.h | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Point_set_processing_3/include/CGAL/edge_aware_upsample_point_set.h b/Point_set_processing_3/include/CGAL/edge_aware_upsample_point_set.h index 3ec0cd9e26f..c8a51ca4655 100644 --- a/Point_set_processing_3/include/CGAL/edge_aware_upsample_point_set.h +++ b/Point_set_processing_3/include/CGAL/edge_aware_upsample_point_set.h @@ -275,7 +275,7 @@ update_new_point( /// approaching the edge singularities, which generates a denser point set that /// has applications in point-based rendering, hole filling, /// and sparse surface reconstruction. -/// For more details, please refert to \cgalCite{ear-2013}. +/// For more details, please refer to \cgalCite{ear-2013}. /// @tparam OutputIterator Type of the output iterator. /// The type of the objects is /// `std::pair`. diff --git a/Point_set_processing_3/include/CGAL/wlop_simplify_and_regularize_point_set.h b/Point_set_processing_3/include/CGAL/wlop_simplify_and_regularize_point_set.h index f9b4273d455..2d1e1096e24 100644 --- a/Point_set_processing_3/include/CGAL/wlop_simplify_and_regularize_point_set.h +++ b/Point_set_processing_3/include/CGAL/wlop_simplify_and_regularize_point_set.h @@ -333,7 +333,7 @@ wlop_simplify_and_regularize_point_set( PointPMap point_pmap, ///< property map: value_type of ///< `RandomAccessIterator` -> `Kernel::Point_3` double select_percentage, ///< percentage of points to retain. - ///< Default: 5%. + ///< %Default: 5\%. double radius, ///< neighbors radius. ///< key parameter that needs to be finely tuned. ///< The result will be irregular if this value is too small. @@ -341,13 +341,13 @@ wlop_simplify_and_regularize_point_set( ///< too smooth if this value is too big. ///< Usually, a radius containing the "4 ring" of ///< neighbor points is a good start. - ///< Default: 0.05 * diameter of bounding box. - unsigned int iter_number, ///< number of iterations. Default: 35. + ///< %Default: 0.05 * diameter of bounding box. + unsigned int iter_number, ///< number of iterations. %Default: 35. ///< More iterations give a more regular result. bool require_uniform_sampling,///< an optional preprocessing, which should be ///< turned on if the distribution ///< of the input points is highly nonuniform. - ///< Default: false. + ///< %Default: false. const Kernel& ///< geometric traits. ) {