From 87e3e65ddba74b5d12d15b06a577fb8e172d7ff7 Mon Sep 17 00:00:00 2001 From: Laurent Saboret Date: Tue, 21 Apr 2009 14:10:02 +0000 Subject: [PATCH] Changes after Surface_reconstruction_points_3/Point_set_processing_3 submission review by AF (3): * Renamed functions part of the public API: average_spacing_3 -> compute_average_spacing read_off_point_set -> read_off_point_set read_xyz_point_set -> read_xyz_point_set write_off_point_set -> write_off_point_set write_xyz_point_set -> write_xyz_point_set jet_normal_estimation -> jet_estimate_normals pca_normal_estimation -> pca_estimate_normals jet_smoothing_3 -> jet_smooth_point_set merge_simplification_3 -> merge_simplify_point_set random_simplification_3 -> random_simplify_point_set mst_normal_orientation -> mst_orient_normals outlier_removal_3 -> remove_outliers surface_reconstruction_output_surface_facets -> output_surface_facets_to_polyhedron and output_surface_facets_to_triangle_soup * and similar renaming for private/Gyroviz functions: poisson_refinement_3 -> poisson_refine_triangulation improved_laplacian_smoothing_3 -> improved_laplacian_smooth_point_set merge_simplification_nearest_points_3 -> merge_simplify_nearest_point_set outlier_removal_wrt_median_knn_sq_distance_3 -> remove_outliers_wrt_median_knn_sq_distance outlier_removal_wrt_camera_cone_angle_3 -> remove_outliers_wrt_camera_cone_angle_3 radial_normal_orientation_3 -> radial_orient_normals --- .gitattributes | 18 ++-- ...orientation.eps => mst_orient_normals.eps} | 0 ...orientation.jpg => mst_orient_normals.jpg} | Bin ...stimation.eps => pca_estimate_normals.eps} | 0 ...stimation.jpg => pca_estimate_normals.jpg} | Bin .../Point_set_processing_3/pipeline.tex | 64 ++++++------- ...utlier_removal.eps => remove_outliers.eps} | 0 ...utlier_removal.jpg => remove_outliers.jpg} | Bin ...cing_3.tex => compute_average_spacing.tex} | 12 +-- .../Point_set_processing_3_ref/intro.tex | 16 ++-- ...stimation.tex => jet_estimate_normals.tex} | 16 ++-- ...oothing_3.tex => jet_smooth_point_set.tex} | 16 ++-- .../Point_set_processing_3_ref/main.tex | 16 ++-- ...ion_3.tex => merge_simplify_point_set.tex} | 28 +++--- ...orientation.tex => mst_orient_normals.tex} | 16 ++-- ...stimation.tex => pca_estimate_normals.tex} | 18 ++-- ...on_3.tex => random_simplify_point_set.tex} | 18 ++-- ...lier_removal_3.tex => remove_outliers.tex} | 18 ++-- Point_set_processing_3/dont_submit | 4 +- .../Point_set_processing_3/CMakeLists.txt | 4 +- .../average_spacing_example.cpp | 6 +- .../jet_smoothing_example.cpp | 4 +- .../normal_estimation.cpp | 46 +++++----- ...e.cpp => pca_estimate_normals_example.cpp} | 14 +-- .../quick_test_suite.sh | 4 +- .../random_simplification_example.cpp | 4 +- ...xample.cpp => remove_outliers_example.cpp} | 4 +- ..._spacing_3.h => compute_average_spacing.h} | 24 ++--- ... => improved_laplacian_smooth_point_set.h} | 24 ++--- ...al_estimation.h => jet_estimate_normals.h} | 44 ++++----- ...t_smoothing_3.h => jet_smooth_point_set.h} | 72 +++++++-------- ...3.h => merge_simplify_nearest_point_set.h} | 12 +-- ...ication_3.h => merge_simplify_point_set.h} | 24 ++--- ...mal_orientation.h => mst_orient_normals.h} | 18 ++-- ...al_estimation.h => pca_estimate_normals.h} | 34 +++---- ...rientation_3.h => radial_orient_normals.h} | 20 ++-- ...cation_3.h => random_simplify_point_set.h} | 18 ++-- ...{outlier_removal_3.h => remove_outliers.h} | 20 ++-- ...ove_outliers_wrt_median_knn_sq_distance.h} | 20 ++-- .../Point_set_processing_3/CMakeLists.txt | 2 +- .../Point_set_processing_3/analysis_test.cpp | 6 +- .../normal_estimation_test.cpp | 48 +++++----- .../quick_test_suite.sh | 2 +- ...oval_test.cmd => remove_outliers_test.cmd} | 0 ...oval_test.cpp => remove_outliers_test.cpp} | 26 +++--- .../Point_set_processing_3/smoothing_test.cpp | 16 ++-- ...o_APSS_reconstruction_plugin_cgal_code.cpp | 4 +- .../poisson/DialogOptions.cpp | 4 +- .../poisson/DialogOptions.h | 2 +- .../poisson/PoissonDoc.cpp | 86 +++++++++--------- .../poisson/PoissonDoc.h | 2 +- ...> remove_outliers_wrt_camera_cone_angle.h} | 44 ++++----- .../pipeline.tex | 3 +- ..._small_polyhedron_connected_components.tex | 4 +- .../get_polyhedron_connected_components.tex | 4 +- .../intro.tex | 3 +- .../main.tex | 3 +- .../output_surface_facets_to_polyhedron.tex | 73 +++++++++++++++ ...utput_surface_facets_to_triangle_soup.tex} | 14 +-- .../APSS_reconstruction.cpp | 4 +- .../IO/output_surface_facets_to_polyhedron.h | 56 ++++++++++++ ... output_surface_facets_to_triangle_soup.h} | 41 +-------- .../CGAL/Poisson_reconstruction_function.h | 6 +- ...ent_3.h => poisson_refine_triangulation.h} | 25 ++--- .../CGAL/polyhedron_connected_components.h | 10 +- .../APSS_reconstruction_test.cpp | 4 +- 66 files changed, 634 insertions(+), 534 deletions(-) rename Point_set_processing_3/doc_tex/Point_set_processing_3/{mst_normal_orientation.eps => mst_orient_normals.eps} (100%) rename Point_set_processing_3/doc_tex/Point_set_processing_3/{mst_normal_orientation.jpg => mst_orient_normals.jpg} (100%) rename Point_set_processing_3/doc_tex/Point_set_processing_3/{pca_normal_estimation.eps => pca_estimate_normals.eps} (100%) rename Point_set_processing_3/doc_tex/Point_set_processing_3/{pca_normal_estimation.jpg => pca_estimate_normals.jpg} (100%) rename Point_set_processing_3/doc_tex/Point_set_processing_3/{outlier_removal.eps => remove_outliers.eps} (100%) rename Point_set_processing_3/doc_tex/Point_set_processing_3/{outlier_removal.jpg => remove_outliers.jpg} (100%) rename Point_set_processing_3/doc_tex/Point_set_processing_3_ref/{average_spacing_3.tex => compute_average_spacing.tex} (81%) rename Point_set_processing_3/doc_tex/Point_set_processing_3_ref/{jet_normal_estimation.tex => jet_estimate_normals.tex} (73%) rename Point_set_processing_3/doc_tex/Point_set_processing_3_ref/{jet_smoothing_3.tex => jet_smooth_point_set.tex} (76%) rename Point_set_processing_3/doc_tex/Point_set_processing_3_ref/{merge_simplification_3.tex => merge_simplify_point_set.tex} (82%) rename Point_set_processing_3/doc_tex/Point_set_processing_3_ref/{mst_normal_orientation.tex => mst_orient_normals.tex} (73%) rename Point_set_processing_3/doc_tex/Point_set_processing_3_ref/{pca_normal_estimation.tex => pca_estimate_normals.tex} (76%) rename Point_set_processing_3/doc_tex/Point_set_processing_3_ref/{random_simplification_3.tex => random_simplify_point_set.tex} (83%) rename Point_set_processing_3/doc_tex/Point_set_processing_3_ref/{outlier_removal_3.tex => remove_outliers.tex} (82%) rename Point_set_processing_3/examples/Point_set_processing_3/{pca_normal_estimation_example.cpp => pca_estimate_normals_example.cpp} (82%) rename Point_set_processing_3/examples/Point_set_processing_3/{outlier_removal_example.cpp => remove_outliers_example.cpp} (94%) rename Point_set_processing_3/include/CGAL/{average_spacing_3.h => compute_average_spacing.h} (79%) rename Point_set_processing_3/include/CGAL/{improved_laplacian_smoothing_3.h => improved_laplacian_smooth_point_set.h} (95%) rename Point_set_processing_3/include/CGAL/{jet_normal_estimation.h => jet_estimate_normals.h} (81%) rename Point_set_processing_3/include/CGAL/{jet_smoothing_3.h => jet_smooth_point_set.h} (73%) rename Point_set_processing_3/include/CGAL/{merge_simplification_nearest_points_3.h => merge_simplify_nearest_point_set.h} (92%) rename Point_set_processing_3/include/CGAL/{merge_simplification_3.h => merge_simplify_point_set.h} (94%) rename Point_set_processing_3/include/CGAL/{mst_normal_orientation.h => mst_orient_normals.h} (98%) rename Point_set_processing_3/include/CGAL/{pca_normal_estimation.h => pca_estimate_normals.h} (84%) rename Point_set_processing_3/include/CGAL/{radial_normal_orientation_3.h => radial_orient_normals.h} (81%) rename Point_set_processing_3/include/CGAL/{random_simplification_3.h => random_simplify_point_set.h} (93%) rename Point_set_processing_3/include/CGAL/{outlier_removal_3.h => remove_outliers.h} (96%) rename Point_set_processing_3/include/CGAL/{outlier_removal_wrt_median_knn_sq_distance_3.h => remove_outliers_wrt_median_knn_sq_distance.h} (95%) rename Point_set_processing_3/test/Point_set_processing_3/{outlier_removal_test.cmd => remove_outliers_test.cmd} (100%) rename Point_set_processing_3/test/Point_set_processing_3/{outlier_removal_test.cpp => remove_outliers_test.cpp} (85%) rename Surface_reconstruction_points_3/demo/Surface_reconstruction_points_3/poisson/include/{outlier_removal_wrt_camera_cone_angle_3.h => remove_outliers_wrt_camera_cone_angle.h} (73%) create mode 100644 Surface_reconstruction_points_3/doc_tex/Surface_reconstruction_points_3_ref/output_surface_facets_to_polyhedron.tex rename Surface_reconstruction_points_3/doc_tex/Surface_reconstruction_points_3_ref/{surface_reconstruction_output_surface_facets.tex => output_surface_facets_to_triangle_soup.tex} (79%) create mode 100644 Surface_reconstruction_points_3/include/CGAL/IO/output_surface_facets_to_polyhedron.h rename Surface_reconstruction_points_3/include/CGAL/IO/{surface_reconstruction_output_surface_facets.h => output_surface_facets_to_triangle_soup.h} (60%) rename Surface_reconstruction_points_3/include/CGAL/{poisson_refinement_3.h => poisson_refine_triangulation.h} (90%) diff --git a/.gitattributes b/.gitattributes index bb591329560..d4eefdb7ce0 100644 --- a/.gitattributes +++ b/.gitattributes @@ -2755,16 +2755,16 @@ Point_set_processing_3/doc_tex/Point_set_processing_3/jet_smoothing.eps -text sv Point_set_processing_3/doc_tex/Point_set_processing_3/jet_smoothing.jpg -text svneol=unset#image/jpeg Point_set_processing_3/doc_tex/Point_set_processing_3/merge_simplification.eps -text svneol=unset#application/postscript Point_set_processing_3/doc_tex/Point_set_processing_3/merge_simplification.jpg -text svneol=unset#image/jpeg -Point_set_processing_3/doc_tex/Point_set_processing_3/mst_normal_orientation.eps -text svneol=unset#application/postscript -Point_set_processing_3/doc_tex/Point_set_processing_3/mst_normal_orientation.jpg -text svneol=unset#image/jpeg -Point_set_processing_3/doc_tex/Point_set_processing_3/outlier_removal.eps -text svneol=unset#application/postscript -Point_set_processing_3/doc_tex/Point_set_processing_3/outlier_removal.jpg -text svneol=unset#image/jpeg -Point_set_processing_3/doc_tex/Point_set_processing_3/pca_normal_estimation.eps -text svneol=unset#application/postscript -Point_set_processing_3/doc_tex/Point_set_processing_3/pca_normal_estimation.jpg -text svneol=unset#image/jpeg +Point_set_processing_3/doc_tex/Point_set_processing_3/mst_orient_normals.eps -text svneol=unset#application/postscript +Point_set_processing_3/doc_tex/Point_set_processing_3/mst_orient_normals.jpg -text svneol=unset#image/jpeg +Point_set_processing_3/doc_tex/Point_set_processing_3/pca_estimate_normals.eps -text svneol=unset#application/postscript +Point_set_processing_3/doc_tex/Point_set_processing_3/pca_estimate_normals.jpg -text svneol=unset#image/jpeg Point_set_processing_3/doc_tex/Point_set_processing_3/pipeline.eps -text svneol=unset#application/postscript Point_set_processing_3/doc_tex/Point_set_processing_3/pipeline.jpg -text svneol=unset#image/jpeg Point_set_processing_3/doc_tex/Point_set_processing_3/random_simplification.eps -text svneol=unset#application/postscript Point_set_processing_3/doc_tex/Point_set_processing_3/random_simplification.jpg -text svneol=unset#image/jpeg +Point_set_processing_3/doc_tex/Point_set_processing_3/remove_outliers.eps -text svneol=unset#application/postscript +Point_set_processing_3/doc_tex/Point_set_processing_3/remove_outliers.jpg -text svneol=unset#image/jpeg Point_set_processing_3/examples/Point_set_processing_3/data/ChineseDragon-10kv.off -text svneol=unset#application/octet-stream Point_set_processing_3/examples/Point_set_processing_3/data/camel.off -text svneol=unset#application/octet-stream Point_set_processing_3/examples/Point_set_processing_3/data/oni.xyz -text @@ -2775,8 +2775,8 @@ Point_set_processing_3/examples/Point_set_processing_3/quick_test_suite.sh eol=l Point_set_processing_3/include/CGAL/Neighborhood/knn_point_neighbor_search.h -text Point_set_processing_3/include/CGAL/Neighborhood/point_kdtree_3.h -text Point_set_processing_3/include/CGAL/Orientable_normal_3.h -text -Point_set_processing_3/include/CGAL/average_spacing_3.h -text -Point_set_processing_3/include/CGAL/jet_smoothing_3.h -text +Point_set_processing_3/include/CGAL/compute_average_spacing.h -text +Point_set_processing_3/include/CGAL/jet_smooth_point_set.h -text Point_set_processing_3/test/Point_set_processing_3/analysis_test.cmd eol=lf Point_set_processing_3/test/Point_set_processing_3/analysis_test.cpp -text Point_set_processing_3/test/Point_set_processing_3/data/ChineseDragon-10kv.off -text svneol=unset#application/octet-stream @@ -2784,9 +2784,9 @@ Point_set_processing_3/test/Point_set_processing_3/data/oni.pwn -text Point_set_processing_3/test/Point_set_processing_3/data/sphere926.pwn -text Point_set_processing_3/test/Point_set_processing_3/data/sphere_20k.xyz -text Point_set_processing_3/test/Point_set_processing_3/normal_estimation_test.cmd eol=lf -Point_set_processing_3/test/Point_set_processing_3/outlier_removal_test.cmd eol=lf Point_set_processing_3/test/Point_set_processing_3/quick_test_suite.bat eol=crlf Point_set_processing_3/test/Point_set_processing_3/quick_test_suite.sh eol=lf +Point_set_processing_3/test/Point_set_processing_3/remove_outliers_test.cmd eol=lf Point_set_processing_3/test/Point_set_processing_3/smoothing_test.cmd eol=lf Point_set_processing_3/test/Point_set_processing_3/smoothing_test.cpp -text Polygon/doc_tex/Polygon/pgn_algos.eps -text svneol=unset#application/postscript diff --git a/Point_set_processing_3/doc_tex/Point_set_processing_3/mst_normal_orientation.eps b/Point_set_processing_3/doc_tex/Point_set_processing_3/mst_orient_normals.eps similarity index 100% rename from Point_set_processing_3/doc_tex/Point_set_processing_3/mst_normal_orientation.eps rename to Point_set_processing_3/doc_tex/Point_set_processing_3/mst_orient_normals.eps diff --git a/Point_set_processing_3/doc_tex/Point_set_processing_3/mst_normal_orientation.jpg b/Point_set_processing_3/doc_tex/Point_set_processing_3/mst_orient_normals.jpg similarity index 100% rename from Point_set_processing_3/doc_tex/Point_set_processing_3/mst_normal_orientation.jpg rename to Point_set_processing_3/doc_tex/Point_set_processing_3/mst_orient_normals.jpg diff --git a/Point_set_processing_3/doc_tex/Point_set_processing_3/pca_normal_estimation.eps b/Point_set_processing_3/doc_tex/Point_set_processing_3/pca_estimate_normals.eps similarity index 100% rename from Point_set_processing_3/doc_tex/Point_set_processing_3/pca_normal_estimation.eps rename to Point_set_processing_3/doc_tex/Point_set_processing_3/pca_estimate_normals.eps diff --git a/Point_set_processing_3/doc_tex/Point_set_processing_3/pca_normal_estimation.jpg b/Point_set_processing_3/doc_tex/Point_set_processing_3/pca_estimate_normals.jpg similarity index 100% rename from Point_set_processing_3/doc_tex/Point_set_processing_3/pca_normal_estimation.jpg rename to Point_set_processing_3/doc_tex/Point_set_processing_3/pca_estimate_normals.jpg diff --git a/Point_set_processing_3/doc_tex/Point_set_processing_3/pipeline.tex b/Point_set_processing_3/doc_tex/Point_set_processing_3/pipeline.tex index 35770b903e6..3e2f6c6d416 100644 --- a/Point_set_processing_3/doc_tex/Point_set_processing_3/pipeline.tex +++ b/Point_set_processing_3/doc_tex/Point_set_processing_3/pipeline.tex @@ -88,12 +88,12 @@ The purpose of the analysis stage is to measure common statistics and bounding v \item Average spacing to the $k$ nearest neighbors. \end{itemize} -\ccc{CGAL::average_spacing_3()} computes the average spacing of all input points to their $k$ nearest neighbors. +\ccc{CGAL::compute_average_spacing()} computes the average spacing of all input points to their $k$ nearest neighbors. \ccRefIdfierPage{CGAL::centroid} \\ \ccRefIdfierPage{CGAL::bounding_box} \\ \ccRefIdfierPage{CGAL::bounding_sphere} \\ -\ccRefIdfierPage{CGAL::average_spacing_3} \\ +\ccRefIdfierPage{CGAL::compute_average_spacing} \\ Example: @@ -102,21 +102,21 @@ Example: \section{Outlier Removal} -Function \ccc{CGAL::outlier_removal_3()} deletes a user-specified fraction of outliers from the input point set. More specifically, it sorts the input points in increasing order of average squared distances to the $k$ nearest neighbors and deletes the points with largest value. +Function \ccc{CGAL::remove_outliers()} deletes a user-specified fraction of outliers from the input point set. More specifically, it sorts the input points in increasing order of average squared distances to the $k$ nearest neighbors and deletes the points with largest value. \emph{Note to the reviewers: we will add a function in the analysis section which displays in the console the distribution of such average squared distance so as to help the user picking an appropriate fraction value.} -\ccRefIdfierPage{CGAL::outlier_removal_3} \\ +\ccRefIdfierPage{CGAL::remove_outliers} \\ -% % Insert image outlier_removal.jpg/eps +% % Insert image remove_outliers.jpg/eps % \begin{center} -% \label{Point_set_processing_3-fig-outlier_removal} +% \label{Point_set_processing_3-fig-remove_outliers} % % Image % \begin{ccTexOnly} -% \includegraphics[width=0.9\textwidth]{Point_set_processing_3/outlier_removal} % omit .eps suffix +% \includegraphics[width=0.9\textwidth]{Point_set_processing_3/remove_outliers} % omit .eps suffix % \end{ccTexOnly} % \begin{ccHtmlOnly} -%

+%

% \end{ccHtmlOnly} % % Title % \begin{figure}[h] @@ -126,21 +126,21 @@ Function \ccc{CGAL::outlier_removal_3()} deletes a user-specified fraction of ou Example: -\ccIncludeExampleCode{Point_set_processing_3/outlier_removal_example.cpp} +\ccIncludeExampleCode{Point_set_processing_3/remove_outliers_example.cpp} \section{Simplification} Two functions are provided to simplify the input point set. -\ccc{CGAL::merge_simplification_3()} iteratively merges pairs of points which are epsilon-closed.\\ -This algorithm is precise but slower than \ccc{CGAL::random_simplification_3()}. +\ccc{CGAL::merge_simplify_point_set()} iteratively merges pairs of points which are epsilon-closed.\\ +This algorithm is precise but slower than \ccc{CGAL::random_simplify_point_set()}. -\ccc{CGAL::random_simplification_3()} randomly deletes a user-specified fraction of points from the input point set.\\ +\ccc{CGAL::random_simplify_point_set()} randomly deletes a user-specified fraction of points from the input point set.\\ This algorithm is very fast. -\ccRefIdfierPage{CGAL::merge_simplification_3} \\ -\ccRefIdfierPage{CGAL::random_simplification_3} \\ +\ccRefIdfierPage{CGAL::merge_simplify_point_set} \\ +\ccRefIdfierPage{CGAL::random_simplify_point_set} \\ % Insert image merge_simplification.jpg/eps \begin{center} @@ -167,7 +167,7 @@ Example: \section{Smoothing} -Function \ccRefIdfierPage{CGAL::jet_smoothing_3} smooths the input point set by projecting each point onto a smooth parametric surface patch (so-called jet surface) fitted over the $k$ nearest neighbors. \\ +Function \ccRefIdfierPage{CGAL::jet_smooth_point_set} smooths the input point set by projecting each point onto a smooth parametric surface patch (so-called jet surface) fitted over the $k$ nearest neighbors. \\ % % Insert image jet_smoothing.jpg/eps % \begin{center} @@ -194,24 +194,24 @@ Example: Two functions are provided to estimate the normal direction of the inferred surface at each point from the input point set. In both cases, the result is an unoriented normal vector for each input point. -Function \ccc{CGAL::jet_normal_estimation()} estimates the normal direction at each point from the set by fitting a jet surface over its $k$ nearest neighbors. The default jet is a quadric surface.\\ +Function \ccc{CGAL::jet_estimate_normals()} estimates the normal direction at each point from the set by fitting a jet surface over its $k$ nearest neighbors. The default jet is a quadric surface.\\ This algorithm is well suited to point sets scattered over curved surfaces. -Function \ccc{CGAL::pca_normal_estimation()} estimates the normal direction at each point from the set by linear least squares fitting of a plane over its $k$ nearest neighbors.\\ -This algorithm is well suited to point sets scattered over plane surfaces. It is much faster than \ccc{CGAL::jet_normal_estimation()}. +Function \ccc{CGAL::pca_estimate_normals()} estimates the normal direction at each point from the set by linear least squares fitting of a plane over its $k$ nearest neighbors.\\ +This algorithm is well suited to point sets scattered over plane surfaces. It is much faster than \ccc{CGAL::jet_estimate_normals()}. -\ccRefIdfierPage{CGAL::pca_normal_estimation} \\ -\ccRefIdfierPage{CGAL::jet_normal_estimation} \\ +\ccRefIdfierPage{CGAL::pca_estimate_normals} \\ +\ccRefIdfierPage{CGAL::jet_estimate_normals} \\ -% % Insert image pca_normal_estimation.jpg/eps +% % Insert image pca_estimate_normals.jpg/eps % \begin{center} -% \label{Point_set_processing_3-fig-pca_normal_estimation} +% \label{Point_set_processing_3-fig-pca_estimate_normals} % % Image % \begin{ccTexOnly} -% \includegraphics[width=0.9\textwidth]{Point_set_processing_3/pca_normal_estimation} % omit .eps suffix +% \includegraphics[width=0.9\textwidth]{Point_set_processing_3/pca_estimate_normals} % omit .eps suffix % \end{ccTexOnly} % \begin{ccHtmlOnly} -%

+%

% \end{ccHtmlOnly} % % Title % \begin{figure}[h] @@ -221,24 +221,24 @@ This algorithm is well suited to point sets scattered over plane surfaces. It is Example: -\ccIncludeExampleCode{Point_set_processing_3/pca_normal_estimation_example.cpp} +\ccIncludeExampleCode{Point_set_processing_3/pca_estimate_normals_example.cpp} \section{Normal Orientation} -Function \ccc{CGAL::mst_normal_orientation()} orients the normals of a set of points with (unoriented) normals using the method described by Hoppe et al. in {\em Surface reconstruction from unorganized points} \cite{cgal:hddms-srup-92}. More specifically, this method constructs a Riemannian graph over the input points and propagates a seed normal orientation within a minimum spanning tree computed over the graph with the Boost graph library. The result is an oriented normal vector for each input point/normal. +Function \ccc{CGAL::mst_orient_normals()} orients the normals of a set of points with (unoriented) normals using the method described by Hoppe et al. in {\em Surface reconstruction from unorganized points} \cite{cgal:hddms-srup-92}. More specifically, this method constructs a Riemannian graph over the input points and propagates a seed normal orientation within a minimum spanning tree computed over the graph with the Boost graph library. The result is an oriented normal vector for each input point/normal. -\ccRefIdfierPage{CGAL::mst_normal_orientation} \\ +\ccRefIdfierPage{CGAL::mst_orient_normals} \\ -% Insert image mst_normal_orientation.jpg/eps +% Insert image mst_orient_normals.jpg/eps \begin{center} - \label{Point_set_processing_3-fig-mst_normal_orientation} + \label{Point_set_processing_3-fig-mst_orient_normals} % Image \begin{ccTexOnly} - \includegraphics[width=1.0\textwidth]{Point_set_processing_3/mst_normal_orientation} % omit .eps suffix + \includegraphics[width=1.0\textwidth]{Point_set_processing_3/mst_orient_normals} % omit .eps suffix \end{ccTexOnly} \begin{ccHtmlOnly} -

+

\end{ccHtmlOnly} % Title \begin{figure}[h] @@ -246,7 +246,7 @@ Function \ccc{CGAL::mst_normal_orientation()} orients the normals of a set of po \end{figure} \end{center} -Example: see \ccc{pca_normal_estimation_example.cpp} example above. +Example: see \ccc{pca_estimate_normals_example.cpp} example above. \section{Output} diff --git a/Point_set_processing_3/doc_tex/Point_set_processing_3/outlier_removal.eps b/Point_set_processing_3/doc_tex/Point_set_processing_3/remove_outliers.eps similarity index 100% rename from Point_set_processing_3/doc_tex/Point_set_processing_3/outlier_removal.eps rename to Point_set_processing_3/doc_tex/Point_set_processing_3/remove_outliers.eps diff --git a/Point_set_processing_3/doc_tex/Point_set_processing_3/outlier_removal.jpg b/Point_set_processing_3/doc_tex/Point_set_processing_3/remove_outliers.jpg similarity index 100% rename from Point_set_processing_3/doc_tex/Point_set_processing_3/outlier_removal.jpg rename to Point_set_processing_3/doc_tex/Point_set_processing_3/remove_outliers.jpg diff --git a/Point_set_processing_3/doc_tex/Point_set_processing_3_ref/average_spacing_3.tex b/Point_set_processing_3/doc_tex/Point_set_processing_3_ref/compute_average_spacing.tex similarity index 81% rename from Point_set_processing_3/doc_tex/Point_set_processing_3_ref/average_spacing_3.tex rename to Point_set_processing_3/doc_tex/Point_set_processing_3_ref/compute_average_spacing.tex index a96b41d1a0f..eade15c5590 100644 --- a/Point_set_processing_3/doc_tex/Point_set_processing_3_ref/average_spacing_3.tex +++ b/Point_set_processing_3/doc_tex/Point_set_processing_3_ref/compute_average_spacing.tex @@ -1,5 +1,5 @@ % +------------------------------------------------------------------------+ -% | Reference manual page: average_spacing_3.tex +% | Reference manual page: compute_average_spacing.tex % +------------------------------------------------------------------------+ % | 02.06.2008 Pierre Alliez, Laurent Saboret, Gael Guennebaud % | Package: Point_set_processing_3 @@ -12,24 +12,24 @@ % +------------------------------------------------------------------------+ -\begin{ccRefFunction}{average_spacing_3} %% add template arg's if necessary +\begin{ccRefFunction}{compute_average_spacing} %% add template arg's if necessary %% \ccHtmlCrossLink{} %% add further rules for cross referencing links %% \ccHtmlIndexC[function]{} %% add further index entries \ccDefinition -\ccc{CGAL::average_spacing_3()} computes the average spacing of all points from the input set to their $k$ nearest neighbors. +\ccc{CGAL::compute_average_spacing()} computes the average spacing of all points from the input set to their $k$ nearest neighbors. One version of this function requires a traits class. Another deduces it from the input data points. % question: can it take oriented points as well? -\ccInclude{CGAL/average_spacing_3.h} +\ccInclude{CGAL/compute_average_spacing.h} % The section below is automatically generated. Do not edit! %START-AUTO(\ccDefinition) -\ccFunction{template Kernel::FT average_spacing_3(InputIterator first, InputIterator beyond, unsigned int k, const Kernel& kernel);} +\ccFunction{template Kernel::FT compute_average_spacing(InputIterator first, InputIterator beyond, unsigned int k, const Kernel& kernel);} { Compute average spacing from k nearest neighbors. This variant requires the kernel. \ccPrecond k $>$= 2. @@ -42,7 +42,7 @@ Compute average spacing from k nearest neighbors. This variant requires the kern \item \ccc{first}: iterator over the first input point. \item \ccc{beyond}: past-the-end iterator over input points. \item \ccc{k}: number of neighbors. \item \ccc{kernel}: geometric traits. \end{description} } \ccGlue -\ccFunction{template FT average_spacing_3(InputIterator first, InputIterator beyond, unsigned int k);} +\ccFunction{template FT compute_average_spacing(InputIterator first, InputIterator beyond, unsigned int k);} { Compute average spacing from k nearest neighbors. This variant deduces the kernel from iterator types. \ccPrecond k $>$= 2. diff --git a/Point_set_processing_3/doc_tex/Point_set_processing_3_ref/intro.tex b/Point_set_processing_3/doc_tex/Point_set_processing_3_ref/intro.tex index 10dca7f2ec4..e80c6bb631a 100644 --- a/Point_set_processing_3/doc_tex/Point_set_processing_3_ref/intro.tex +++ b/Point_set_processing_3/doc_tex/Point_set_processing_3_ref/intro.tex @@ -39,14 +39,14 @@ The output is a point set with normals. \ccRefIdfierPage{CGAL::read_off_point_set} \\ \ccRefIdfierPage{CGAL::read_xyz_point_set} \\ -\ccRefIdfierPage{CGAL::average_spacing_3} \\ -\ccRefIdfierPage{CGAL::outlier_removal_3} \\ -\ccRefIdfierPage{CGAL::merge_simplification_3} \\ -\ccRefIdfierPage{CGAL::random_simplification_3} \\ -\ccRefIdfierPage{CGAL::jet_smoothing_3} \\ -\ccRefIdfierPage{CGAL::jet_normal_estimation} \\ -\ccRefIdfierPage{CGAL::pca_normal_estimation} \\ -\ccRefIdfierPage{CGAL::mst_normal_orientation} \\ +\ccRefIdfierPage{CGAL::compute_average_spacing} \\ +\ccRefIdfierPage{CGAL::remove_outliers} \\ +\ccRefIdfierPage{CGAL::merge_simplify_point_set} \\ +\ccRefIdfierPage{CGAL::random_simplify_point_set} \\ +\ccRefIdfierPage{CGAL::jet_smooth_point_set} \\ +\ccRefIdfierPage{CGAL::jet_estimate_normals} \\ +\ccRefIdfierPage{CGAL::pca_estimate_normals} \\ +\ccRefIdfierPage{CGAL::mst_orient_normals} \\ \ccRefIdfierPage{CGAL::write_off_point_set} \\ \ccRefIdfierPage{CGAL::write_xyz_point_set} \\ diff --git a/Point_set_processing_3/doc_tex/Point_set_processing_3_ref/jet_normal_estimation.tex b/Point_set_processing_3/doc_tex/Point_set_processing_3_ref/jet_estimate_normals.tex similarity index 73% rename from Point_set_processing_3/doc_tex/Point_set_processing_3_ref/jet_normal_estimation.tex rename to Point_set_processing_3/doc_tex/Point_set_processing_3_ref/jet_estimate_normals.tex index 7c54be5c3ca..2d85aa27ddd 100644 --- a/Point_set_processing_3/doc_tex/Point_set_processing_3_ref/jet_normal_estimation.tex +++ b/Point_set_processing_3/doc_tex/Point_set_processing_3_ref/jet_estimate_normals.tex @@ -1,5 +1,5 @@ % +------------------------------------------------------------------------+ -% | Reference manual page: jet_normal_estimation.tex +% | Reference manual page: jet_estimate_normals.tex % +------------------------------------------------------------------------+ % | 19.02.2008 Pierre Alliez, Laurent Saboret, Gael Guennebaud % | Package: Point_set_processing_3 @@ -12,21 +12,21 @@ % +------------------------------------------------------------------------+ -\begin{ccRefFunction}{jet_normal_estimation} %% add template arg's if necessary +\begin{ccRefFunction}{jet_estimate_normals} %% add template arg's if necessary %% \ccHtmlCrossLink{} %% add further rules for cross referencing links %% \ccHtmlIndexC[function]{} %% add further index entries \ccDefinition -\ccc{CGAL::jet_normal_estimation()} estimates normal directions of all points from the input set by fitting jet surfaces over the $k$ nearest neighbors. The default jet surface is a quadric, and the result is an unoriented normal vector for each input point. The complete version of this function requires the kernel, while another deduces it from the input data. +\ccc{CGAL::jet_estimate_normals()} estimates normal directions of all points from the input set by fitting jet surfaces over the $k$ nearest neighbors. The default jet surface is a quadric, and the result is an unoriented normal vector for each input point. The complete version of this function requires the kernel, while another deduces it from the input data. -\ccInclude{CGAL/jet_normal_estimation.h} +\ccInclude{CGAL/jet_estimate_normals.h} % The section below is automatically generated. Do not edit! %START-AUTO(\ccDefinition) -\ccFunction{template OutputIterator jet_normal_estimation(InputIterator first, InputIterator beyond, OutputIterator normals, unsigned int k, const Kernel& kernel, unsigned int degree_fitting);} +\ccFunction{template OutputIterator jet_estimate_normals(InputIterator first, InputIterator beyond, OutputIterator normals, unsigned int k, const Kernel& kernel, unsigned int degree_fitting);} { Estimate normal directions using jet fitting on the k nearest neighbors. The output normals are marked as unoriented. This variant requires the kernel. @@ -40,7 +40,7 @@ This variant requires the kernel. \item \ccc{first}: iterator over the first input point. \item \ccc{beyond}: past-the-end iterator over input points. \item \ccc{normals}: output normals. \item \ccc{k}: number of neighbors. \item \ccc{kernel}: geometric traits. \end{description} } \ccGlue -\ccFunction{template OutputIterator jet_normal_estimation(InputIterator first, InputIterator beyond, OutputIterator normals, unsigned int k, unsigned int degree_fitting = 2);} +\ccFunction{template OutputIterator jet_estimate_normals(InputIterator first, InputIterator beyond, OutputIterator normals, unsigned int k, unsigned int degree_fitting = 2);} { Estimate normal directions using jet fitting on the k nearest neighbors. The output normals are marked as unoriented. This variant deduces the kernel from iterator types. \ccPrecond k $>$= 2. @@ -58,8 +58,8 @@ Estimate normal directions using jet fitting on the k nearest neighbors. The out \ccSeeAlso -\ccRefIdfierPage{CGAL::pca_normal_estimation} \\ -\ccRefIdfierPage{CGAL::mst_normal_orientation} \\ +\ccRefIdfierPage{CGAL::pca_estimate_normals} \\ +\ccRefIdfierPage{CGAL::mst_orient_normals} \\ \ccExample diff --git a/Point_set_processing_3/doc_tex/Point_set_processing_3_ref/jet_smoothing_3.tex b/Point_set_processing_3/doc_tex/Point_set_processing_3_ref/jet_smooth_point_set.tex similarity index 76% rename from Point_set_processing_3/doc_tex/Point_set_processing_3_ref/jet_smoothing_3.tex rename to Point_set_processing_3/doc_tex/Point_set_processing_3_ref/jet_smooth_point_set.tex index 79f2660542b..1e8f3b16bca 100644 --- a/Point_set_processing_3/doc_tex/Point_set_processing_3_ref/jet_smoothing_3.tex +++ b/Point_set_processing_3/doc_tex/Point_set_processing_3_ref/jet_smooth_point_set.tex @@ -1,5 +1,5 @@ % +------------------------------------------------------------------------+ -% | Reference manual page: jet_smoothing_3.tex +% | Reference manual page: jet_smooth_point_set.tex % +------------------------------------------------------------------------+ % | 02.06.2008 Pierre Alliez, Laurent Saboret, Gael Guennebaud % | Package: Point_set_processing_3 @@ -12,21 +12,21 @@ % +------------------------------------------------------------------------+ -\begin{ccRefFunction}{jet_smoothing_3} %% add template arg's if necessary +\begin{ccRefFunction}{jet_smooth_point_set} %% add template arg's if necessary %% \ccHtmlCrossLink{} %% add further rules for cross referencing links %% \ccHtmlIndexC[function]{} %% add further index entries \ccDefinition -\ccc{CGAL::jet_smoothing_3()} smooths a point set by fitting for each point a jet surface and projecting it onto the jet. The default jet surfaces are quadrics. The function exists in four variants: it may either alter (mutate) the input point set or create a copy; and it may either require a kernel or deduce it from input data. +\ccc{CGAL::jet_smooth_point_set()} smooths a point set by fitting for each point a jet surface and projecting it onto the jet. The default jet surfaces are quadrics. The function exists in four variants: it may either alter (mutate) the input point set or create a copy; and it may either require a kernel or deduce it from input data. -\ccInclude{CGAL/jet_smoothing_3.h} +\ccInclude{CGAL/jet_smooth_point_set.h} % The section below is automatically generated. Do not edit! %START-AUTO(\ccDefinition) -\ccFunction{template OutputIterator jet_smoothing_3(InputIterator first, InputIterator beyond, OutputIterator output, const unsigned int k, const Kernel& kernel, const unsigned int degree_fitting = 2, const unsigned int degree_monge = 2);} +\ccFunction{template OutputIterator jet_smooth_point_set(InputIterator first, InputIterator beyond, OutputIterator output, const unsigned int k, const Kernel& kernel, const unsigned int degree_fitting = 2, const unsigned int degree_monge = 2);} { Smooth a point set using jet fitting on the k nearest neighbors and reprojection onto the jet. This variant requires the kernel. \ccPrecond k $>$= 2. @@ -39,7 +39,7 @@ Smooth a point set using jet fitting on the k nearest neighbors and reprojection \item \ccc{first}: iterator over the first input point. \item \ccc{beyond}: past-the-end iterator over input points. \item \ccc{output}: iterator over the first output point. \item \ccc{k}: number of neighbors. \item \ccc{kernel}: geometric traits. \end{description} } \ccGlue -\ccFunction{template void jet_smoothing_3(ForwardIterator first, ForwardIterator beyond, unsigned int k, const Kernel& kernel, const unsigned int degree_fitting = 2, const unsigned int degree_monge = 2);} +\ccFunction{template void jet_smooth_point_set(ForwardIterator first, ForwardIterator beyond, unsigned int k, const Kernel& kernel, const unsigned int degree_fitting = 2, const unsigned int degree_monge = 2);} { Smooth a point set using jet fitting on the k nearest neighbors and reprojection onto the jet. This function is mutating the input point set. This variant requires the kernel. Warning: This method moves the points, thus should not be called on containers sorted wrt points position. @@ -52,7 +52,7 @@ Warning: This method moves the points, thus should not be called on containers s \item \ccc{first}: iterator over the first input/output point. \item \ccc{beyond}: past-the-end iterator. \item \ccc{k}: number of neighbors. \item \ccc{kernel}: geometric traits. \end{description} } \ccGlue -\ccFunction{template OutputIterator jet_smoothing_3(InputIterator first, InputIterator beyond, OutputIterator output, unsigned int k, const unsigned int degree_fitting = 2, const unsigned int degree_monge = 2);} +\ccFunction{template OutputIterator jet_smooth_point_set(InputIterator first, InputIterator beyond, OutputIterator output, unsigned int k, const unsigned int degree_fitting = 2, const unsigned int degree_monge = 2);} { Smooths points by fitting jet surfaces over their k nearest neighbors and projecting onto the jets. This variant deduces the kernel from iterator types. \ccPrecond k $>$= 2. @@ -65,7 +65,7 @@ Smooths points by fitting jet surfaces over their k nearest neighbors and projec \item \ccc{first}: iterator over the first input point \item \ccc{beyond}: past-the-end iterator over input points \item \ccc{output}: iterator over the first output point \item \ccc{k}: number of neighbors \end{description} } \ccGlue -\ccFunction{template void jet_smoothing_3(ForwardIterator first, ForwardIterator beyond, unsigned int k, const unsigned int degree_fitting = 2, const unsigned int degree_monge = 2);} +\ccFunction{template void jet_smooth_point_set(ForwardIterator first, ForwardIterator beyond, unsigned int k, const unsigned int degree_fitting = 2, const unsigned int degree_monge = 2);} { Smooths points by fitting jet surfaces over their k nearest neighbors and projecting onto the jets. This function is mutating the input point set. This variant deduces the kernel from iterator types. Warning: As this method relocates the points, it should not be called on containers sorted w.r.t. point locations. diff --git a/Point_set_processing_3/doc_tex/Point_set_processing_3_ref/main.tex b/Point_set_processing_3/doc_tex/Point_set_processing_3_ref/main.tex index 6b4f032715e..b8fe6b59e86 100644 --- a/Point_set_processing_3/doc_tex/Point_set_processing_3_ref/main.tex +++ b/Point_set_processing_3/doc_tex/Point_set_processing_3_ref/main.tex @@ -7,19 +7,19 @@ \input{Point_set_processing_3_ref/intro.tex} -\input{Point_set_processing_3_ref/average_spacing_3.tex} -\input{Point_set_processing_3_ref/jet_normal_estimation.tex} -\input{Point_set_processing_3_ref/jet_smoothing_3.tex} -\input{Point_set_processing_3_ref/merge_simplification_3.tex} -\input{Point_set_processing_3_ref/mst_normal_orientation.tex} +\input{Point_set_processing_3_ref/compute_average_spacing.tex} +\input{Point_set_processing_3_ref/jet_estimate_normals.tex} +\input{Point_set_processing_3_ref/jet_smooth_point_set.tex} +\input{Point_set_processing_3_ref/merge_simplify_point_set.tex} +\input{Point_set_processing_3_ref/mst_orient_normals.tex} \input{Point_set_processing_3_ref/Orientable_normal_3.tex} \input{Point_set_processing_3_ref/OrientableNormal_3.tex} -\input{Point_set_processing_3_ref/outlier_removal_3.tex} -\input{Point_set_processing_3_ref/pca_normal_estimation.tex} +\input{Point_set_processing_3_ref/remove_outliers.tex} +\input{Point_set_processing_3_ref/pca_estimate_normals.tex} \input{Point_set_processing_3_ref/Point_with_normal_3.tex} \input{Point_set_processing_3_ref/PointWithNormal_3.tex} \input{Point_set_processing_3_ref/PointWithOrientableNormal_3.tex} -\input{Point_set_processing_3_ref/random_simplification_3.tex} +\input{Point_set_processing_3_ref/random_simplify_point_set.tex} \input{Point_set_processing_3_ref/read_off_point_set.tex} \input{Point_set_processing_3_ref/read_xyz_point_set.tex} \input{Point_set_processing_3_ref/write_off_point_set.tex} diff --git a/Point_set_processing_3/doc_tex/Point_set_processing_3_ref/merge_simplification_3.tex b/Point_set_processing_3/doc_tex/Point_set_processing_3_ref/merge_simplify_point_set.tex similarity index 82% rename from Point_set_processing_3/doc_tex/Point_set_processing_3_ref/merge_simplification_3.tex rename to Point_set_processing_3/doc_tex/Point_set_processing_3_ref/merge_simplify_point_set.tex index 0172ffcc325..dc83170696c 100644 --- a/Point_set_processing_3/doc_tex/Point_set_processing_3_ref/merge_simplification_3.tex +++ b/Point_set_processing_3/doc_tex/Point_set_processing_3_ref/merge_simplify_point_set.tex @@ -1,5 +1,5 @@ % +------------------------------------------------------------------------+ -% | Reference manual page: merge_simplification_3.tex +% | Reference manual page: merge_simplify_point_set.tex % +------------------------------------------------------------------------+ % | 02.06.2008 Pierre Alliez, Laurent Saboret, Gael Guennebaud % | Package: Point_set_processing_3 @@ -12,25 +12,25 @@ % +------------------------------------------------------------------------+ -\begin{ccRefFunction}{merge_simplification_3} %% add template arg's if necessary +\begin{ccRefFunction}{merge_simplify_point_set} %% add template arg's if necessary %% \ccHtmlCrossLink{} %% add further rules for cross referencing links %% \ccHtmlIndexC[function]{} %% add further index entries \ccDefinition -\ccc{CGAL::merge_simplification_3()} iteratively merges pairs of closest points which are epsilon-closed. +\ccc{CGAL::merge_simplify_point_set()} iteratively merges pairs of closest points which are epsilon-closed. To be precise, it merges points which belong to the same cell of a grid of cell size = the \ccc{epsilon} parameter. The function exists in four flavors: it may either mutate the input points or create a copy, and may either require the kernel or deduce it from the input data. -\ccInclude{CGAL/merge_simplification_3.h} +\ccInclude{CGAL/merge_simplify_point_set.h} % The section below is automatically generated. Do not edit! %START-AUTO(\ccDefinition) -\ccFunction{template OutputIterator merge_simplification_3(InputIterator first, InputIterator beyond, OutputIterator output, double epsilon, const Kernel& kernel);} +\ccFunction{template OutputIterator merge_simplify_point_set(InputIterator first, InputIterator beyond, OutputIterator output, double epsilon, const Kernel& kernel);} { Merge points which belong to the same cell of a grid of cell size = epsilon. This variant requires the kernel. \ccPrecond epsilon $>$ 0. @@ -43,7 +43,7 @@ Merge points which belong to the same cell of a grid of cell size = epsilon. Thi \item \ccc{first}: iterator over the first input point. \item \ccc{beyond}: past-the-end iterator over input points. \item \ccc{output}: iterator over the first output point. \item \ccc{epsilon}: tolerance value when comparing 3D points. \item \ccc{kernel}: geometric traits. \end{description} } \ccGlue -\ccFunction{template ForwardIterator merge_simplification_3(ForwardIterator first, ForwardIterator beyond, double epsilon, const Kernel& kernel);} +\ccFunction{template ForwardIterator merge_simplify_point_set(ForwardIterator first, ForwardIterator beyond, double epsilon, const Kernel& kernel);} { Merge points which belong to the same cell of a grid of cell size = epsilon. This function is mutating the input point set. This variant requires the kernel. Warning: This method modifies the order of points, thus should not be called on sorted containers. @@ -57,7 +57,7 @@ Warning: This method modifies the order of points, thus should not be called on \item \ccc{first}: iterator over the first input/output point. \item \ccc{beyond}: past-the-end iterator. \item \ccc{epsilon}: tolerance value when comparing 3D points. \item \ccc{kernel}: geometric traits. \end{description} } \ccGlue -\ccFunction{template OutputIterator merge_simplification_3(InputIterator first, InputIterator beyond, OutputIterator output, double epsilon);} +\ccFunction{template OutputIterator merge_simplify_point_set(InputIterator first, InputIterator beyond, OutputIterator output, double epsilon);} { Merge points which belong to the same cell of a grid of cell size = epsilon. This variant deduces the kernel from iterator types. \ccPrecond epsilon $>$ 0. @@ -70,7 +70,7 @@ Merge points which belong to the same cell of a grid of cell size = epsilon. Thi \item \ccc{first}: iterator over the first input point. \item \ccc{beyond}: past-the-end iterator over input points. \item \ccc{output}: iterator over the first output point. \item \ccc{epsilon}: tolerance value when comparing 3D points. \end{description} } \ccGlue -\ccFunction{template ForwardIterator merge_simplification_3(ForwardIterator first, ForwardIterator beyond, double epsilon);} +\ccFunction{template ForwardIterator merge_simplify_point_set(ForwardIterator first, ForwardIterator beyond, double epsilon);} { Merge points which belong to the same cell of a grid of cell size = epsilon. This function is mutating the input point set. This variant deduces the kernel from iterator types. Warning: This method modifies the order of points, thus should not be called on sorted containers. @@ -88,7 +88,7 @@ Warning: This method modifies the order of points, thus should not be called on \ccSeeAlso -\ccRefIdfierPage{CGAL::random_simplification_3} \\ +\ccRefIdfierPage{CGAL::random_simplify_point_set} \\ \ccExample @@ -100,14 +100,14 @@ double epsilon = 0.001; // put result in output iterator... std::deque output; -CGAL::merge_simplification_3(points.begin(), points.end(), - std::back_inserter(output), - epsilon); +CGAL::merge_simplify_point_set(points.begin(), points.end(), + std::back_inserter(output), + epsilon); // ...or use mutating version of the same function std::deque::iterator first_iterator_to_remove = - CGAL::merge_simplification_3(points.begin(), points.end(), - epsilon); + CGAL::merge_simplify_point_set(points.begin(), points.end(), + epsilon); std::erase(std::remove(first_iterator_to_remove, points.end()), // erase-remove idiom points.end()); \end{ccExampleCode} diff --git a/Point_set_processing_3/doc_tex/Point_set_processing_3_ref/mst_normal_orientation.tex b/Point_set_processing_3/doc_tex/Point_set_processing_3_ref/mst_orient_normals.tex similarity index 73% rename from Point_set_processing_3/doc_tex/Point_set_processing_3_ref/mst_normal_orientation.tex rename to Point_set_processing_3/doc_tex/Point_set_processing_3_ref/mst_orient_normals.tex index 8e025c6926d..c7deaa4e470 100644 --- a/Point_set_processing_3/doc_tex/Point_set_processing_3_ref/mst_normal_orientation.tex +++ b/Point_set_processing_3/doc_tex/Point_set_processing_3_ref/mst_orient_normals.tex @@ -1,5 +1,5 @@ % +------------------------------------------------------------------------+ -% | Reference manual page: mst_normal_orientation.tex +% | Reference manual page: mst_orient_normals.tex % +------------------------------------------------------------------------+ % | 02.06.2008 Pierre Alliez, Laurent Saboret, Gael Guennebaud % | Package: Point_set_processing_3 @@ -12,21 +12,21 @@ % +------------------------------------------------------------------------+ -\begin{ccRefFunction}{mst_normal_orientation} %% add template arg's if necessary +\begin{ccRefFunction}{mst_orient_normals} %% add template arg's if necessary %% \ccHtmlCrossLink{} %% add further rules for cross referencing links %% \ccHtmlIndexC[function]{} %% add further index entries \ccDefinition -\ccc{CGAL::mst_normal_orientation()} orients the normals of a point set using the propagation of a seed orientation through a minimum spanning tree of the Riemannian graph \cite{cgal:hddms-srup-92}. The result is an oriented normal vector for each input point/normal. +\ccc{CGAL::mst_orient_normals()} orients the normals of a point set using the propagation of a seed orientation through a minimum spanning tree of the Riemannian graph \cite{cgal:hddms-srup-92}. The result is an oriented normal vector for each input point/normal. -\ccInclude{CGAL/mst_normal_orientation.h} +\ccInclude{CGAL/mst_orient_normals.h} % The section below is automatically generated. Do not edit! %START-AUTO(\ccDefinition) -\ccFunction{template unsigned int mst_normal_orientation(VertexIterator first, VertexIterator beyond, VertexIndexMap vertex_index_map, VertexPointMap vertex_point_map, VertexNormalMap vertex_normal_map, unsigned int k);} +\ccFunction{template unsigned int mst_orient_normals(VertexIterator first, VertexIterator beyond, VertexIndexMap vertex_index_map, VertexPointMap vertex_point_map, VertexNormalMap vertex_normal_map, unsigned int k);} { Orient the normals of a point set using the method described by Hoppe, DeRose, Duchamp, McDonald and Stuetzle in {\em Surface reconstruction from unorganized points} \cite{cgal:hddms-srup-92}. Note that this variant does not orient normals that are already oriented. @@ -43,12 +43,12 @@ Note that this variant does not orient normals that are already oriented. \ccSeeAlso -\ccRefIdfierPage{CGAL::pca_normal_estimation} \\ -\ccRefIdfierPage{CGAL::jet_normal_estimation} \\ +\ccRefIdfierPage{CGAL::pca_estimate_normals} \\ +\ccRefIdfierPage{CGAL::jet_estimate_normals} \\ \ccExample -\ccIncludeExampleCode{Point_set_processing_3/pca_normal_estimation_example.cpp} +\ccIncludeExampleCode{Point_set_processing_3/pca_estimate_normals_example.cpp} \end{ccRefFunction} diff --git a/Point_set_processing_3/doc_tex/Point_set_processing_3_ref/pca_normal_estimation.tex b/Point_set_processing_3/doc_tex/Point_set_processing_3_ref/pca_estimate_normals.tex similarity index 76% rename from Point_set_processing_3/doc_tex/Point_set_processing_3_ref/pca_normal_estimation.tex rename to Point_set_processing_3/doc_tex/Point_set_processing_3_ref/pca_estimate_normals.tex index 632a6c487e4..78826ab2eb7 100644 --- a/Point_set_processing_3/doc_tex/Point_set_processing_3_ref/pca_normal_estimation.tex +++ b/Point_set_processing_3/doc_tex/Point_set_processing_3_ref/pca_estimate_normals.tex @@ -1,5 +1,5 @@ % +------------------------------------------------------------------------+ -% | Reference manual page: pca_normal_estimation.tex +% | Reference manual page: pca_estimate_normals.tex % +------------------------------------------------------------------------+ % | 14.02.2008 Pierre Alliez, Laurent Saboret, Gael Guennebaud % | Package: Point_set_processing_3 @@ -12,23 +12,23 @@ % +------------------------------------------------------------------------+ -\begin{ccRefFunction}{pca_normal_estimation} %% add template arg's if necessary +\begin{ccRefFunction}{pca_estimate_normals} %% add template arg's if necessary %% \ccHtmlCrossLink{} %% add further rules for cross referencing links %% \ccHtmlIndexC[function]{} %% add further index entries \ccDefinition -\ccc{CGAL::pca_normal_estimation()} estimates normal directions at all points from an input point set by linear least squares fitting of a plane over their k nearest neighbors. The result is an unoriented normal vector for each input point. +\ccc{CGAL::pca_estimate_normals()} estimates normal directions at all points from an input point set by linear least squares fitting of a plane over their k nearest neighbors. The result is an unoriented normal vector for each input point. The function exists in two flavors: it may either require a kernel or deduces it from the input data. -\ccInclude{CGAL/pca_normal_estimation.h} +\ccInclude{CGAL/pca_estimate_normals.h} % The section below is automatically generated. Do not edit! %START-AUTO(\ccDefinition) -\ccFunction{template OutputIterator pca_normal_estimation(InputIterator first, InputIterator beyond, OutputIterator normals, unsigned int k, const Kernel& kernel);} +\ccFunction{template OutputIterator pca_estimate_normals(InputIterator first, InputIterator beyond, OutputIterator normals, unsigned int k, const Kernel& kernel);} { Estimate normal directions by linear least squares fitting of a plane over the k nearest neighbors. The output normals are marked as unoriented. This variant requires the kernel. @@ -42,7 +42,7 @@ This variant requires the kernel. \item \ccc{first}: iterator over the first input point. \item \ccc{beyond}: past-the-end iterator over input points. \item \ccc{normals}: output normals. \item \ccc{k}: number of neighbors. \item \ccc{kernel}: geometric traits. \end{description} } \ccGlue -\ccFunction{template OutputIterator pca_normal_estimation(InputIterator first, InputIterator beyond, OutputIterator normals, unsigned int k);} +\ccFunction{template OutputIterator pca_estimate_normals(InputIterator first, InputIterator beyond, OutputIterator normals, unsigned int k);} { Estimate normal directions by linear least squares fitting of a plane over the k nearest neighbors. The output normals are marked as unoriented. This variant deduces the kernel from iterator types. @@ -61,12 +61,12 @@ This variant deduces the kernel from iterator types. \ccSeeAlso -\ccRefIdfierPage{CGAL::jet_normal_estimation} \\ -\ccRefIdfierPage{CGAL::mst_normal_orientation} \\ +\ccRefIdfierPage{CGAL::jet_estimate_normals} \\ +\ccRefIdfierPage{CGAL::mst_orient_normals} \\ \ccExample -\ccIncludeExampleCode{Point_set_processing_3/pca_normal_estimation_example.cpp} +\ccIncludeExampleCode{Point_set_processing_3/pca_estimate_normals_example.cpp} \end{ccRefFunction} diff --git a/Point_set_processing_3/doc_tex/Point_set_processing_3_ref/random_simplification_3.tex b/Point_set_processing_3/doc_tex/Point_set_processing_3_ref/random_simplify_point_set.tex similarity index 83% rename from Point_set_processing_3/doc_tex/Point_set_processing_3_ref/random_simplification_3.tex rename to Point_set_processing_3/doc_tex/Point_set_processing_3_ref/random_simplify_point_set.tex index de537d39079..7a88f0607a0 100644 --- a/Point_set_processing_3/doc_tex/Point_set_processing_3_ref/random_simplification_3.tex +++ b/Point_set_processing_3/doc_tex/Point_set_processing_3_ref/random_simplify_point_set.tex @@ -1,5 +1,5 @@ % +------------------------------------------------------------------------+ -% | Reference manual page: random_simplification_3.tex +% | Reference manual page: random_simplify_point_set.tex % +------------------------------------------------------------------------+ % | 07.01.2009 Pierre Alliez, Laurent Saboret, Gael Guennebaud % | Package: Point_set_processing_3 @@ -12,24 +12,24 @@ % +------------------------------------------------------------------------+ -\begin{ccRefFunction}{random_simplification_3} %% add template arg's if necessary +\begin{ccRefFunction}{random_simplify_point_set} %% add template arg's if necessary %% \ccHtmlCrossLink{} %% add further rules for cross referencing links %% \ccHtmlIndexC[function]{} %% add further index entries \ccDefinition -\ccc{CGAL::random_simplification_3()} randomly deletes a user-specified fraction of the input points. +\ccc{CGAL::random_simplify_point_set()} randomly deletes a user-specified fraction of the input points. The function exists in four flavors: it may either modify the input point set or create a copy, and may either require the kernel or deduce it from the input data. -\ccInclude{CGAL/random_simplification_3.h} +\ccInclude{CGAL/random_simplify_point_set.h} % The section below is automatically generated. Do not edit! %START-AUTO(\ccDefinition) -\ccFunction{template OutputIterator random_simplification_3(InputIterator first, InputIterator beyond, OutputIterator output, double threshold_percent, const Kernel& kernel);} +\ccFunction{template OutputIterator random_simplify_point_set(InputIterator first, InputIterator beyond, OutputIterator output, double threshold_percent, const Kernel& kernel);} { Randomly deletes a user-specified fraction of the input points. This variant requires the kernel. \ccCommentHeading{Template Parameters} @@ -41,7 +41,7 @@ Randomly deletes a user-specified fraction of the input points. This variant req \item \ccc{first}: iterator over the first input point. \item \ccc{beyond}: past-the-end iterator over input points. \item \ccc{output}: iterator over the first output point. \item \ccc{threshold_percent}: percentage of points to remove. \item \ccc{kernel}: geometric traits. \end{description} } \ccGlue -\ccFunction{template ForwardIterator random_simplification_3(ForwardIterator first, ForwardIterator beyond, double threshold_percent, const Kernel& kernel);} +\ccFunction{template ForwardIterator random_simplify_point_set(ForwardIterator first, ForwardIterator beyond, double threshold_percent, const Kernel& kernel);} { Randomly deletes a user-specified fraction of the input points. This function is mutating the input point set. This variant requires the kernel. Warning: This method modifies the order of points, thus should not be called on sorted containers. @@ -54,7 +54,7 @@ Warning: This method modifies the order of points, thus should not be called on \item \ccc{first}: iterator over the first input/output point. \item \ccc{beyond}: past-the-end iterator. \item \ccc{threshold_percent}: percentage of points to remove. \item \ccc{kernel}: geometric traits. \end{description} } \ccGlue -\ccFunction{template OutputIterator random_simplification_3(InputIterator first, InputIterator beyond, OutputIterator output, double threshold_percent);} +\ccFunction{template OutputIterator random_simplify_point_set(InputIterator first, InputIterator beyond, OutputIterator output, double threshold_percent);} { Randomly deletes a user-specified fraction of the input points. This variant deduces the kernel from iterator types. \ccCommentHeading{Template Parameters} @@ -66,7 +66,7 @@ Randomly deletes a user-specified fraction of the input points. This variant ded \item \ccc{first}: iterator over the first input point \item \ccc{beyond}: past-the-end iterator over input points \item \ccc{output}: iterator over the first output point \item \ccc{threshold_percent}: percentage of points to remove \end{description} } \ccGlue -\ccFunction{template ForwardIterator random_simplification_3(ForwardIterator first, ForwardIterator beyond, double threshold_percent);} +\ccFunction{template ForwardIterator random_simplify_point_set(ForwardIterator first, ForwardIterator beyond, double threshold_percent);} { Randomly deletes a user-specified fraction of the input points. This function is mutating the input point set. This variant deduces the kernel from iterator types. Warning: This method modifies the order of points, thus should not be called on sorted containers. @@ -83,7 +83,7 @@ Warning: This method modifies the order of points, thus should not be called on \ccSeeAlso -\ccRefIdfierPage{CGAL::merge_simplification_3} \\ +\ccRefIdfierPage{CGAL::merge_simplify_point_set} \\ \ccExample diff --git a/Point_set_processing_3/doc_tex/Point_set_processing_3_ref/outlier_removal_3.tex b/Point_set_processing_3/doc_tex/Point_set_processing_3_ref/remove_outliers.tex similarity index 82% rename from Point_set_processing_3/doc_tex/Point_set_processing_3_ref/outlier_removal_3.tex rename to Point_set_processing_3/doc_tex/Point_set_processing_3_ref/remove_outliers.tex index 9ba56ddd692..b9826faf2f6 100644 --- a/Point_set_processing_3/doc_tex/Point_set_processing_3_ref/outlier_removal_3.tex +++ b/Point_set_processing_3/doc_tex/Point_set_processing_3_ref/remove_outliers.tex @@ -1,5 +1,5 @@ % +------------------------------------------------------------------------+ -% | Reference manual page: outlier_removal_3.tex +% | Reference manual page: remove_outliers.tex % +------------------------------------------------------------------------+ % | 02.06.2008 Pierre Alliez, Laurent Saboret, Gael Guennebaud % | Package: Point_set_processing_3 @@ -12,7 +12,7 @@ % +------------------------------------------------------------------------+ -\begin{ccRefFunction}{outlier_removal_3} %% add template arg's if necessary +\begin{ccRefFunction}{remove_outliers} %% add template arg's if necessary %% \ccHtmlCrossLink{} %% add further rules for cross referencing links %% \ccHtmlIndexC[function]{} %% add further index entries @@ -20,17 +20,17 @@ \ccDefinition -\ccc{CGAL::outlier_removal_3()} deletes a user-specified fraction of outliers from the input point set. More specifically, it sorts the input points in increasing order of average squared distances to the $k$ nearest neighbors and deletes the points with largest value. +\ccc{CGAL::remove_outliers()} deletes a user-specified fraction of outliers from the input point set. More specifically, it sorts the input points in increasing order of average squared distances to the $k$ nearest neighbors and deletes the points with largest value. The function exists in four flavors: it may either mutate the input point set or create a copy, and may either require the kernel or deduce it from the input data. -\ccInclude{CGAL/outlier_removal_3.h} +\ccInclude{CGAL/remove_outliers.h} % The section below is automatically generated. Do not edit! %START-AUTO(\ccDefinition) -\ccFunction{template OutputIterator outlier_removal_3(InputIterator first, InputIterator beyond, OutputIterator output, unsigned int k, const Kernel& kernel, double threshold_percent);} +\ccFunction{template OutputIterator remove_outliers(InputIterator first, InputIterator beyond, OutputIterator output, unsigned int k, const Kernel& kernel, double threshold_percent);} { Remove outliers:\begin{itemize} \item compute average squared distance to the K nearest neighbors,\item output (100-\ccc{threshold_percent}) \% best points wrt this distance. This variant requires the kernel.\end{itemize} @@ -44,7 +44,7 @@ Remove outliers:\begin{itemize} \item \ccc{first}: iterator over the first input point. \item \ccc{beyond}: past-the-end iterator over input points. \item \ccc{output}: iterator over the first output point. \item \ccc{k}: number of neighbors. \item \ccc{kernel}: geometric traits. \item \ccc{threshold_percent}: percentage of points to remove. \end{description} } \ccGlue -\ccFunction{template ForwardIterator outlier_removal_3(ForwardIterator first, ForwardIterator beyond, unsigned int k, const Kernel& kernel, double threshold_percent);} +\ccFunction{template ForwardIterator remove_outliers(ForwardIterator first, ForwardIterator beyond, unsigned int k, const Kernel& kernel, double threshold_percent);} { Remove outliers:\begin{itemize} \item compute average squared distance to the K nearest neighbors,\item sort the points in increasing order of average distance. This function is mutating the input point set. This variant requires the kernel.\end{itemize} @@ -59,7 +59,7 @@ Warning: This method modifies the order of points, thus should not be called on \item \ccc{first}: iterator over the first input/output point. \item \ccc{beyond}: past-the-end iterator. \item \ccc{k}: number of neighbors. \item \ccc{kernel}: geometric traits. \item \ccc{threshold_percent}: percentage of points to remove. \end{description} } \ccGlue -\ccFunction{template OutputIterator outlier_removal_3(InputIterator first, InputIterator beyond, OutputIterator output, unsigned int k, double threshold_percent);} +\ccFunction{template OutputIterator remove_outliers(InputIterator first, InputIterator beyond, OutputIterator output, unsigned int k, double threshold_percent);} { Remove outliers:\begin{itemize} \item compute average squared distance to the K nearest neighbors,\item output (100-\ccc{threshold_percent}) \% best points wrt this distance. This variant deduces the kernel from iterator types.\end{itemize} @@ -73,7 +73,7 @@ Remove outliers:\begin{itemize} \item \ccc{first}: iterator over the first input point \item \ccc{beyond}: past-the-end iterator over input points \item \ccc{output}: iterator over the first output point \item \ccc{k}: number of neighbors \item \ccc{threshold_percent}: percentage of points to remove \end{description} } \ccGlue -\ccFunction{template ForwardIterator outlier_removal_3(ForwardIterator first, ForwardIterator beyond, unsigned int k, double threshold_percent);} +\ccFunction{template ForwardIterator remove_outliers(ForwardIterator first, ForwardIterator beyond, unsigned int k, double threshold_percent);} { Remove outliers:\begin{itemize} \item compute average squared distance to the k nearest neighbors,\item sort the points in increasing order of average distance. This function is mutating the input point set. This variant deduces the kernel from iterator types.\end{itemize} @@ -92,7 +92,7 @@ Warning: This method modifies the order of points, thus should not be called on \ccExample -\ccIncludeExampleCode{Point_set_processing_3/outlier_removal_example.cpp} +\ccIncludeExampleCode{Point_set_processing_3/remove_outliers_example.cpp} \end{ccRefFunction} diff --git a/Point_set_processing_3/dont_submit b/Point_set_processing_3/dont_submit index c8be164a446..2fa1941a4c5 100644 --- a/Point_set_processing_3/dont_submit +++ b/Point_set_processing_3/dont_submit @@ -1,3 +1,3 @@ doc -outlier_removal_wrt_median_knn_sq_distance_3.h -merge_simplification_nearest_points_3.h +remove_outliers_wrt_median_knn_sq_distance.h +merge_simplify_nearest_point_set.h diff --git a/Point_set_processing_3/examples/Point_set_processing_3/CMakeLists.txt b/Point_set_processing_3/examples/Point_set_processing_3/CMakeLists.txt index fbe7a1eb24a..81861118d4d 100644 --- a/Point_set_processing_3/examples/Point_set_processing_3/CMakeLists.txt +++ b/Point_set_processing_3/examples/Point_set_processing_3/CMakeLists.txt @@ -49,8 +49,8 @@ if ( CGAL_FOUND ) # Executables that do *not* require LAPACK create_single_source_cgal_program( "average_spacing_example.cpp" ) - create_single_source_cgal_program( "outlier_removal_example.cpp" ) - create_single_source_cgal_program( "pca_normal_estimation_example.cpp" ) + create_single_source_cgal_program( "remove_outliers_example.cpp" ) + create_single_source_cgal_program( "pca_estimate_normals_example.cpp" ) create_single_source_cgal_program( "random_simplification_example.cpp" ) create_single_source_cgal_program( "read_write_xyz_point_set_example.cpp" ) diff --git a/Point_set_processing_3/examples/Point_set_processing_3/average_spacing_example.cpp b/Point_set_processing_3/examples/Point_set_processing_3/average_spacing_example.cpp index 6cb5d5fbc41..b00e6c9a1f7 100644 --- a/Point_set_processing_3/examples/Point_set_processing_3/average_spacing_example.cpp +++ b/Point_set_processing_3/examples/Point_set_processing_3/average_spacing_example.cpp @@ -1,5 +1,5 @@ #include -#include +#include #include #include @@ -26,8 +26,8 @@ int main(void) // Average Spacing const unsigned int nb_neighbors = 7; typedef std::deque::iterator Iterator; - FT average_spacing = CGAL::average_spacing_3(points.begin(), points.end(), - nb_neighbors); + FT average_spacing = CGAL::compute_average_spacing(points.begin(), points.end(), + nb_neighbors); std::cout << "Average spacing = " << average_spacing << std::endl; return EXIT_SUCCESS; diff --git a/Point_set_processing_3/examples/Point_set_processing_3/jet_smoothing_example.cpp b/Point_set_processing_3/examples/Point_set_processing_3/jet_smoothing_example.cpp index 4d36e5d804e..4995df53d83 100644 --- a/Point_set_processing_3/examples/Point_set_processing_3/jet_smoothing_example.cpp +++ b/Point_set_processing_3/examples/Point_set_processing_3/jet_smoothing_example.cpp @@ -1,5 +1,5 @@ #include -#include +#include #include // types @@ -23,7 +23,7 @@ int main(void) // smoothing std::deque output; const unsigned int nb_neighbors = 8; - CGAL::jet_smoothing_3(points.begin(),points.end(),std::back_inserter(output),nb_neighbors); + CGAL::jet_smooth_point_set(points.begin(),points.end(),std::back_inserter(output),nb_neighbors); return EXIT_SUCCESS; } diff --git a/Point_set_processing_3/examples/Point_set_processing_3/normal_estimation.cpp b/Point_set_processing_3/examples/Point_set_processing_3/normal_estimation.cpp index 2e70ff23d58..b4aa90b26c2 100644 --- a/Point_set_processing_3/examples/Point_set_processing_3/normal_estimation.cpp +++ b/Point_set_processing_3/examples/Point_set_processing_3/normal_estimation.cpp @@ -17,9 +17,9 @@ #include // This package -#include -#include -#include +#include +#include +#include #include #include #include @@ -53,9 +53,9 @@ typedef std::deque PointList; // ---------------------------------------------------------------------------- // Compute normals direction by Principal Component Analysis -void run_pca_normal_estimation(const PointList& points, // input point set - std::deque& computed_normals, // normals to estimate - double nb_neighbors_pca_normals /* % */) // number of neighbors +void run_pca_estimate_normals(const PointList& points, // input point set + std::deque& computed_normals, // normals to estimate + double nb_neighbors_pca_normals /* % */) // number of neighbors { CGAL::Timer task_timer; task_timer.start(); @@ -69,9 +69,9 @@ void run_pca_normal_estimation(const PointList& points, // input point set std::cerr << "Estimate Normals Direction by PCA (k=" << nb_neighbors_pca_normals << "%=" << nb_neighbors <<")...\n"; - CGAL::pca_normal_estimation(points.begin(), points.end(), - std::back_inserter(computed_normals), - nb_neighbors); + CGAL::pca_estimate_normals(points.begin(), points.end(), + std::back_inserter(computed_normals), + nb_neighbors); long memory = CGAL::Memory_sizer().virtual_size(); std::cerr << "done: " << task_timer.time() << " seconds, " @@ -80,9 +80,9 @@ void run_pca_normal_estimation(const PointList& points, // input point set } // Compute normals direction by Jet Fitting -void run_jet_normal_estimation(const PointList& points, // input point set - std::deque& computed_normals, // normals to estimate - double nb_neighbors_jet_fitting_normals /* % */) // number of neighbors +void run_jet_estimate_normals(const PointList& points, // input point set + std::deque& computed_normals, // normals to estimate + double nb_neighbors_jet_fitting_normals /* % */) // number of neighbors { CGAL::Timer task_timer; task_timer.start(); @@ -96,9 +96,9 @@ void run_jet_normal_estimation(const PointList& points, // input point set std::cerr << "Estimate Normals Direction by Jet Fitting (k=" << nb_neighbors_jet_fitting_normals << "%=" << nb_neighbors <<")...\n"; - CGAL::jet_normal_estimation(points.begin(), points.end(), - std::back_inserter(computed_normals), - nb_neighbors); + CGAL::jet_estimate_normals(points.begin(), points.end(), + std::back_inserter(computed_normals), + nb_neighbors); long memory = CGAL::Memory_sizer().virtual_size(); std::cerr << "done: " << task_timer.time() << " seconds, " @@ -107,9 +107,9 @@ void run_jet_normal_estimation(const PointList& points, // input point set } // Test Hoppe92 normal orientation using a Minimum Spanning Tree. -void run_mst_normal_orientation(const PointList& points, // input point set - std::deque& computed_normals, // normals to orient - unsigned int nb_neighbors_mst) // number of neighbors +void run_mst_orient_normals(const PointList& points, // input point set + std::deque& computed_normals, // normals to orient + unsigned int nb_neighbors_mst) // number of neighbors { std::cerr << "Orient Normals with a Minimum Spanning Tree (k="<< nb_neighbors_mst << ")...\n"; CGAL::Timer task_timer; task_timer.start(); @@ -119,11 +119,11 @@ void run_mst_normal_orientation(const PointList& points, // input point set for (n = computed_normals.begin(); n != computed_normals.end(); n++) n->set_orientation(false); - // mst_normal_orientation() requires an iterator over points + // mst_orient_normals() requires an iterator over points // + property maps to access each point's index, position and normal. // We use the points index as iterator. boost::identity_property_map index_id; // identity - CGAL::mst_normal_orientation( + CGAL::mst_orient_normals( (std::size_t)0, points.size(), // use the points index as iterator index_id, // index -> index property map = identity boost::make_iterator_property_map(points.begin(), index_id), // index -> position prop. map @@ -291,13 +291,13 @@ int main(int argc, char * argv[]) // Estimate normals direction. if (estimate == "plane") - run_pca_normal_estimation(points, computed_normals, nb_neighbors_pca_normals); + run_pca_estimate_normals(points, computed_normals, nb_neighbors_pca_normals); else if (estimate == "quadric") - run_jet_normal_estimation(points, computed_normals, nb_neighbors_jet_fitting_normals); + run_jet_estimate_normals(points, computed_normals, nb_neighbors_jet_fitting_normals); // Orient normals. if (orient == "MST") - run_mst_normal_orientation(points, computed_normals, nb_neighbors_mst); + run_mst_orient_normals(points, computed_normals, nb_neighbors_mst); //*************************************** // Save the point set diff --git a/Point_set_processing_3/examples/Point_set_processing_3/pca_normal_estimation_example.cpp b/Point_set_processing_3/examples/Point_set_processing_3/pca_estimate_normals_example.cpp similarity index 82% rename from Point_set_processing_3/examples/Point_set_processing_3/pca_normal_estimation_example.cpp rename to Point_set_processing_3/examples/Point_set_processing_3/pca_estimate_normals_example.cpp index 2cafa8c175e..f7f7a6ce742 100644 --- a/Point_set_processing_3/examples/Point_set_processing_3/pca_normal_estimation_example.cpp +++ b/Point_set_processing_3/examples/Point_set_processing_3/pca_estimate_normals_example.cpp @@ -1,7 +1,7 @@ #include #include -#include -#include +#include +#include #include #include #include @@ -31,16 +31,16 @@ int main(void) // Estimate normals direction. std::deque output; const int nb_neighbors = 7; // K-nearest neighbors - CGAL::pca_normal_estimation(points.begin(), points.end(), - std::back_inserter(output), - nb_neighbors); + CGAL::pca_estimate_normals(points.begin(), points.end(), + std::back_inserter(output), + nb_neighbors); // Orient normals. - // mst_normal_orientation() requires an iterator over points + // mst_orient_normals() requires an iterator over points // + property maps to access each point's index, position and normal. // We use the points index as iterator. boost::identity_property_map index_id; // identity - CGAL::mst_normal_orientation( + CGAL::mst_orient_normals( (std::size_t)0, points.size(), // use the points index as iterator index_id, // index -> index property map = identity boost::make_iterator_property_map(points.begin(), index_id), // index -> position prop. map diff --git a/Point_set_processing_3/examples/Point_set_processing_3/quick_test_suite.sh b/Point_set_processing_3/examples/Point_set_processing_3/quick_test_suite.sh index 49a63ae87b5..3e2017d48e9 100755 --- a/Point_set_processing_3/examples/Point_set_processing_3/quick_test_suite.sh +++ b/Point_set_processing_3/examples/Point_set_processing_3/quick_test_suite.sh @@ -90,8 +90,8 @@ else run average_spacing_example run jet_smoothing_example run normal_estimation - run outlier_removal_example - run pca_normal_estimation_example + run remove_outliers_example + run pca_estimate_normals_example run random_simplification_example run read_write_xyz_point_set_example fi diff --git a/Point_set_processing_3/examples/Point_set_processing_3/random_simplification_example.cpp b/Point_set_processing_3/examples/Point_set_processing_3/random_simplification_example.cpp index 67ffd3274cc..1153bc20764 100644 --- a/Point_set_processing_3/examples/Point_set_processing_3/random_simplification_example.cpp +++ b/Point_set_processing_3/examples/Point_set_processing_3/random_simplification_example.cpp @@ -1,5 +1,5 @@ #include -#include +#include #include #include @@ -25,7 +25,7 @@ int main(void) // Random Point Set Simplification options const double random_simplification_percentage = 50.0 /* % */; // percentage of outliers to remove std::deque output; - CGAL::random_simplification_3( + CGAL::random_simplify_point_set( points.begin(), points.end(), std::back_inserter(output), random_simplification_percentage); diff --git a/Point_set_processing_3/examples/Point_set_processing_3/outlier_removal_example.cpp b/Point_set_processing_3/examples/Point_set_processing_3/remove_outliers_example.cpp similarity index 94% rename from Point_set_processing_3/examples/Point_set_processing_3/outlier_removal_example.cpp rename to Point_set_processing_3/examples/Point_set_processing_3/remove_outliers_example.cpp index df2fd9b3494..aaa4b366a7b 100644 --- a/Point_set_processing_3/examples/Point_set_processing_3/outlier_removal_example.cpp +++ b/Point_set_processing_3/examples/Point_set_processing_3/remove_outliers_example.cpp @@ -1,5 +1,5 @@ #include -#include +#include #include #include @@ -26,7 +26,7 @@ int main(void) const double threshold_percent_avg_knn_sq_dst = 5.0 /* % */; // percentage of outliers to remove const int nb_neighbors = 7; // K-nearest neighbors std::deque output; - CGAL::outlier_removal_3( + CGAL::remove_outliers( points.begin(), points.end(), std::back_inserter(output), nb_neighbors, diff --git a/Point_set_processing_3/include/CGAL/average_spacing_3.h b/Point_set_processing_3/include/CGAL/compute_average_spacing.h similarity index 79% rename from Point_set_processing_3/include/CGAL/average_spacing_3.h rename to Point_set_processing_3/include/CGAL/compute_average_spacing.h index 08e6c3f03a9..9da7f9cf8ce 100644 --- a/Point_set_processing_3/include/CGAL/average_spacing_3.h +++ b/Point_set_processing_3/include/CGAL/compute_average_spacing.h @@ -46,9 +46,9 @@ namespace CGALi { template < typename Kernel, typename Tree > typename Kernel::FT -average_spacing_3(const typename Kernel::Point_3& query, ///< 3D point whose spacing we want to compute - Tree& tree, ///< KD-tree - unsigned int k) ///< number of neighbors +compute_average_spacing(const typename Kernel::Point_3& query, ///< 3D point whose spacing we want to compute + Tree& tree, ///< KD-tree + unsigned int k) ///< number of neighbors { // basic geometric types typedef typename Kernel::FT FT; @@ -105,10 +105,10 @@ template typename Kernel::FT -average_spacing_3(InputIterator first, ///< iterator over the first input point. - InputIterator beyond, ///< past-the-end iterator over input points. - unsigned int k, ///< number of neighbors. - const Kernel& kernel) ///< geometric traits. +compute_average_spacing(InputIterator first, ///< iterator over the first input point. + InputIterator beyond, ///< past-the-end iterator over input points. + unsigned int k, ///< number of neighbors. + const Kernel& kernel) ///< geometric traits. { // types for K nearest neighbors search structure typedef typename Kernel::FT FT; @@ -134,7 +134,7 @@ average_spacing_3(InputIterator first, ///< iterator over the first input poi InputIterator it; for(it = first; it != beyond; it++) { - sum_spacings += CGALi::average_spacing_3(*it,tree,k); + sum_spacings += CGALi::compute_average_spacing(*it,tree,k); nb_points++; } @@ -156,13 +156,13 @@ template < typename InputIterator, typename FT > FT -average_spacing_3(InputIterator first, ///< iterator over the first input point. - InputIterator beyond, ///< past-the-end iterator over input points. - unsigned int k) ///< number of neighbors. +compute_average_spacing(InputIterator first, ///< iterator over the first input point. + InputIterator beyond, ///< past-the-end iterator over input points. + unsigned int k) ///< number of neighbors. { typedef typename std::iterator_traits::value_type Value_type; typedef typename Kernel_traits::Kernel Kernel; - return average_spacing_3(first,beyond,k,Kernel()); + return compute_average_spacing(first,beyond,k,Kernel()); } diff --git a/Point_set_processing_3/include/CGAL/improved_laplacian_smoothing_3.h b/Point_set_processing_3/include/CGAL/improved_laplacian_smooth_point_set.h similarity index 95% rename from Point_set_processing_3/include/CGAL/improved_laplacian_smoothing_3.h rename to Point_set_processing_3/include/CGAL/improved_laplacian_smooth_point_set.h index 0ad0d376096..700be4c2641 100644 --- a/Point_set_processing_3/include/CGAL/improved_laplacian_smoothing_3.h +++ b/Point_set_processing_3/include/CGAL/improved_laplacian_smooth_point_set.h @@ -16,8 +16,8 @@ // // Author(s) : Nader Salman and Laurent Saboret -#ifndef CGAL_IMPROVED_LAPLACIAN_SMOOTHING_3_H -#define CGAL_IMPROVED_LAPLACIAN_SMOOTHING_3_H +#ifndef CGAL_IMPROVED_LAPLACIAN_SMOOTH_POINT_SET_H +#define CGAL_IMPROVED_LAPLACIAN_SMOOTH_POINT_SET_H #include #include @@ -140,7 +140,7 @@ laplacian_smoothing_3( template typename Kernel::Point_3 -improved_laplacian_smoothing_3( +improved_laplacian_smooth_point_set( const typename Kernel::Point_3& pi, ///< 3D point to smooth const typename Kernel::Vector_3& bi, ///< bi movement Tree& tree, ///< KD-tree @@ -199,7 +199,7 @@ template OutputIterator -improved_laplacian_smoothing_3( +improved_laplacian_smooth_point_set( InputIterator first, ///< iterator over the first input point. InputIterator beyond, ///< past-the-end iterator over input points. OutputIterator output, ///< iterator over the first output point. @@ -265,7 +265,7 @@ improved_laplacian_smoothing_3( // Note: the cast to (Point_3&) ensures compatibility with classes derived from Point_3. for(it = first, i=0; it != beyond; it++, ++i) { - p[i] = improved_laplacian_smoothing_i::improved_laplacian_smoothing_3(p[i],b[i],tree,b,k,beta); + p[i] = improved_laplacian_smoothing_i::improved_laplacian_smooth_point_set(p[i],b[i],tree,b,k,beta); } } @@ -298,7 +298,7 @@ improved_laplacian_smoothing_3( template void -improved_laplacian_smoothing_3( +improved_laplacian_smooth_point_set( ForwardIterator first, ///< iterator over the first input/output point. ForwardIterator beyond, ///< past-the-end iterator. const unsigned int k, ///< number of neighbors. @@ -363,7 +363,7 @@ improved_laplacian_smoothing_3( // Note: the cast to (Point_3&) ensures compatibility with classes derived from Point_3. for(it = first, i=0; it != beyond; it++, ++i) { - p[i] = improved_laplacian_smoothing_i::improved_laplacian_smoothing_3(p[i],b[i],tree,b,k,beta); + p[i] = improved_laplacian_smoothing_i::improved_laplacian_smooth_point_set(p[i],b[i],tree,b,k,beta); } } @@ -389,7 +389,7 @@ template OutputIterator -improved_laplacian_smoothing_3( +improved_laplacian_smooth_point_set( InputIterator first, ///< iterator over the first input point. InputIterator beyond, ///< past-the-end iterator over input points. OutputIterator output, ///< iterator over the first output point. @@ -400,7 +400,7 @@ improved_laplacian_smoothing_3( { typedef typename std::iterator_traits::value_type Input_point_3; typedef typename Kernel_traits::Kernel Kernel; - return improved_laplacian_smoothing_3(first,beyond,output,k,iter_number,Kernel(),alpha, beta); + return improved_laplacian_smooth_point_set(first,beyond,output,k,iter_number,Kernel(),alpha, beta); } /// Improved Laplacian smoothing (Vollmer et al) @@ -418,7 +418,7 @@ improved_laplacian_smoothing_3( /// @param ForwardIterator value_type must be convertible to Point_3. template void -improved_laplacian_smoothing_3( +improved_laplacian_smooth_point_set( ForwardIterator first, ///< iterator over the first input/output point. ForwardIterator beyond, ///< past-the-end iterator. unsigned int k, ///< number of neighbors. @@ -428,11 +428,11 @@ improved_laplacian_smoothing_3( { typedef typename std::iterator_traits::value_type Input_point_3; typedef typename Kernel_traits::Kernel Kernel; - improved_laplacian_smoothing_3(first,beyond,k,iter_number,Kernel(),alpha, beta); + improved_laplacian_smooth_point_set(first,beyond,k,iter_number,Kernel(),alpha, beta); } CGAL_END_NAMESPACE -#endif // CGAL_IMPROVED_LAPLACIAN_SMOOTHING_3_H +#endif // CGAL_IMPROVED_LAPLACIAN_SMOOTH_POINT_SET_H diff --git a/Point_set_processing_3/include/CGAL/jet_normal_estimation.h b/Point_set_processing_3/include/CGAL/jet_estimate_normals.h similarity index 81% rename from Point_set_processing_3/include/CGAL/jet_normal_estimation.h rename to Point_set_processing_3/include/CGAL/jet_estimate_normals.h index 87f6adf6200..7e9b0d689da 100644 --- a/Point_set_processing_3/include/CGAL/jet_normal_estimation.h +++ b/Point_set_processing_3/include/CGAL/jet_estimate_normals.h @@ -16,8 +16,8 @@ // // Author(s) : Pierre Alliez and Laurent Saboret and Marc Pouget and Frederic Cazals -#ifndef CGAL_JET_NORMAL_ESTIMATION_H -#define CGAL_JET_NORMAL_ESTIMATION_H +#ifndef CGAL_JET_ESTIMATE_NORMALS_H +#define CGAL_JET_ESTIMATE_NORMALS_H #include #include @@ -55,10 +55,10 @@ template < typename Kernel, typename OrientableNormal_3 > OrientableNormal_3 -jet_normal_estimation(const typename Kernel::Point_3& query, ///< point to compute the normal at - Tree& tree, ///< KD-tree - unsigned int k, ///< number of neighbors - unsigned int degree_fitting) +jet_estimate_normals(const typename Kernel::Point_3& query, ///< point to compute the normal at + Tree& tree, ///< KD-tree + unsigned int k, ///< number of neighbors + unsigned int degree_fitting) { // basic geometric types typedef typename Kernel::Point_3 Point; @@ -129,14 +129,14 @@ template OutputIterator -jet_normal_estimation(InputIterator first, ///< iterator over the first input point. - InputIterator beyond, ///< past-the-end iterator over input points. - OutputIterator normals, ///< output normals. - unsigned int k, ///< number of neighbors. - const Kernel& kernel, ///< geometric traits. - unsigned int degree_fitting) +jet_estimate_normals(InputIterator first, ///< iterator over the first input point. + InputIterator beyond, ///< past-the-end iterator over input points. + OutputIterator normals, ///< output normals. + unsigned int k, ///< number of neighbors. + const Kernel& kernel, ///< geometric traits. + unsigned int degree_fitting) { - CGAL_TRACE("Call jet_normal_estimation()\n"); + CGAL_TRACE("Call jet_estimate_normals()\n"); // value_type_traits is a workaround as back_insert_iterator's value_type is void typedef typename value_type_traits::type Normal; @@ -168,12 +168,12 @@ jet_normal_estimation(InputIterator first, ///< iterator over the first input po InputIterator it; for(it = first; it != beyond; it++) { - *normals = CGALi::jet_normal_estimation(*it,tree,k,degree_fitting); + *normals = CGALi::jet_estimate_normals(*it,tree,k,degree_fitting); normals++; } /*long*/ memory = CGAL::Memory_sizer().virtual_size(); CGAL_TRACE(" %ld Mb allocated\n", memory>>20); - CGAL_TRACE("End of jet_normal_estimation()\n"); + CGAL_TRACE("End of jet_estimate_normals()\n"); return normals; } @@ -193,19 +193,19 @@ template OutputIterator -jet_normal_estimation(InputIterator first, ///< iterator over the first input point - InputIterator beyond, ///< past-the-end iterator over input points - OutputIterator normals, ///< output normals - unsigned int k, ///< number of neighbors - unsigned int degree_fitting = 2) +jet_estimate_normals(InputIterator first, ///< iterator over the first input point + InputIterator beyond, ///< past-the-end iterator over input points + OutputIterator normals, ///< output normals + unsigned int k, ///< number of neighbors + unsigned int degree_fitting = 2) { typedef typename std::iterator_traits::value_type Value_type; typedef typename Kernel_traits::Kernel Kernel; - return jet_normal_estimation(first,beyond,normals,k,Kernel(),degree_fitting); + return jet_estimate_normals(first,beyond,normals,k,Kernel(),degree_fitting); } CGAL_END_NAMESPACE -#endif // CGAL_JET_NORMAL_ESTIMATION_H +#endif // CGAL_JET_ESTIMATE_NORMALS_H diff --git a/Point_set_processing_3/include/CGAL/jet_smoothing_3.h b/Point_set_processing_3/include/CGAL/jet_smooth_point_set.h similarity index 73% rename from Point_set_processing_3/include/CGAL/jet_smoothing_3.h rename to Point_set_processing_3/include/CGAL/jet_smooth_point_set.h index a12c59a903e..163644fc4b2 100644 --- a/Point_set_processing_3/include/CGAL/jet_smoothing_3.h +++ b/Point_set_processing_3/include/CGAL/jet_smooth_point_set.h @@ -16,8 +16,8 @@ // // Author(s) : Pierre Alliez and Marc Pouget -#ifndef CGAL_JET_SMOOTHING_3_H -#define CGAL_JET_SMOOTHING_3_H +#ifndef CGAL_JET_SMOOTH_POINT_SET_H +#define CGAL_JET_SMOOTH_POINT_SET_H #include #include @@ -48,11 +48,11 @@ namespace CGALi { template typename Kernel::Point_3 -jet_smoothing_3(const typename Kernel::Point_3& query, ///< 3D point to project - Tree& tree, ///< KD-tree - const unsigned int k, - const unsigned int degree_fitting, - const unsigned int degree_monge) +jet_smooth_point_set(const typename Kernel::Point_3& query, ///< 3D point to project + Tree& tree, ///< KD-tree + const unsigned int k, + const unsigned int degree_fitting, + const unsigned int degree_monge) { // basic geometric types typedef typename Kernel::Point_3 Point_3; @@ -118,13 +118,13 @@ template OutputIterator -jet_smoothing_3(InputIterator first, ///< iterator over the first input point. - InputIterator beyond, ///< past-the-end iterator over input points. - OutputIterator output, ///< iterator over the first output point. - const unsigned int k, ///< number of neighbors. - const Kernel& kernel, ///< geometric traits. - const unsigned int degree_fitting = 2, - const unsigned int degree_monge = 2) +jet_smooth_point_set(InputIterator first, ///< iterator over the first input point. + InputIterator beyond, ///< past-the-end iterator over input points. + OutputIterator output, ///< iterator over the first output point. + const unsigned int k, ///< number of neighbors. + const Kernel& kernel, ///< geometric traits. + const unsigned int degree_fitting = 2, + const unsigned int degree_monge = 2) { // Point_3 types typedef typename std::iterator_traits::value_type Input_point_3; @@ -152,7 +152,7 @@ jet_smoothing_3(InputIterator first, ///< iterator over the first input point for(InputIterator it = first; it != beyond; it++) { Input_point_3 point = *it; - (Point_3&)(point) = CGALi::jet_smoothing_3(*it,tree,k,degree_fitting,degree_monge); + (Point_3&)(point) = CGALi::jet_smooth_point_set(*it,tree,k,degree_fitting,degree_monge); *output++ = point; } @@ -176,12 +176,12 @@ jet_smoothing_3(InputIterator first, ///< iterator over the first input point template void -jet_smoothing_3(ForwardIterator first, ///< iterator over the first input/output point. - ForwardIterator beyond, ///< past-the-end iterator. - unsigned int k, ///< number of neighbors. - const Kernel& kernel, ///< geometric traits. - const unsigned int degree_fitting = 2, - const unsigned int degree_monge = 2) +jet_smooth_point_set(ForwardIterator first, ///< iterator over the first input/output point. + ForwardIterator beyond, ///< past-the-end iterator. + unsigned int k, ///< number of neighbors. + const Kernel& kernel, ///< geometric traits. + const unsigned int degree_fitting = 2, + const unsigned int degree_monge = 2) { // Point_3 types typedef typename std::iterator_traits::value_type Input_point_3; @@ -208,7 +208,7 @@ jet_smoothing_3(ForwardIterator first, ///< iterator over the first input/ou // Note: the cast to (Point_3&) ensures compatibility with classes derived from Point_3. ForwardIterator it; for(it = first; it != beyond; it++) - (Point_3&)(*it) = CGALi::jet_smoothing_3(*it,tree,k,degree_fitting,degree_monge); + (Point_3&)(*it) = CGALi::jet_smooth_point_set(*it,tree,k,degree_fitting,degree_monge); } @@ -227,16 +227,16 @@ template OutputIterator -jet_smoothing_3(InputIterator first, ///< iterator over the first input point - InputIterator beyond, ///< past-the-end iterator over input points - OutputIterator output, ///< iterator over the first output point - unsigned int k, ///< number of neighbors - const unsigned int degree_fitting = 2, - const unsigned int degree_monge = 2) +jet_smooth_point_set(InputIterator first, ///< iterator over the first input point + InputIterator beyond, ///< past-the-end iterator over input points + OutputIterator output, ///< iterator over the first output point + unsigned int k, ///< number of neighbors + const unsigned int degree_fitting = 2, + const unsigned int degree_monge = 2) { typedef typename std::iterator_traits::value_type Input_point_3; typedef typename Kernel_traits::Kernel Kernel; - return jet_smoothing_3(first,beyond,output,k,Kernel(),degree_fitting,degree_monge); + return jet_smooth_point_set(first,beyond,output,k,Kernel(),degree_fitting,degree_monge); } /// Smooths points by fitting jet surfaces over their k @@ -254,19 +254,19 @@ jet_smoothing_3(InputIterator first, ///< iterator over the first input point /// @param ForwardIterator value_type must be convertible to Point_3. template void -jet_smoothing_3(ForwardIterator first, ///< iterator over the first input/output point - ForwardIterator beyond, ///< past-the-end iterator - unsigned int k, ///< number of neighbors - const unsigned int degree_fitting = 2, - const unsigned int degree_monge = 2) +jet_smooth_point_set(ForwardIterator first, ///< iterator over the first input/output point + ForwardIterator beyond, ///< past-the-end iterator + unsigned int k, ///< number of neighbors + const unsigned int degree_fitting = 2, + const unsigned int degree_monge = 2) { typedef typename std::iterator_traits::value_type Input_point_3; typedef typename Kernel_traits::Kernel Kernel; - jet_smoothing_3(first,beyond,k,Kernel(),degree_fitting,degree_monge); + jet_smooth_point_set(first,beyond,k,Kernel(),degree_fitting,degree_monge); } CGAL_END_NAMESPACE -#endif // CGAL_JET_SMOOTHING_3_H +#endif // CGAL_JET_SMOOTH_POINT_SET_H diff --git a/Point_set_processing_3/include/CGAL/merge_simplification_nearest_points_3.h b/Point_set_processing_3/include/CGAL/merge_simplify_nearest_point_set.h similarity index 92% rename from Point_set_processing_3/include/CGAL/merge_simplification_nearest_points_3.h rename to Point_set_processing_3/include/CGAL/merge_simplify_nearest_point_set.h index b7191009add..1d5284d459d 100644 --- a/Point_set_processing_3/include/CGAL/merge_simplification_nearest_points_3.h +++ b/Point_set_processing_3/include/CGAL/merge_simplify_nearest_point_set.h @@ -16,8 +16,8 @@ // // Author(s) : Nader Salman -#ifndef CGAL_MERGE_SIMPLIFICATION_NEAREST_POINTS_3_H -#define CGAL_MERGE_SIMPLIFICATION_NEAREST_POINTS_3_H +#ifndef CGAL_MERGE_SIMPLIFY_NEAREST_POINT_SET_H +#define CGAL_MERGE_SIMPLIFY_NEAREST_POINT_SET_H #include #include @@ -36,7 +36,7 @@ template OutputIterator -merge_simplification_nearest_points_3( +merge_simplify_nearest_point_set( InputIterator first, ///< iterator over the first input point. InputIterator beyond, ///< past-the-end iterator over input points. OutputIterator output, ///< iterator over the first output point. @@ -106,7 +106,7 @@ template OutputIterator -merge_simplification_nearest_points_3( +merge_simplify_nearest_point_set( InputIterator first, ///< iterator over the first input point InputIterator beyond, ///< past-the-end iterator over input points OutputIterator output, ///< iterator over the first output point @@ -115,11 +115,11 @@ merge_simplification_nearest_points_3( { typedef typename std::iterator_traits::value_type Value_type; typedef typename CGAL::Kernel_traits::Kernel Kernel; - return merge_simplification_nearest_points_3(first,beyond,output,k,epsilon,Kernel()); + return merge_simplify_nearest_point_set(first,beyond,output,k,epsilon,Kernel()); } CGAL_END_NAMESPACE -#endif // CGAL_MERGE_SIMPLIFICATION_NEAREST_POINTS_3_H +#endif // CGAL_MERGE_SIMPLIFY_NEAREST_POINT_SET_H diff --git a/Point_set_processing_3/include/CGAL/merge_simplification_3.h b/Point_set_processing_3/include/CGAL/merge_simplify_point_set.h similarity index 94% rename from Point_set_processing_3/include/CGAL/merge_simplification_3.h rename to Point_set_processing_3/include/CGAL/merge_simplify_point_set.h index bbc1d5cd9ff..7d469544bd1 100644 --- a/Point_set_processing_3/include/CGAL/merge_simplification_3.h +++ b/Point_set_processing_3/include/CGAL/merge_simplify_point_set.h @@ -15,8 +15,8 @@ // // Author(s) : Laurent Saboret and Nader Salman -#ifndef CGAL_MERGE_SIMPLIFICATION_3_H -#define CGAL_MERGE_SIMPLIFICATION_3_H +#ifndef CGAL_MERGE_SIMPLIFY_POINT_SET_H +#define CGAL_MERGE_SIMPLIFY_POINT_SET_H #include #include @@ -33,7 +33,7 @@ CGAL_BEGIN_NAMESPACE namespace CGALi { -/// Utility class for merge_simplification_3(): +/// Utility class for merge_simplify_point_set(): /// Less_epsilon_points_3 defines a 3D points order / 2 points are equal /// iff they belong to the same cell of a grid of cell size = epsilon. template @@ -81,7 +81,7 @@ private: // ---------------------------------------------------------------------------- -/// Utility class for merge_simplification_3(): +/// Utility class for merge_simplify_point_set(): /// 3D points set which allows at most 1 point per cell /// of a grid of cell size = epsilon. /// @@ -126,7 +126,7 @@ template OutputIterator -merge_simplification_3( +merge_simplify_point_set( InputIterator first, ///< iterator over the first input point. InputIterator beyond, ///< past-the-end iterator over input points. OutputIterator output, ///< iterator over the first output point. @@ -165,11 +165,11 @@ template ForwardIterator -merge_simplification_3( +merge_simplify_point_set( ForwardIterator first, ///< iterator over the first input/output point. ForwardIterator beyond, ///< past-the-end iterator. double epsilon, ///< tolerance value when comparing 3D points. - const Kernel& kernel) ///< geometric traits. + const Kernel& kernel) ///< geometric traits. { typedef typename std::iterator_traits::value_type Point; @@ -210,7 +210,7 @@ template OutputIterator -merge_simplification_3( +merge_simplify_point_set( InputIterator first, ///< iterator over the first input point. InputIterator beyond, ///< past-the-end iterator over input points. OutputIterator output, ///< iterator over the first output point. @@ -218,7 +218,7 @@ merge_simplification_3( { typedef typename std::iterator_traits::value_type Value_type; typedef typename Kernel_traits::Kernel Kernel; - return merge_simplification_3(first,beyond,output,epsilon,Kernel()); + return merge_simplify_point_set(first,beyond,output,epsilon,Kernel()); } /// Merge points which belong to the same cell of a grid of cell size = epsilon. @@ -237,18 +237,18 @@ merge_simplification_3( /// @return First iterator to remove (see erase-remove idiom). template ForwardIterator -merge_simplification_3( +merge_simplify_point_set( ForwardIterator first, ///< iterator over the first input/output point ForwardIterator beyond, ///< past-the-end iterator double epsilon) ///< tolerance value when comparing 3D points { typedef typename std::iterator_traits::value_type Value_type; typedef typename Kernel_traits::Kernel Kernel; - return merge_simplification_3(first,beyond,epsilon,Kernel()); + return merge_simplify_point_set(first,beyond,epsilon,Kernel()); } CGAL_END_NAMESPACE -#endif // CGAL_MERGE_SIMPLIFICATION_3_H +#endif // CGAL_MERGE_SIMPLIFY_POINT_SET_H diff --git a/Point_set_processing_3/include/CGAL/mst_normal_orientation.h b/Point_set_processing_3/include/CGAL/mst_orient_normals.h similarity index 98% rename from Point_set_processing_3/include/CGAL/mst_normal_orientation.h rename to Point_set_processing_3/include/CGAL/mst_orient_normals.h index 8cfd4c30a99..97b83787949 100644 --- a/Point_set_processing_3/include/CGAL/mst_normal_orientation.h +++ b/Point_set_processing_3/include/CGAL/mst_orient_normals.h @@ -16,8 +16,8 @@ // // Author(s) : Pierre Alliez and Laurent Saboret and Andreas Fabri -#ifndef CGAL_MST_NORMAL_ORIENTATION_H -#define CGAL_MST_NORMAL_ORIENTATION_H +#ifndef CGAL_MST_ORIENT_NORMALS_H +#define CGAL_MST_ORIENT_NORMALS_H #include #include @@ -57,7 +57,7 @@ distance(std::size_t _First, std::size_t _Last) /// Helper class: Riemannian graph. /// -/// This class is used internally by mst_normal_orientation() +/// This class is used internally by mst_orient_normals() /// to encode: /// - the adjacency relations of vertices in a K-neighboring /// - vertices contain the corresponding input vertex handle @@ -80,7 +80,7 @@ class Riemannian_graph /// Helper class: MST graph /// -/// This class is used internally by mst_normal_orientation() +/// This class is used internally by mst_orient_normals() /// to encode: /// - the adjacency relations of vertices in a Minimum Spanning Tree /// - vertices contain the corresponding input vertex handle @@ -106,7 +106,7 @@ public: /// Helper class: Propagate_normal_orientation /// -/// This class is used internally by mst_normal_orientation() +/// This class is used internally by mst_orient_normals() /// to propage the normal orientation, starting from a source vertex /// and following the adjacency relations of vertices in a Minimum Spanning Tree. /// @@ -513,7 +513,7 @@ create_mst_graph( template unsigned int -mst_normal_orientation( +mst_orient_normals( VertexIterator first, ///< first input vertex VertexIterator beyond, ///< past-the-end input vertex VertexIndexMap vertex_index_map, ///< property map VertexIterator -> index @@ -521,7 +521,7 @@ mst_normal_orientation( VertexNormalMap vertex_normal_map, ///< property map VertexIterator -> Normal (in and out) unsigned int k) ///< number of neighbors { - CGAL_TRACE("Call mst_normal_orientation()\n"); + CGAL_TRACE("Call mst_orient_normals()\n"); // Bring private stuff to scope using namespace CGALi; @@ -583,7 +583,7 @@ mst_normal_orientation( CGAL_TRACE(" => %u normals are unoriented\n", unoriented_normals); /*long*/ memory = CGAL::Memory_sizer().virtual_size(); CGAL_TRACE(" %ld Mb allocated\n", memory>>20); - CGAL_TRACE("End of mst_normal_orientation()\n"); + CGAL_TRACE("End of mst_orient_normals()\n"); // At this stage, we have typically 0 unoriented normals if k is large enough return unoriented_normals; @@ -592,5 +592,5 @@ mst_normal_orientation( CGAL_END_NAMESPACE -#endif // CGAL_MST_NORMAL_ORIENTATION_H +#endif // CGAL_MST_ORIENT_NORMALS_H diff --git a/Point_set_processing_3/include/CGAL/pca_normal_estimation.h b/Point_set_processing_3/include/CGAL/pca_estimate_normals.h similarity index 84% rename from Point_set_processing_3/include/CGAL/pca_normal_estimation.h rename to Point_set_processing_3/include/CGAL/pca_estimate_normals.h index cf7596b68cb..4ea91300d5e 100644 --- a/Point_set_processing_3/include/CGAL/pca_normal_estimation.h +++ b/Point_set_processing_3/include/CGAL/pca_estimate_normals.h @@ -16,8 +16,8 @@ // // Author(s) : Pierre Alliez and Laurent Saboret -#ifndef CGAL_PCA_NORMAL_ESTIMATION_H -#define CGAL_PCA_NORMAL_ESTIMATION_H +#ifndef CGAL_PCA_ESTIMATE_NORMALS_H +#define CGAL_PCA_ESTIMATE_NORMALS_H #include #include @@ -56,7 +56,7 @@ template < typename Kernel, typename OrientableNormal_3 > OrientableNormal_3 -pca_normal_estimation(const typename Kernel::Point_3& query, ///< 3D point whose normal we want to compute +pca_estimate_normals(const typename Kernel::Point_3& query, ///< 3D point whose normal we want to compute Tree& tree, ///< KD-tree unsigned int k) ///< number of neighbors { @@ -125,13 +125,13 @@ template OutputIterator -pca_normal_estimation(InputIterator first, ///< iterator over the first input point. - InputIterator beyond, ///< past-the-end iterator over input points. - OutputIterator normals, ///< output normals. - unsigned int k, ///< number of neighbors. - const Kernel& kernel) ///< geometric traits. +pca_estimate_normals(InputIterator first, ///< iterator over the first input point. + InputIterator beyond, ///< past-the-end iterator over input points. + OutputIterator normals, ///< output normals. + unsigned int k, ///< number of neighbors. + const Kernel& kernel) ///< geometric traits. { - CGAL_TRACE("Call pca_normal_estimation()\n"); + CGAL_TRACE("Call pca_estimate_normals()\n"); // value_type_traits is a workaround as back_insert_iterator's value_type is void typedef typename value_type_traits::type Normal; @@ -163,12 +163,12 @@ pca_normal_estimation(InputIterator first, ///< iterator over the first input po InputIterator it; for(it = first; it != beyond; it++) { - *normals = CGALi::pca_normal_estimation(*it,tree,k); + *normals = CGALi::pca_estimate_normals(*it,tree,k); normals++; } /*long*/ memory = CGAL::Memory_sizer().virtual_size(); CGAL_TRACE(" %ld Mb allocated\n", memory>>20); - CGAL_TRACE("End of pca_normal_estimation()\n"); + CGAL_TRACE("End of pca_estimate_normals()\n"); return normals; } @@ -190,18 +190,18 @@ template OutputIterator -pca_normal_estimation(InputIterator first, ///< iterator over the first input point. - InputIterator beyond, ///< past-the-end iterator over input points. - OutputIterator normals, ///< output normals. - unsigned int k) ///< number of neighbors. +pca_estimate_normals(InputIterator first, ///< iterator over the first input point. + InputIterator beyond, ///< past-the-end iterator over input points. + OutputIterator normals, ///< output normals. + unsigned int k) ///< number of neighbors. { typedef typename std::iterator_traits::value_type Value_type; typedef typename Kernel_traits::Kernel Kernel; - return pca_normal_estimation(first,beyond,normals,k,Kernel()); + return pca_estimate_normals(first,beyond,normals,k,Kernel()); } CGAL_END_NAMESPACE -#endif // CGAL_PCA_NORMAL_ESTIMATION_H +#endif // CGAL_PCA_ESTIMATE_NORMALS_H diff --git a/Point_set_processing_3/include/CGAL/radial_normal_orientation_3.h b/Point_set_processing_3/include/CGAL/radial_orient_normals.h similarity index 81% rename from Point_set_processing_3/include/CGAL/radial_normal_orientation_3.h rename to Point_set_processing_3/include/CGAL/radial_orient_normals.h index d8984f5209d..fdcf8ca27f2 100644 --- a/Point_set_processing_3/include/CGAL/radial_normal_orientation_3.h +++ b/Point_set_processing_3/include/CGAL/radial_orient_normals.h @@ -16,8 +16,8 @@ // // Author(s) : Laurent Saboret -#ifndef CGAL_RADIAL_NORMAL_ORIENTATION_3_H -#define CGAL_RADIAL_NORMAL_ORIENTATION_3_H +#ifndef CGAL_RADIAL_ORIENT_NORMALS_H +#define CGAL_RADIAL_ORIENT_NORMALS_H #include #include @@ -44,13 +44,13 @@ CGAL_BEGIN_NAMESPACE template void -radial_normal_orientation_3(VertexIterator first, ///< first input vertex. - VertexIterator beyond, ///< past-the-end input vertex. - VertexIndexMap vertex_index_map, ///< property map VertexIterator -> index. - VertexPointMap vertex_point_map, ///< property map VertexIterator -> Point_3. - VertexNormalMap vertex_normal_map) ///< property map VertexIterator -> Normal (in and out). +radial_orient_normals(VertexIterator first, ///< first input vertex. + VertexIterator beyond, ///< past-the-end input vertex. + VertexIndexMap vertex_index_map, ///< property map VertexIterator -> index. + VertexPointMap vertex_point_map, ///< property map VertexIterator -> Point_3. + VertexNormalMap vertex_normal_map) ///< property map VertexIterator -> Normal (in and out). { - CGAL_TRACE("Call radial_normal_orientation_3()\n"); + CGAL_TRACE("Call radial_orient_normals()\n"); // Input mesh's types typedef typename boost::property_traits::value_type Point; @@ -102,11 +102,11 @@ radial_normal_orientation_3(VertexIterator first, ///< first input vertex. } long memory = CGAL::Memory_sizer().virtual_size(); CGAL_TRACE(" %ld Mb allocated\n", memory>>20); - CGAL_TRACE("End of radial_normal_orientation_3()\n"); + CGAL_TRACE("End of radial_orient_normals()\n"); } CGAL_END_NAMESPACE -#endif // CGAL_RADIAL_NORMAL_ORIENTATION_3_H +#endif // CGAL_RADIAL_ORIENT_NORMALS_H diff --git a/Point_set_processing_3/include/CGAL/random_simplification_3.h b/Point_set_processing_3/include/CGAL/random_simplify_point_set.h similarity index 93% rename from Point_set_processing_3/include/CGAL/random_simplification_3.h rename to Point_set_processing_3/include/CGAL/random_simplify_point_set.h index b8a96e565a0..0030feb5618 100644 --- a/Point_set_processing_3/include/CGAL/random_simplification_3.h +++ b/Point_set_processing_3/include/CGAL/random_simplify_point_set.h @@ -15,8 +15,8 @@ // // Author(s) : Laurent Saboret -#ifndef CGAL_RANDOM_SIMPLIFICATION_3_H -#define CGAL_RANDOM_SIMPLIFICATION_3_H +#ifndef CGAL_RANDOM_SIMPLIFY_POINT_SET_H +#define CGAL_RANDOM_SIMPLIFY_POINT_SET_H #include #include @@ -40,7 +40,7 @@ template OutputIterator -random_simplification_3( +random_simplify_point_set( InputIterator first, ///< iterator over the first input point. InputIterator beyond, ///< past-the-end iterator over input points. OutputIterator output, ///< iterator over the first output point. @@ -81,7 +81,7 @@ template ForwardIterator -random_simplification_3( +random_simplify_point_set( ForwardIterator first, ///< iterator over the first input/output point. ForwardIterator beyond, ///< past-the-end iterator. double threshold_percent, ///< percentage of points to remove. @@ -115,7 +115,7 @@ template OutputIterator -random_simplification_3( +random_simplify_point_set( InputIterator first, ///< iterator over the first input point InputIterator beyond, ///< past-the-end iterator over input points OutputIterator output, ///< iterator over the first output point @@ -123,7 +123,7 @@ random_simplification_3( { typedef typename std::iterator_traits::value_type Value_type; typedef typename Kernel_traits::Kernel Kernel; - return random_simplification_3(first,beyond,output,threshold_percent,Kernel()); + return random_simplify_point_set(first,beyond,output,threshold_percent,Kernel()); } /// Randomly deletes a user-specified fraction of the input points. @@ -140,18 +140,18 @@ random_simplification_3( /// @return First iterator to remove (see erase-remove idiom). template ForwardIterator -random_simplification_3( +random_simplify_point_set( ForwardIterator first, ///< iterator over the first input/output point ForwardIterator beyond, ///< past-the-end iterator double threshold_percent) ///< percentage of points to remove { typedef typename std::iterator_traits::value_type Value_type; typedef typename Kernel_traits::Kernel Kernel; - return random_simplification_3(first,beyond,threshold_percent,Kernel()); + return random_simplify_point_set(first,beyond,threshold_percent,Kernel()); } CGAL_END_NAMESPACE -#endif // CGAL_RANDOM_SIMPLIFICATION_3_H +#endif // CGAL_RANDOM_SIMPLIFY_POINT_SET_H diff --git a/Point_set_processing_3/include/CGAL/outlier_removal_3.h b/Point_set_processing_3/include/CGAL/remove_outliers.h similarity index 96% rename from Point_set_processing_3/include/CGAL/outlier_removal_3.h rename to Point_set_processing_3/include/CGAL/remove_outliers.h index 42ca8469cb2..e9fd5c8f0d2 100644 --- a/Point_set_processing_3/include/CGAL/outlier_removal_3.h +++ b/Point_set_processing_3/include/CGAL/remove_outliers.h @@ -16,8 +16,8 @@ // // Author(s) : Laurent Saboret and Nader Salman and Pierre Alliez -#ifndef CGAL_OUTLIER_REMOVAL_3_H -#define CGAL_OUTLIER_REMOVAL_3_H +#ifndef CGAL_REMOVE_OUTLIERS_H +#define CGAL_REMOVE_OUTLIERS_H #include #include @@ -35,7 +35,7 @@ CGAL_BEGIN_NAMESPACE namespace CGALi { -/// Utility function for outlier_removal_3(): +/// Utility function for remove_outliers(): /// compute average squared distance to the K nearest neighbors. /// /// @commentheading Precondition: k >= 2. @@ -115,7 +115,7 @@ template OutputIterator -outlier_removal_3( +remove_outliers( InputIterator first, ///< iterator over the first input point. InputIterator beyond, ///< past-the-end iterator over input points. OutputIterator output, ///< iterator over the first output point. @@ -188,7 +188,7 @@ template ForwardIterator -outlier_removal_3( +remove_outliers( ForwardIterator first, ///< iterator over the first input/output point. ForwardIterator beyond, ///< past-the-end iterator. unsigned int k, ///< number of neighbors. @@ -261,7 +261,7 @@ template OutputIterator -outlier_removal_3( +remove_outliers( InputIterator first, ///< iterator over the first input point InputIterator beyond, ///< past-the-end iterator over input points OutputIterator output, ///< iterator over the first output point @@ -270,7 +270,7 @@ outlier_removal_3( { typedef typename std::iterator_traits::value_type Value_type; typedef typename Kernel_traits::Kernel Kernel; - return outlier_removal_3(first,beyond,output,k,Kernel(),threshold_percent); + return remove_outliers(first,beyond,output,k,Kernel(),threshold_percent); } /// Remove outliers: @@ -291,7 +291,7 @@ outlier_removal_3( /// @return First iterator to remove (see erase-remove idiom). template ForwardIterator -outlier_removal_3( +remove_outliers( ForwardIterator first, ///< iterator over the first input/output point ForwardIterator beyond, ///< past-the-end iterator unsigned int k, ///< number of neighbors @@ -299,11 +299,11 @@ outlier_removal_3( { typedef typename std::iterator_traits::value_type Value_type; typedef typename Kernel_traits::Kernel Kernel; - return outlier_removal_3(first,beyond,k,Kernel(),threshold_percent); + return remove_outliers(first,beyond,k,Kernel(),threshold_percent); } CGAL_END_NAMESPACE -#endif // CGAL_OUTLIER_REMOVAL_3_H +#endif // CGAL_REMOVE_OUTLIERS_H diff --git a/Point_set_processing_3/include/CGAL/outlier_removal_wrt_median_knn_sq_distance_3.h b/Point_set_processing_3/include/CGAL/remove_outliers_wrt_median_knn_sq_distance.h similarity index 95% rename from Point_set_processing_3/include/CGAL/outlier_removal_wrt_median_knn_sq_distance_3.h rename to Point_set_processing_3/include/CGAL/remove_outliers_wrt_median_knn_sq_distance.h index 3c0ed1da5fa..9fe6ab1541c 100644 --- a/Point_set_processing_3/include/CGAL/outlier_removal_wrt_median_knn_sq_distance_3.h +++ b/Point_set_processing_3/include/CGAL/remove_outliers_wrt_median_knn_sq_distance.h @@ -16,8 +16,8 @@ // // Author(s) : Nader Salman -#ifndef CGAL_OUTLIER_REMOVAL_WRT_MEDIAN_KNN_SQ_DISTANCE_3_H -#define CGAL_OUTLIER_REMOVAL_WRT_MEDIAN_KNN_SQ_DISTANCE_3_H +#ifndef CGAL_REMOVE_OUTLIERS_WRT_MEDIAN_KNN_SQ_DISTANCE_H +#define CGAL_REMOVE_OUTLIERS_WRT_MEDIAN_KNN_SQ_DISTANCE_H #include #include @@ -35,7 +35,7 @@ CGAL_BEGIN_NAMESPACE namespace CGALi { -/// Utility function for outlier_removal_wrt_median_knn_sq_distance_3(): +/// Utility function for remove_outliers_wrt_median_knn_sq_distance(): /// Compute median squared distance to the K nearest neighbors. /// /// @commentheading Precondition: k >= 2. @@ -172,7 +172,7 @@ template OutputIterator -outlier_removal_wrt_median_knn_sq_distance_3( +remove_outliers_wrt_median_knn_sq_distance( InputIterator first, ///< iterator over the first input point. InputIterator beyond, ///< past-the-end iterator over input points. OutputIterator output, ///< iterator over the first output point. @@ -245,7 +245,7 @@ template ForwardIterator -outlier_removal_wrt_median_knn_sq_distance_3( +remove_outliers_wrt_median_knn_sq_distance( ForwardIterator first, ///< iterator over the first input/output point. ForwardIterator beyond, ///< past-the-end iterator. unsigned int k, ///< number of neighbors. @@ -318,7 +318,7 @@ template OutputIterator -outlier_removal_wrt_median_knn_sq_distance_3( +remove_outliers_wrt_median_knn_sq_distance( InputIterator first, ///< iterator over the first input point. InputIterator beyond, ///< past-the-end iterator over input points. OutputIterator output, ///< iterator over the first output point. @@ -327,7 +327,7 @@ outlier_removal_wrt_median_knn_sq_distance_3( { typedef typename std::iterator_traits::value_type Value_type; typedef typename Kernel_traits::Kernel Kernel; - return outlier_removal_wrt_median_knn_sq_distance_3(first,beyond,output,k,Kernel(),threshold_percent); + return remove_outliers_wrt_median_knn_sq_distance(first,beyond,output,k,Kernel(),threshold_percent); } /// Remove outliers: @@ -348,7 +348,7 @@ outlier_removal_wrt_median_knn_sq_distance_3( /// @return First iterator to remove (see erase-remove idiom). template ForwardIterator -outlier_removal_wrt_median_knn_sq_distance_3( +remove_outliers_wrt_median_knn_sq_distance( ForwardIterator first, ///< iterator over the first input/output point. ForwardIterator beyond, ///< past-the-end iterator. unsigned int k, ///< number of neighbors. @@ -356,11 +356,11 @@ outlier_removal_wrt_median_knn_sq_distance_3( { typedef typename std::iterator_traits::value_type Value_type; typedef typename Kernel_traits::Kernel Kernel; - return outlier_removal_wrt_median_knn_sq_distance_3(first,beyond,k,Kernel(),threshold_percent); + return remove_outliers_wrt_median_knn_sq_distance(first,beyond,k,Kernel(),threshold_percent); } CGAL_END_NAMESPACE -#endif // CGAL_OUTLIER_REMOVAL_WRT_MEDIAN_KNN_SQ_DISTANCE_3_H +#endif // CGAL_REMOVE_OUTLIERS_WRT_MEDIAN_KNN_SQ_DISTANCE_H diff --git a/Point_set_processing_3/test/Point_set_processing_3/CMakeLists.txt b/Point_set_processing_3/test/Point_set_processing_3/CMakeLists.txt index f3e4b742842..67c233c1932 100644 --- a/Point_set_processing_3/test/Point_set_processing_3/CMakeLists.txt +++ b/Point_set_processing_3/test/Point_set_processing_3/CMakeLists.txt @@ -46,7 +46,7 @@ if ( CGAL_FOUND ) # Executables that do *not* require LAPACK create_single_source_cgal_program( "analysis_test.cpp" ) - create_single_source_cgal_program( "outlier_removal_test.cpp" ) + create_single_source_cgal_program( "remove_outliers_test.cpp" ) # Link with BLAS and LAPACK (optional) find_package(LAPACK) diff --git a/Point_set_processing_3/test/Point_set_processing_3/analysis_test.cpp b/Point_set_processing_3/test/Point_set_processing_3/analysis_test.cpp index ada7683e807..2a4ebae1a2d 100644 --- a/Point_set_processing_3/test/Point_set_processing_3/analysis_test.cpp +++ b/Point_set_processing_3/test/Point_set_processing_3/analysis_test.cpp @@ -14,7 +14,7 @@ #include // This package -#include +#include #include #include @@ -46,8 +46,8 @@ void test_average_spacing(std::deque& points, // input point set CGAL::Timer task_timer; task_timer.start(); typedef std::deque::iterator Iterator; - std::cerr << CGAL::average_spacing_3(points.begin(), points.end(), - nb_neighbors_avg_spacing) << "\n"; + std::cerr << CGAL::compute_average_spacing(points.begin(), points.end(), + nb_neighbors_avg_spacing) << "\n"; long memory = CGAL::Memory_sizer().virtual_size(); std::cerr << "ok: " << task_timer.time() << " seconds, " diff --git a/Point_set_processing_3/test/Point_set_processing_3/normal_estimation_test.cpp b/Point_set_processing_3/test/Point_set_processing_3/normal_estimation_test.cpp index 26e082a519d..f7f122748a6 100644 --- a/Point_set_processing_3/test/Point_set_processing_3/normal_estimation_test.cpp +++ b/Point_set_processing_3/test/Point_set_processing_3/normal_estimation_test.cpp @@ -16,9 +16,9 @@ #include // This package -#include -#include -#include +#include +#include +#include #include #include #include @@ -119,9 +119,9 @@ bool verify_normal_direction(const PointList& points, // input point set // Compute normals direction by Principal Component Analysis // @return true on success. -bool test_pca_normal_estimation(const PointList& points, // input point set - std::deque& computed_normals, // normals to estimate - double nb_neighbors_pca_normals /* % */) // number of neighbors +bool test_pca_estimate_normals(const PointList& points, // input point set + std::deque& computed_normals, // normals to estimate + double nb_neighbors_pca_normals /* % */) // number of neighbors { CGAL::Timer task_timer; task_timer.start(); @@ -135,9 +135,9 @@ bool test_pca_normal_estimation(const PointList& points, // input point set std::cerr << "Estimate Normals Direction by PCA (k=" << nb_neighbors_pca_normals << "%=" << nb_neighbors <<")...\n"; - CGAL::pca_normal_estimation(points.begin(), points.end(), - std::back_inserter(computed_normals), - nb_neighbors); + CGAL::pca_estimate_normals(points.begin(), points.end(), + std::back_inserter(computed_normals), + nb_neighbors); long memory = CGAL::Memory_sizer().virtual_size(); std::cerr << "done: " << task_timer.time() << " seconds, " @@ -151,9 +151,9 @@ bool test_pca_normal_estimation(const PointList& points, // input point set // Compute normals direction by Jet Fitting // @return true on success. -bool test_jet_normal_estimation(const PointList& points, // input point set - std::deque& computed_normals, // normals to estimate - double nb_neighbors_jet_fitting_normals /* % */) // number of neighbors +bool test_jet_estimate_normals(const PointList& points, // input point set + std::deque& computed_normals, // normals to estimate + double nb_neighbors_jet_fitting_normals /* % */) // number of neighbors { CGAL::Timer task_timer; task_timer.start(); @@ -167,9 +167,9 @@ bool test_jet_normal_estimation(const PointList& points, // input point set std::cerr << "Estimate Normals Direction by Jet Fitting (k=" << nb_neighbors_jet_fitting_normals << "%=" << nb_neighbors <<")...\n"; - CGAL::jet_normal_estimation(points.begin(), points.end(), - std::back_inserter(computed_normals), - nb_neighbors); + CGAL::jet_estimate_normals(points.begin(), points.end(), + std::back_inserter(computed_normals), + nb_neighbors); long memory = CGAL::Memory_sizer().virtual_size(); std::cerr << "done: " << task_timer.time() << " seconds, " @@ -248,9 +248,9 @@ bool verify_normal_orientation(const PointList& points, // input point set // Test Hoppe92 normal orientation using a Minimum Spanning Tree. // @return true on success. -bool test_mst_normal_orientation(const PointList& points, // input point set - std::deque& computed_normals, // normals to orient - unsigned int nb_neighbors_mst) // number of neighbors +bool test_mst_orient_normals(const PointList& points, // input point set + std::deque& computed_normals, // normals to orient + unsigned int nb_neighbors_mst) // number of neighbors { std::cerr << "Orient Normals with a Minimum Spanning Tree (k="<< nb_neighbors_mst << ")...\n"; CGAL::Timer task_timer; task_timer.start(); @@ -260,11 +260,11 @@ bool test_mst_normal_orientation(const PointList& points, // input point set for (n = computed_normals.begin(); n != computed_normals.end(); n++) n->set_orientation(false); - // mst_normal_orientation() requires an iterator over points + // mst_orient_normals() requires an iterator over points // + property maps to access each point's index, position and normal. // We use the points index as iterator. boost::identity_property_map index_id; // identity - CGAL::mst_normal_orientation( + CGAL::mst_orient_normals( (std::size_t)0, points.size(), // use the points index as iterator index_id, // index -> index property map = identity boost::make_iterator_property_map(points.begin(), index_id), // index -> position prop. map @@ -379,13 +379,13 @@ int main(int argc, char * argv[]) std::deque computed_normals; // Estimate normals direction. - success = test_pca_normal_estimation(points, computed_normals, nb_neighbors_pca_normals); + success = test_pca_estimate_normals(points, computed_normals, nb_neighbors_pca_normals); if ( ! success ) accumulated_fatal_err = EXIT_FAILURE; // set error and continue // Orient normals. // Check normal orientation. - success = test_mst_normal_orientation(points, computed_normals, nb_neighbors_mst); + success = test_mst_orient_normals(points, computed_normals, nb_neighbors_mst); if ( ! success ) accumulated_fatal_err = EXIT_FAILURE; // set error and continue @@ -396,13 +396,13 @@ int main(int argc, char * argv[]) computed_normals.clear(); // Estimate normals direction - success = test_jet_normal_estimation(points, computed_normals, nb_neighbors_jet_fitting_normals); + success = test_jet_estimate_normals(points, computed_normals, nb_neighbors_jet_fitting_normals); if ( ! success ) accumulated_fatal_err = EXIT_FAILURE; // set error and continue // Orient normals // Check normal orientation. - success = test_mst_normal_orientation(points, computed_normals, nb_neighbors_mst); + success = test_mst_orient_normals(points, computed_normals, nb_neighbors_mst); if ( ! success ) accumulated_fatal_err = EXIT_FAILURE; // set error and continue diff --git a/Point_set_processing_3/test/Point_set_processing_3/quick_test_suite.sh b/Point_set_processing_3/test/Point_set_processing_3/quick_test_suite.sh index 4b91a4e11d9..152025fd8d6 100755 --- a/Point_set_processing_3/test/Point_set_processing_3/quick_test_suite.sh +++ b/Point_set_processing_3/test/Point_set_processing_3/quick_test_suite.sh @@ -89,7 +89,7 @@ else echo "Run all tests." run analysis_test run normal_estimation_test - run outlier_removal_test + run remove_outliers_test run smoothing_test fi diff --git a/Point_set_processing_3/test/Point_set_processing_3/outlier_removal_test.cmd b/Point_set_processing_3/test/Point_set_processing_3/remove_outliers_test.cmd similarity index 100% rename from Point_set_processing_3/test/Point_set_processing_3/outlier_removal_test.cmd rename to Point_set_processing_3/test/Point_set_processing_3/remove_outliers_test.cmd diff --git a/Point_set_processing_3/test/Point_set_processing_3/outlier_removal_test.cpp b/Point_set_processing_3/test/Point_set_processing_3/remove_outliers_test.cpp similarity index 85% rename from Point_set_processing_3/test/Point_set_processing_3/outlier_removal_test.cpp rename to Point_set_processing_3/test/Point_set_processing_3/remove_outliers_test.cpp index 40d12e28a0e..d67c5c45774 100644 --- a/Point_set_processing_3/test/Point_set_processing_3/outlier_removal_test.cpp +++ b/Point_set_processing_3/test/Point_set_processing_3/remove_outliers_test.cpp @@ -1,4 +1,4 @@ -// outlier_removal_test.cpp +// remove_outliers_test.cpp //---------------------------------------------------------- // Test the outlier removal methods: @@ -6,7 +6,7 @@ // Input format is .xyz. // No output. //---------------------------------------------------------- -// outlier_removal_test points1.xyz points2.xyz... +// remove_outliers_test points1.xyz points2.xyz... // CGAL #include @@ -15,7 +15,7 @@ #include // This package -#include +#include #include #include @@ -41,13 +41,13 @@ typedef Kernel::Point_3 Point; // ---------------------------------------------------------------------------- void test_avg_knn_sq_distance(std::deque& points, // input point set - double nb_neighbors_outlier_removal, // number of neighbors + double nb_neighbors_remove_outliers, // number of neighbors double threshold_percent_avg_knn_sq_dst) // percentage of points to remove { CGAL::Timer task_timer; task_timer.start(); // percentage -> number of neighbors - int nb_neighbors = int(double(points.size()) * nb_neighbors_outlier_removal / 100.0); + int nb_neighbors = int(double(points.size()) * nb_neighbors_remove_outliers / 100.0); if (nb_neighbors < 7) nb_neighbors = 7; if ((unsigned int)nb_neighbors > points.size()-1) @@ -55,20 +55,20 @@ void test_avg_knn_sq_distance(std::deque& points, // input point set std::cerr << "Remove outliers wrt average squared distance to k nearest neighbors (remove " << threshold_percent_avg_knn_sq_dst << "%, k=" - << nb_neighbors_outlier_removal << "%=" << nb_neighbors << ")...\n"; + << nb_neighbors_remove_outliers << "%=" << nb_neighbors << ")...\n"; std::deque output; - CGAL::outlier_removal_3( + CGAL::remove_outliers( points.begin(), points.end(), std::back_inserter(output), nb_neighbors, threshold_percent_avg_knn_sq_dst); // mutating version of the same function - points.erase(CGAL::outlier_removal_3( - points.begin(), points.end(), - nb_neighbors, - threshold_percent_avg_knn_sq_dst), + points.erase(CGAL::remove_outliers( + points.begin(), points.end(), + nb_neighbors, + threshold_percent_avg_knn_sq_dst), points.end()); long memory = CGAL::Memory_sizer().virtual_size(); @@ -103,7 +103,7 @@ int main(int argc, char * argv[]) // Outlier Removal options const double threshold_percent_avg_knn_sq_dst = 5.0 /* % */; // percentage of outliers to remove - const double nb_neighbors_outlier_removal = 0.05 /* % */; // K-nearest neighbors (outlier removal) + const double nb_neighbors_remove_outliers = 0.05 /* % */; // K-nearest neighbors (outlier removal) // Accumulated errors int accumulated_fatal_err = EXIT_SUCCESS; @@ -144,7 +144,7 @@ int main(int argc, char * argv[]) // Test //*************************************** - test_avg_knn_sq_distance(points, nb_neighbors_outlier_removal, threshold_percent_avg_knn_sq_dst); + test_avg_knn_sq_distance(points, nb_neighbors_remove_outliers, threshold_percent_avg_knn_sq_dst); } // for each input file diff --git a/Point_set_processing_3/test/Point_set_processing_3/smoothing_test.cpp b/Point_set_processing_3/test/Point_set_processing_3/smoothing_test.cpp index b09c797bcc1..2388ea6c03b 100644 --- a/Point_set_processing_3/test/Point_set_processing_3/smoothing_test.cpp +++ b/Point_set_processing_3/test/Point_set_processing_3/smoothing_test.cpp @@ -14,7 +14,7 @@ #include // This package -#include +#include #include #include @@ -56,18 +56,18 @@ void test_smooth_jet_fitting(std::deque& points,// input point set << nb_neighbors_smooth_jet_fitting << "%=" << nb_neighbors << ")...\n"; std::deque output; - CGAL::jet_smoothing_3(points.begin(), points.end(), - std::back_inserter(output), - nb_neighbors); + CGAL::jet_smooth_point_set(points.begin(), points.end(), + std::back_inserter(output), + nb_neighbors); // mutating version of the same function - CGAL::jet_smoothing_3(points.begin(), points.end(), - nb_neighbors); + CGAL::jet_smooth_point_set(points.begin(), points.end(), + nb_neighbors); long memory = CGAL::Memory_sizer().virtual_size(); std::cerr << "ok: " << task_timer.time() << " seconds, " - << (memory>>20) << " Mb allocated" - << std::endl; + << (memory>>20) << " Mb allocated" + << std::endl; } diff --git a/Surface_reconstruction_points_3/demo/Surface_reconstruction_points_3/Point_set_demo/Point_set_demo_APSS_reconstruction_plugin_cgal_code.cpp b/Surface_reconstruction_points_3/demo/Surface_reconstruction_points_3/Point_set_demo/Point_set_demo_APSS_reconstruction_plugin_cgal_code.cpp index ee1430a5e68..5565db14ac9 100644 --- a/Surface_reconstruction_points_3/demo/Surface_reconstruction_points_3/Point_set_demo/Point_set_demo_APSS_reconstruction_plugin_cgal_code.cpp +++ b/Surface_reconstruction_points_3/demo/Surface_reconstruction_points_3/Point_set_demo/Point_set_demo_APSS_reconstruction_plugin_cgal_code.cpp @@ -15,7 +15,7 @@ // This package #include -#include +#include #include @@ -117,7 +117,7 @@ Polyhedron* APSS_reconstruct(const Point_set& points, // Convert to polyhedron Polyhedron* output_mesh = new Polyhedron; - CGAL::surface_reconstruction_output_surface_facets(surface_mesher_c2t3, *output_mesh); + CGAL::output_surface_facets_to_polyhedron(surface_mesher_c2t3, *output_mesh); //*************************************** // Erase small connected components diff --git a/Surface_reconstruction_points_3/demo/Surface_reconstruction_points_3/poisson/DialogOptions.cpp b/Surface_reconstruction_points_3/demo/Surface_reconstruction_points_3/poisson/DialogOptions.cpp index c9f6dc1bee8..13a2a4c70ee 100644 --- a/Surface_reconstruction_points_3/demo/Surface_reconstruction_points_3/poisson/DialogOptions.cpp +++ b/Surface_reconstruction_points_3/demo/Surface_reconstruction_points_3/poisson/DialogOptions.cpp @@ -23,7 +23,7 @@ CDialogOptions::CDialogOptions(CWnd* pParent /*=NULL*/) , m_contouring_value(0) , m_lambda(0) , m_nb_neighbors_avg_spacing(0) - , m_nb_neighbors_outlier_removal(0) + , m_nb_neighbors_remove_outliers(0) , m_nb_neighbors_smooth_jet_fitting(0) , m_nb_neighbors_pca_normals(0) , m_nb_neighbors_jet_fitting_normals(0) @@ -58,7 +58,7 @@ void CDialogOptions::DoDataExchange(CDataExchange* pDX) DDX_Text(pDX,IDC_EDIT_CONTOURING_VALUE,m_contouring_value); DDX_Text(pDX,IDC_EDIT_LAMBDA,m_lambda); DDX_Text(pDX,IDC_EDIT_NB_NEIGHBORS_AVG_SPACING,m_nb_neighbors_avg_spacing); - DDX_Text(pDX,IDC_EDIT_NB_NEIGHBORS_OUTLIER_REMOVAL,m_nb_neighbors_outlier_removal); + DDX_Text(pDX,IDC_EDIT_NB_NEIGHBORS_OUTLIER_REMOVAL,m_nb_neighbors_remove_outliers); DDX_Text(pDX,IDC_EDIT_NB_NEIGHBORS_SMOOTH_JET_FITTING,m_nb_neighbors_smooth_jet_fitting); DDX_Text(pDX,IDC_EDIT_NB_NEIGHBORS_PCA_NORMALS,m_nb_neighbors_pca_normals); DDX_Text(pDX,IDC_EDIT_NB_NEIGHBORS_JET_FITTING_NORMALS,m_nb_neighbors_jet_fitting_normals); diff --git a/Surface_reconstruction_points_3/demo/Surface_reconstruction_points_3/poisson/DialogOptions.h b/Surface_reconstruction_points_3/demo/Surface_reconstruction_points_3/poisson/DialogOptions.h index 0b3514d67ef..995a27f9ea0 100644 --- a/Surface_reconstruction_points_3/demo/Surface_reconstruction_points_3/poisson/DialogOptions.h +++ b/Surface_reconstruction_points_3/demo/Surface_reconstruction_points_3/poisson/DialogOptions.h @@ -32,7 +32,7 @@ public: double m_contouring_value; // Poisson contouring value (TEST) double m_lambda; // laplacian smoothing unsigned int m_nb_neighbors_avg_spacing; // K-nearest neighbors (average spacing) - double m_nb_neighbors_outlier_removal; // K-nearest neighbors (outlier_removal) + double m_nb_neighbors_remove_outliers; // K-nearest neighbors (remove_outliers) double m_nb_neighbors_smooth_jet_fitting; // K-nearest neighbors (smooth points by Jet Fitting) double m_nb_neighbors_pca_normals; // K-nearest neighbors (estimate normals by PCA) double m_nb_neighbors_jet_fitting_normals; // K-nearest neighbors (estimate normals by Jet Fitting) diff --git a/Surface_reconstruction_points_3/demo/Surface_reconstruction_points_3/poisson/PoissonDoc.cpp b/Surface_reconstruction_points_3/demo/Surface_reconstruction_points_3/poisson/PoissonDoc.cpp index ee582d75ea4..51e0f1966c6 100644 --- a/Surface_reconstruction_points_3/demo/Surface_reconstruction_points_3/poisson/PoissonDoc.cpp +++ b/Surface_reconstruction_points_3/demo/Surface_reconstruction_points_3/poisson/PoissonDoc.cpp @@ -9,7 +9,7 @@ #include "compute_normal.h" #include "read_pwc_point_set.h" #include "read_g23_point_set.h" -#include "outlier_removal_wrt_camera_cone_angle_3.h" +#include "remove_outliers_wrt_camera_cone_angle.h" #include "normal_orientation_wrt_cameras.h" // CGAL @@ -28,16 +28,16 @@ #include #include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -177,7 +177,7 @@ CPoissonDoc::CPoissonDoc() // Outlier Removal options m_min_cameras_cone_angle = 0.5 /* degrees */; // min angle of camera's cone m_threshold_percent_avg_knn_sq_dst = 5.0 /* % */; // percentage of outliers to remove - m_nb_neighbors_outlier_removal = 0.05 /* % */; // K-nearest neighbors (outlier removal) + m_nb_neighbors_remove_outliers = 0.05 /* % */; // K-nearest neighbors (outlier removal) // Point Set Simplification options m_clustering_step = 0.004; // Grid's step for simplification by clustering @@ -572,7 +572,7 @@ void CPoissonDoc::OnEditOptions() dlg.m_contouring_value = m_contouring_value; dlg.m_lambda = m_lambda; dlg.m_nb_neighbors_avg_spacing = m_nb_neighbors_avg_spacing; - dlg.m_nb_neighbors_outlier_removal = m_nb_neighbors_outlier_removal; + dlg.m_nb_neighbors_remove_outliers = m_nb_neighbors_remove_outliers; dlg.m_nb_neighbors_smooth_jet_fitting = m_nb_neighbors_smooth_jet_fitting; dlg.m_nb_neighbors_pca_normals = m_nb_neighbors_pca_normals; dlg.m_nb_neighbors_jet_fitting_normals = m_nb_neighbors_jet_fitting_normals; @@ -597,7 +597,7 @@ void CPoissonDoc::OnEditOptions() m_contouring_value = dlg.m_contouring_value; m_lambda = dlg.m_lambda; m_nb_neighbors_avg_spacing = dlg.m_nb_neighbors_avg_spacing; - m_nb_neighbors_outlier_removal = dlg.m_nb_neighbors_outlier_removal; + m_nb_neighbors_remove_outliers = dlg.m_nb_neighbors_remove_outliers; m_nb_neighbors_smooth_jet_fitting = dlg.m_nb_neighbors_smooth_jet_fitting; m_nb_neighbors_pca_normals = dlg.m_nb_neighbors_pca_normals; m_nb_neighbors_jet_fitting_normals = dlg.m_nb_neighbors_jet_fitting_normals; @@ -696,9 +696,9 @@ void CPoissonDoc::OnAlgorithmsEstimateNormalsByPCA() status_message("Estimate Normals Direction by PCA (k=%.2lf%%=%d)...", m_nb_neighbors_pca_normals, nb_neighbors); - CGAL::pca_normal_estimation(m_points.begin(), m_points.end(), - m_points.normals_begin(), - nb_neighbors); + CGAL::pca_estimate_normals(m_points.begin(), m_points.end(), + m_points.normals_begin(), + nb_neighbors); status_message("Estimate Normals Direction by PCA...done (%.2lf s)", task_timer.time()); @@ -732,9 +732,9 @@ void CPoissonDoc::OnAlgorithmsEstimateNormalsByJetFitting() status_message("Estimate Normals Direction by Jet Fitting (k=%.2lf%%=%d)...", m_nb_neighbors_jet_fitting_normals, nb_neighbors); - CGAL::jet_normal_estimation(m_points.begin(), m_points.end(), - m_points.normals_begin(), - nb_neighbors); + CGAL::jet_estimate_normals(m_points.begin(), m_points.end(), + m_points.normals_begin(), + nb_neighbors); status_message("Estimate Normals Direction by Jet Fitting...done (%.2lf s)", task_timer.time()); @@ -828,11 +828,11 @@ void CPoissonDoc::OnAlgorithmsOrientNormalsWithMST() for (Point_set::iterator p = m_points.begin(); p != m_points.end(); p++) p->normal().set_orientation(false); - CGAL::mst_normal_orientation(m_points.begin(), m_points.end(), - get(boost::vertex_index, m_points), - get(CGAL::vertex_point, m_points), - get(boost::vertex_normal, m_points), - m_nb_neighbors_mst); + CGAL::mst_orient_normals(m_points.begin(), m_points.end(), + get(boost::vertex_index, m_points), + get(CGAL::vertex_point, m_points), + get(boost::vertex_normal, m_points), + m_nb_neighbors_mst); status_message("Orient Normals with a Minimum Spanning Tree...done (%.2lf s)", task_timer.time()); @@ -1125,7 +1125,7 @@ void CPoissonDoc::OnReconstructionPoissonSurfaceMeshing() // get output surface std::deque triangles; - CGAL::surface_reconstruction_output_surface_facets(m_surface_mesher_c2t3, std::back_inserter(triangles)); + CGAL::output_surface_facets_to_triangle_soup(m_surface_mesher_c2t3, std::back_inserter(triangles)); m_surface.insert(m_surface.end(), triangles.begin(), triangles.end()); // Reset contouring value @@ -1218,8 +1218,8 @@ void CPoissonDoc::OnAlgorithmsSmoothUsingJetFitting() m_nb_neighbors_smooth_jet_fitting, nb_neighbors); // Smooth points in m_points[] - CGAL::jet_smoothing_3(m_points.begin(), m_points.end(), - nb_neighbors); + CGAL::jet_smooth_point_set(m_points.begin(), m_points.end(), + nb_neighbors); m_points.invalidate_bounds(); status_message("Smooth Point Set...done (%.2lf s)", task_timer.time()); @@ -1347,7 +1347,7 @@ void CPoissonDoc::OnAlgorithmsOutlierRemovalWrtCamerasConeAngle() // Select points to delete m_points.select(m_points.begin(), m_points.end(), false); Point_set::iterator first_iterator_to_remove = - outlier_removal_wrt_camera_cone_angle_3( + remove_outliers_wrt_camera_cone_angle( m_points.begin(), m_points.end(), m_min_cameras_cone_angle*M_PI/180.0); m_points.select(first_iterator_to_remove, m_points.end(), true); @@ -1374,19 +1374,19 @@ void CPoissonDoc::OnOutlierRemoval() CGAL::Timer task_timer; task_timer.start(); // percentage -> number of neighbors - int nb_neighbors = int(double(m_points.size()) * m_nb_neighbors_outlier_removal / 100.0); + int nb_neighbors = int(double(m_points.size()) * m_nb_neighbors_remove_outliers / 100.0); if (nb_neighbors < 7) nb_neighbors = 7; if ((unsigned int)nb_neighbors > m_points.size()-1) nb_neighbors = m_points.size()-1; status_message("Remove outliers wrt average squared distance to k nearest neighbors (remove %.2lf%%, k=%.2lf%%=%d)...", - m_threshold_percent_avg_knn_sq_dst, m_nb_neighbors_outlier_removal, nb_neighbors); + m_threshold_percent_avg_knn_sq_dst, m_nb_neighbors_remove_outliers, nb_neighbors); // Select points to delete m_points.select(m_points.begin(), m_points.end(), false); Point_set::iterator first_iterator_to_remove = - CGAL::outlier_removal_3( + CGAL::remove_outliers( m_points.begin(), m_points.end(), nb_neighbors, m_threshold_percent_avg_knn_sq_dst); @@ -1409,10 +1409,10 @@ void CPoissonDoc::OnAnalysisAverageSpacing() status_message("Compute average spacing to k nearest neighbors (k=%d)...", m_nb_neighbors_avg_spacing); CGAL::Timer task_timer; task_timer.start(); - double value = CGAL::average_spacing_3(m_points.begin(), - m_points.end(), - m_nb_neighbors_avg_spacing, - Kernel()); + double value = CGAL::compute_average_spacing(m_points.begin(), + m_points.end(), + m_nb_neighbors_avg_spacing, + Kernel()); // write message in message box prompt_message("Average spacing: %lf", value); @@ -1478,7 +1478,7 @@ void CPoissonDoc::OnReconstructionApssReconstruction() // get output surface std::deque triangles; - CGAL::surface_reconstruction_output_surface_facets(m_surface_mesher_c2t3, std::back_inserter(triangles)); + CGAL::output_surface_facets_to_triangle_soup(m_surface_mesher_c2t3, std::back_inserter(triangles)); m_surface.insert(m_surface.end(), triangles.begin(), triangles.end()); // Record new mode @@ -1607,7 +1607,7 @@ void CPoissonDoc::OnPointCloudSimplificationByClustering() // Select points to delete m_points.select(m_points.begin(), m_points.end(), false); Point_set::iterator first_iterator_to_remove = - CGAL::merge_simplification_3( + CGAL::merge_simplify_point_set( m_points.begin(), m_points.end(), m_clustering_step*size); m_points.select(first_iterator_to_remove, m_points.end(), true); @@ -1632,7 +1632,7 @@ void CPoissonDoc::OnPointCloudSimplificationRandom() // Select points to delete m_points.select(m_points.begin(), m_points.end(), false); Point_set::iterator first_iterator_to_remove = - CGAL::random_simplification_3( + CGAL::random_simplify_point_set( m_points.begin(), m_points.end(), m_random_simplification_percentage); m_points.select(first_iterator_to_remove, m_points.end(), true); @@ -1654,10 +1654,10 @@ void CPoissonDoc::OnRadialNormalOrientation() status_message("Radial Normal Orientation..."); CGAL::Timer task_timer; task_timer.start(); - CGAL::radial_normal_orientation_3(m_points.begin(), m_points.end(), - get(boost::vertex_index, m_points), - get(CGAL::vertex_point, m_points), - get(boost::vertex_normal, m_points)); + CGAL::radial_orient_normals(m_points.begin(), m_points.end(), + get(boost::vertex_index, m_points), + get(CGAL::vertex_point, m_points), + get(boost::vertex_normal, m_points)); status_message("Radial Normal Orientation...done (%.2lf s)", task_timer.time()); diff --git a/Surface_reconstruction_points_3/demo/Surface_reconstruction_points_3/poisson/PoissonDoc.h b/Surface_reconstruction_points_3/demo/Surface_reconstruction_points_3/poisson/PoissonDoc.h index 9db3b7d8f05..b65f5e31134 100644 --- a/Surface_reconstruction_points_3/demo/Surface_reconstruction_points_3/poisson/PoissonDoc.h +++ b/Surface_reconstruction_points_3/demo/Surface_reconstruction_points_3/poisson/PoissonDoc.h @@ -141,7 +141,7 @@ private: // Outlier removal double m_min_cameras_cone_angle; // min angle of camera's cone (degrees) double m_threshold_percent_avg_knn_sq_dst; // percentage of outliers to remove - double m_nb_neighbors_outlier_removal; // K-nearest neighbors (outlier_removal) + double m_nb_neighbors_remove_outliers; // K-nearest neighbors (remove_outliers) // Point set simplification double m_clustering_step; // Grid's step for simplification by clustering diff --git a/Surface_reconstruction_points_3/demo/Surface_reconstruction_points_3/poisson/include/outlier_removal_wrt_camera_cone_angle_3.h b/Surface_reconstruction_points_3/demo/Surface_reconstruction_points_3/poisson/include/remove_outliers_wrt_camera_cone_angle.h similarity index 73% rename from Surface_reconstruction_points_3/demo/Surface_reconstruction_points_3/poisson/include/outlier_removal_wrt_camera_cone_angle_3.h rename to Surface_reconstruction_points_3/demo/Surface_reconstruction_points_3/poisson/include/remove_outliers_wrt_camera_cone_angle.h index 6164fd7f95c..f984fe37d85 100644 --- a/Surface_reconstruction_points_3/demo/Surface_reconstruction_points_3/poisson/include/outlier_removal_wrt_camera_cone_angle_3.h +++ b/Surface_reconstruction_points_3/demo/Surface_reconstruction_points_3/poisson/include/remove_outliers_wrt_camera_cone_angle.h @@ -1,7 +1,7 @@ // Author : Nader Salman -#ifndef OUTLIER_REMOVAL_WRT_CAMERA_CONE_ANGLE_3_H -#define OUTLIER_REMOVAL_WRT_CAMERA_CONE_ANGLE_3_H +#ifndef REMOVE_OUTLIERS_WRT_CAMERA_CONE_ANGLE_H +#define REMOVE_OUTLIERS_WRT_CAMERA_CONE_ANGLE_H #include "Gyroviz_point_3.h" @@ -49,7 +49,7 @@ double compute_greatest_camera_angle_3(const Gyroviz_point_3& gpt) return greatest_camera_angle; } -/// Utility class for outlier_removal_wrt_camera_cone_angle_3(): +/// Utility class for remove_outliers_wrt_camera_cone_angle(): /// Predicate that indicates if cameras cone's angle >= min_camera_cone_angle. template struct Is_cameras_cone_angle_greater_equal @@ -86,11 +86,11 @@ template OutputIterator -outlier_removal_wrt_camera_cone_angle_3(InputIterator first, ///< iterator over the first input point - InputIterator beyond, ///< past-the-end iterator over input points - OutputIterator output, ///< iterator over the first output point - double min_camera_cone_angle, ///< min angle of camera's cone (radians) - const Kernel& ) ///< kernel +remove_outliers_wrt_camera_cone_angle(InputIterator first, ///< iterator over the first input point + InputIterator beyond, ///< past-the-end iterator over input points + OutputIterator output, ///< iterator over the first output point + double min_camera_cone_angle, ///< min angle of camera's cone (radians) + const Kernel& kernel) ///< kernel { // geometric types typedef typename Kernel::FT FT; @@ -129,10 +129,10 @@ template ForwardIterator -outlier_removal_wrt_camera_cone_angle_3(ForwardIterator first, ///< iterator over the first input/output point - ForwardIterator beyond, ///< past-the-end iterator - double min_camera_cone_angle, ///< min angle of camera's cone (radians) - const Kernel& ) ///< kernel +remove_outliers_wrt_camera_cone_angle(ForwardIterator first, ///< iterator over the first input/output point + ForwardIterator beyond, ///< past-the-end iterator + double min_camera_cone_angle, ///< min angle of camera's cone (radians) + const Kernel& kernel) ///< kernel { // geometric types typedef typename Kernel::FT FT; @@ -162,14 +162,14 @@ template OutputIterator -outlier_removal_wrt_camera_cone_angle_3(InputIterator first, ///< iterator over the first input point - InputIterator beyond, ///< past-the-end iterator over input points - OutputIterator output, ///< iterator over the first output point - double min_camera_cone_angle) ///< min angle of camera's cone (radians) +remove_outliers_wrt_camera_cone_angle(InputIterator first, ///< iterator over the first input point + InputIterator beyond, ///< past-the-end iterator over input points + OutputIterator output, ///< iterator over the first output point + double min_camera_cone_angle) ///< min angle of camera's cone (radians) { typedef typename std::iterator_traits::value_type Value_type; typedef typename CGAL::Kernel_traits::Kernel Kernel; - return outlier_removal_wrt_camera_cone_angle_3(first,beyond,output,min_camera_cone_angle,Kernel()); + return remove_outliers_wrt_camera_cone_angle(first,beyond,output,min_camera_cone_angle,Kernel()); } /// Remove points / cameras cone's angle < min_camera_cone_angle. @@ -188,15 +188,15 @@ outlier_removal_wrt_camera_cone_angle_3(InputIterator first, ///< iter /// @return First iterator to remove (see erase-remove idiom). template ForwardIterator -outlier_removal_wrt_camera_cone_angle_3(ForwardIterator first, ///< iterator over the first input/output point - ForwardIterator beyond, ///< past-the-end iterator - double min_camera_cone_angle) ///< min angle of camera's cone (radians) +remove_outliers_wrt_camera_cone_angle(ForwardIterator first, ///< iterator over the first input/output point + ForwardIterator beyond, ///< past-the-end iterator + double min_camera_cone_angle) ///< min angle of camera's cone (radians) { typedef typename std::iterator_traits::value_type Value_type; typedef typename CGAL::Kernel_traits::Kernel Kernel; - return outlier_removal_wrt_camera_cone_angle_3(first,beyond,min_camera_cone_angle,Kernel()); + return remove_outliers_wrt_camera_cone_angle(first,beyond,min_camera_cone_angle,Kernel()); } -#endif // OUTLIER_REMOVAL_WRT_CAMERA_CONE_ANGLE_3_H +#endif // REMOVE_OUTLIERS_WRT_CAMERA_CONE_ANGLE_H diff --git a/Surface_reconstruction_points_3/doc_tex/Surface_reconstruction_points_3/pipeline.tex b/Surface_reconstruction_points_3/doc_tex/Surface_reconstruction_points_3/pipeline.tex index be14a8e31c4..e32b848dfbb 100644 --- a/Surface_reconstruction_points_3/doc_tex/Surface_reconstruction_points_3/pipeline.tex +++ b/Surface_reconstruction_points_3/doc_tex/Surface_reconstruction_points_3/pipeline.tex @@ -114,7 +114,8 @@ As examples, we provide functions to: \end{itemize} \ccRefIdfierPage{CGAL::output_surface_facets_to_off} \\ -\ccRefIdfierPage{CGAL::surface_reconstruction_output_surface_facets} \\ +\ccRefIdfierPage{CGAL::output_surface_facets_to_triangle_soup} \\ +\ccRefIdfierPage{CGAL::output_surface_facets_to_polyhedron} \\ Example: diff --git a/Surface_reconstruction_points_3/doc_tex/Surface_reconstruction_points_3_ref/erase_small_polyhedron_connected_components.tex b/Surface_reconstruction_points_3/doc_tex/Surface_reconstruction_points_3_ref/erase_small_polyhedron_connected_components.tex index 28a13e2bdbd..b327d35609f 100644 --- a/Surface_reconstruction_points_3/doc_tex/Surface_reconstruction_points_3_ref/erase_small_polyhedron_connected_components.tex +++ b/Surface_reconstruction_points_3/doc_tex/Surface_reconstruction_points_3_ref/erase_small_polyhedron_connected_components.tex @@ -28,7 +28,7 @@ { Erase small connected components of a polyhedron: erase all connected components but the largest. \ccCommentHeading{Template Parameters} -\ccc{Polyhedron}: an instance of \ccc{Polyhedron_3<>} that supports vertices and removal operation. +\ccc{Polyhedron}: an instance of \ccc{Polyhedron_3} that supports vertices and removal operation. \ccCommentHeading{Returns} the number of connected components erased. } \ccGlue @@ -39,7 +39,7 @@ Erase small connected components of a polyhedron: erase all connected components \ccSeeAlso -\ccRefIdfierPage{CGAL::Polyhedron_3<>} \\ +\ccRefIdfierPage{CGAL::Polyhedron_3} \\ \ccRefIdfierPage{CGAL::get_polyhedron_connected_components} \\ \ccExample diff --git a/Surface_reconstruction_points_3/doc_tex/Surface_reconstruction_points_3_ref/get_polyhedron_connected_components.tex b/Surface_reconstruction_points_3/doc_tex/Surface_reconstruction_points_3_ref/get_polyhedron_connected_components.tex index 9aa530f0b69..fe223121993 100644 --- a/Surface_reconstruction_points_3/doc_tex/Surface_reconstruction_points_3_ref/get_polyhedron_connected_components.tex +++ b/Surface_reconstruction_points_3/doc_tex/Surface_reconstruction_points_3_ref/get_polyhedron_connected_components.tex @@ -28,7 +28,7 @@ { Compute the list of all connected components of a polyhedron. \ccCommentHeading{Template Parameters} -\ccc{Polyhedron}: an instance of \ccc{Polyhedron_3<>} that supports vertices. +\ccc{Polyhedron}: an instance of \ccc{Polyhedron_3} that supports vertices. \ccCommentHeading{Returns} a list of components expressed as pairs (number of vertices, vertex), ordered by size. } \ccGlue @@ -39,7 +39,7 @@ Compute the list of all connected components of a polyhedron. \ccSeeAlso -\ccRefIdfierPage{CGAL::Polyhedron_3<>} \\ +\ccRefIdfierPage{CGAL::Polyhedron_3} \\ \ccRefIdfierPage{CGAL::erase_small_polyhedron_connected_components} \\ \end{ccRefFunction} diff --git a/Surface_reconstruction_points_3/doc_tex/Surface_reconstruction_points_3_ref/intro.tex b/Surface_reconstruction_points_3/doc_tex/Surface_reconstruction_points_3_ref/intro.tex index 0d1978e4c96..ae34f062d76 100644 --- a/Surface_reconstruction_points_3/doc_tex/Surface_reconstruction_points_3_ref/intro.tex +++ b/Surface_reconstruction_points_3/doc_tex/Surface_reconstruction_points_3_ref/intro.tex @@ -35,7 +35,8 @@ or a surface mesh generated by the \cgal\ surface mesh generator. \subsection{Functions} -\ccRefIdfierPage{CGAL::surface_reconstruction_output_surface_facets} \\ +\ccRefIdfierPage{CGAL::output_surface_facets_to_polyhedron} \\ +\ccRefIdfierPage{CGAL::output_surface_facets_to_triangle_soup} \\ \ccRefIdfierPage{CGAL::erase_small_polyhedron_connected_components} \\ \ccRefIdfierPage{CGAL::get_polyhedron_connected_components} \\ diff --git a/Surface_reconstruction_points_3/doc_tex/Surface_reconstruction_points_3_ref/main.tex b/Surface_reconstruction_points_3/doc_tex/Surface_reconstruction_points_3_ref/main.tex index 80f072531b4..89dc8196746 100644 --- a/Surface_reconstruction_points_3/doc_tex/Surface_reconstruction_points_3_ref/main.tex +++ b/Surface_reconstruction_points_3/doc_tex/Surface_reconstruction_points_3_ref/main.tex @@ -15,6 +15,7 @@ \input{Surface_reconstruction_points_3_ref/ReconstructionTriangulation_3.tex} \input{Surface_reconstruction_points_3_ref/Reconstruction_vertex_base_3.tex} \input{Surface_reconstruction_points_3_ref/ReconstructionVertexBase_3.tex} -\input{Surface_reconstruction_points_3_ref/surface_reconstruction_output_surface_facets.tex} +\input{Surface_reconstruction_points_3_ref/output_surface_facets_to_polyhedron.tex} +\input{Surface_reconstruction_points_3_ref/output_surface_facets_to_triangle_soup.tex} %% EOF diff --git a/Surface_reconstruction_points_3/doc_tex/Surface_reconstruction_points_3_ref/output_surface_facets_to_polyhedron.tex b/Surface_reconstruction_points_3/doc_tex/Surface_reconstruction_points_3_ref/output_surface_facets_to_polyhedron.tex new file mode 100644 index 00000000000..eb4fc440faf --- /dev/null +++ b/Surface_reconstruction_points_3/doc_tex/Surface_reconstruction_points_3_ref/output_surface_facets_to_polyhedron.tex @@ -0,0 +1,73 @@ +% +------------------------------------------------------------------------+ +% | Reference manual page: output_surface_facets_to_polyhedron.tex +% +------------------------------------------------------------------------+ +% | 07.01.2009 Pierre Alliez, Laurent Saboret, Gael Guennebaud +% | Package: Surface_reconstruction_points_3 +% | +\RCSdef{\RCSsurfacereconstructionoutputsurfacefacetsRev}{$Id$} +\RCSdefDate{\RCSsurfacereconstructionoutputsurfacefacetsDate}{$Date$} +% | +\ccRefPageBegin +%%RefPage: end of header, begin of main body +% +------------------------------------------------------------------------+ + + +\begin{ccRefFunction}{output_surface_facets_to_polyhedron} %% add template arg's if necessary + +%% \ccHtmlCrossLink{} %% add further rules for cross referencing links +%% \ccHtmlIndexC[function]{} %% add further index entries + +\ccDefinition + +\ccc{output_surface_facets_to_polyhedron()} converts a surface reconstructed by \ccc{make_surface_mesh()} to a \ccc{Polyhedron_3}. + +\ccInclude{CGAL/output_surface_facets_to_polyhedron.h} + +% The section below is automatically generated. Do not edit! +%START-AUTO(\ccDefinition) + +\ccFunction{template void output_surface_facets_to_polyhedron(const SurfaceMeshComplex_2InTriangulation_3& c2t3, OutputIterator output_iterator);} +{ +Get reconstructed surface out of a \ccc{SurfaceMeshComplex_2InTriangulation_3} object. +This variant exports the surface as a triangle soup. +\ccCommentHeading{Template Parameters} +\begin{description} +\item \ccc{SurfaceMeshComplex_2InTriangulation_3}: model of the \ccc{SurfaceMeshComplex_2InTriangulation_3} concept. \item \ccc{OutputIterator}: \ccc{value_type} must be convertible from \ccc{Triangle_3}.\end{description} +\ccCommentHeading{Returns} true on success. +\ccCommentHeading{Parameters} +\begin{description} +\item \ccc{c2t3}: Input surface. \item \ccc{output_iterator}: Output iterator. \end{description} +} +\ccGlue +\ccFunction{template class HalfedgeDS, class Alloc> void output_surface_facets_to_polyhedron(const SurfaceMeshComplex_2InTriangulation_3& c2t3, Polyhedron_3& output_polyhedron);} +{ +Get reconstructed surface out of a \ccc{SurfaceMeshComplex_2InTriangulation_3} object. +This variant exports the surface as a polyhedron. It requires the surface to be manifold. For this purpose, you may call \ccc{make_surface_mesh}() with \ccc{Manifold_tag} or \ccc{Manifold_with_boundary_tag} parameter. +\ccCommentHeading{Template Parameters} +\begin{description} +\item \ccc{SurfaceMeshComplex_2InTriangulation_3}: model of the \ccc{SurfaceMeshComplex_2InTriangulation_3} concept. \item \ccc{PolyhedronTraits_3, PolyhedronItems_3, HalfedgeDS, Alloc}: see \ccc{Polyhedron_3} declaration.\end{description} +\ccCommentHeading{Returns} true on success. +\ccCommentHeading{Parameters} +\begin{description} +\item \ccc{c2t3}: Input surface. \item \ccc{output_polyhedron}: Output polyhedron. \end{description} +} +\ccGlue + +%END-AUTO(\ccDefinition) + +\ccSeeAlso + +\ccRefIdfierPage{CGAL::output_surface_facets_to_off} \\ + +\ccExample + +See \ccc{APSS_reconstruction.cpp} example. + +\end{ccRefFunction} + +% +------------------------------------------------------------------------+ +%%RefPage: end of main body, begin of footer +\ccRefPageEnd +% EOF +% +------------------------------------------------------------------------+ + diff --git a/Surface_reconstruction_points_3/doc_tex/Surface_reconstruction_points_3_ref/surface_reconstruction_output_surface_facets.tex b/Surface_reconstruction_points_3/doc_tex/Surface_reconstruction_points_3_ref/output_surface_facets_to_triangle_soup.tex similarity index 79% rename from Surface_reconstruction_points_3/doc_tex/Surface_reconstruction_points_3_ref/surface_reconstruction_output_surface_facets.tex rename to Surface_reconstruction_points_3/doc_tex/Surface_reconstruction_points_3_ref/output_surface_facets_to_triangle_soup.tex index 61d9e04bafe..c87e48a0f6d 100644 --- a/Surface_reconstruction_points_3/doc_tex/Surface_reconstruction_points_3_ref/surface_reconstruction_output_surface_facets.tex +++ b/Surface_reconstruction_points_3/doc_tex/Surface_reconstruction_points_3_ref/output_surface_facets_to_triangle_soup.tex @@ -1,5 +1,5 @@ % +------------------------------------------------------------------------+ -% | Reference manual page: surface_reconstruction_output_surface_facets.tex +% | Reference manual page: output_surface_facets_to_triangle_soup.tex % +------------------------------------------------------------------------+ % | 07.01.2009 Pierre Alliez, Laurent Saboret, Gael Guennebaud % | Package: Surface_reconstruction_points_3 @@ -12,21 +12,21 @@ % +------------------------------------------------------------------------+ -\begin{ccRefFunction}{surface_reconstruction_output_surface_facets} %% add template arg's if necessary +\begin{ccRefFunction}{output_surface_facets_to_triangle_soup} %% add template arg's if necessary %% \ccHtmlCrossLink{} %% add further rules for cross referencing links %% \ccHtmlIndexC[function]{} %% add further index entries \ccDefinition -\ccc{surface_reconstruction_output_surface_facets()} converts a surface reconstructed by \ccc{make_surface_mesh()} to a triangles soup. +\ccc{output_surface_facets_to_triangle_soup()} converts a surface reconstructed by \ccc{make_surface_mesh()} to a triangle soup. -\ccInclude{CGAL/surface_reconstruction_output_surface_facets.h} +\ccInclude{CGAL/output_surface_facets_to_triangle_soup.h} % The section below is automatically generated. Do not edit! %START-AUTO(\ccDefinition) -\ccFunction{template void surface_reconstruction_output_surface_facets(const SurfaceMeshComplex_2InTriangulation_3& c2t3, OutputIterator output_iterator);} +\ccFunction{template void output_surface_facets_to_triangle_soup(const SurfaceMeshComplex_2InTriangulation_3& c2t3, OutputIterator output_iterator);} { Get reconstructed surface out of a \ccc{SurfaceMeshComplex_2InTriangulation_3} object. This variant exports the surface as a triangle soup. @@ -39,7 +39,7 @@ This variant exports the surface as a triangle soup. \item \ccc{c2t3}: Input surface. \item \ccc{output_iterator}: Output iterator. \end{description} } \ccGlue -\ccFunction{template class HalfedgeDS, class Alloc> void surface_reconstruction_output_surface_facets(const SurfaceMeshComplex_2InTriangulation_3& c2t3, Polyhedron_3& output_polyhedron);} +\ccFunction{template class HalfedgeDS, class Alloc> void output_surface_facets_to_triangle_soup(const SurfaceMeshComplex_2InTriangulation_3& c2t3, Polyhedron_3& output_polyhedron);} { Get reconstructed surface out of a \ccc{SurfaceMeshComplex_2InTriangulation_3} object. This variant exports the surface as a polyhedron. It requires the surface to be manifold. For this purpose, you may call \ccc{make_surface_mesh}() with \ccc{Manifold_tag} or \ccc{Manifold_with_boundary_tag} parameter. @@ -77,7 +77,7 @@ CGAL::make_surface_mesh(c2t3, surface, ...); // Convert reconstructed surface to a triangles soup std::deque triangles; -CGAL::surface_reconstruction_output_surface_facets(c2t3, std::back_inserter(triangles)); +CGAL::output_surface_facets_to_triangle_soup(c2t3, std::back_inserter(triangles)); \end{ccExampleCode} \end{ccRefFunction} diff --git a/Surface_reconstruction_points_3/examples/Surface_reconstruction_points_3/APSS_reconstruction.cpp b/Surface_reconstruction_points_3/examples/Surface_reconstruction_points_3/APSS_reconstruction.cpp index a0612cbd602..1845e1126c8 100644 --- a/Surface_reconstruction_points_3/examples/Surface_reconstruction_points_3/APSS_reconstruction.cpp +++ b/Surface_reconstruction_points_3/examples/Surface_reconstruction_points_3/APSS_reconstruction.cpp @@ -21,7 +21,7 @@ #include #include #include -#include +#include #include #include "compute_normal.h" @@ -250,7 +250,7 @@ int main(int argc, char * argv[]) // Convert to polyhedron Polyhedron output_mesh; - CGAL::surface_reconstruction_output_surface_facets(surface_mesher_c2t3, output_mesh); + CGAL::output_surface_facets_to_polyhedron(surface_mesher_c2t3, output_mesh); //*************************************** // Erase small connected components diff --git a/Surface_reconstruction_points_3/include/CGAL/IO/output_surface_facets_to_polyhedron.h b/Surface_reconstruction_points_3/include/CGAL/IO/output_surface_facets_to_polyhedron.h new file mode 100644 index 00000000000..33baf604b11 --- /dev/null +++ b/Surface_reconstruction_points_3/include/CGAL/IO/output_surface_facets_to_polyhedron.h @@ -0,0 +1,56 @@ +// Copyright (c) 2007-09 INRIA Sophia-Antipolis (France). +// All rights reserved. +// +// This file is part of CGAL (www.cgal.org); you may redistribute it under +// the terms of the Q Public License version 1.0. +// See the file LICENSE.QPL distributed with CGAL. +// +// Licensees holding a valid commercial license may use this file in +// accordance with the commercial license agreement provided with the software. +// +// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +// +// $URL$ +// $Id$ +// +// Author(s) : Pierre Alliez + +#ifndef CGAL_OUTPUT_SURFACE_FACETS_TO_POLYHEDRON_H +#define CGAL_OUTPUT_SURFACE_FACETS_TO_POLYHEDRON_H + +#include +#include +#include + +CGAL_BEGIN_NAMESPACE + + +/// Get reconstructed surface out of a SurfaceMeshComplex_2InTriangulation_3 object. +/// +/// This variant exports the surface as a polyhedron. +/// It requires the surface to be manifold. For this purpose, +/// you may call make_surface_mesh() with Manifold_tag or Manifold_with_boundary_tag parameter. +/// +/// @commentheading Template Parameters: +/// @param SurfaceMeshComplex_2InTriangulation_3 model of the SurfaceMeshComplex_2InTriangulation_3 concept. +/// @param Polyhedron an instance of CGAL::Polyhedron_3. +/// +/// @return true on success. +template +void +output_surface_facets_to_polyhedron( + const SurfaceMeshComplex_2InTriangulation_3& c2t3, ///< Input surface. + Polyhedron& output_polyhedron) ///< Output polyhedron. +{ + typedef SurfaceMeshComplex_2InTriangulation_3 C2t3; + + Complex_2_in_triangulation_3_polyhedron_builder builder(c2t3); + output_polyhedron.delegate(builder); +} + + +CGAL_END_NAMESPACE + +#endif // CGAL_OUTPUT_SURFACE_FACETS_TO_POLYHEDRON_H diff --git a/Surface_reconstruction_points_3/include/CGAL/IO/surface_reconstruction_output_surface_facets.h b/Surface_reconstruction_points_3/include/CGAL/IO/output_surface_facets_to_triangle_soup.h similarity index 60% rename from Surface_reconstruction_points_3/include/CGAL/IO/surface_reconstruction_output_surface_facets.h rename to Surface_reconstruction_points_3/include/CGAL/IO/output_surface_facets_to_triangle_soup.h index 681e16f6adc..8b91606ee68 100644 --- a/Surface_reconstruction_points_3/include/CGAL/IO/surface_reconstruction_output_surface_facets.h +++ b/Surface_reconstruction_points_3/include/CGAL/IO/output_surface_facets_to_triangle_soup.h @@ -16,8 +16,8 @@ // // Author(s) : Pierre Alliez -#ifndef CGAL_SURFACE_RECONSTRUCTION_OUTPUT_H -#define CGAL_SURFACE_RECONSTRUCTION_OUTPUT_H +#ifndef CGAL_OUTPUT_SURFACE_FACETS_TO_TRIANGLE_SOUP_H +#define CGAL_OUTPUT_SURFACE_FACETS_TO_TRIANGLE_SOUP_H #include #include @@ -38,7 +38,7 @@ CGAL_BEGIN_NAMESPACE template void -surface_reconstruction_output_surface_facets( +output_surface_facets_to_triangle_soup( const SurfaceMeshComplex_2InTriangulation_3& c2t3, ///< Input surface. OutputIterator output_iterator) ///< Output iterator. { @@ -72,39 +72,6 @@ surface_reconstruction_output_surface_facets( } -/// Get reconstructed surface out of a SurfaceMeshComplex_2InTriangulation_3 object. -/// -/// This variant exports the surface as a polyhedron. -/// It requires the surface to be manifold. For this purpose, -/// you may call make_surface_mesh() with Manifold_tag or Manifold_with_boundary_tag parameter. -/// -/// @commentheading Template Parameters: -/// @param SurfaceMeshComplex_2InTriangulation_3 model of the SurfaceMeshComplex_2InTriangulation_3 concept. -/// @param PolyhedronTraits_3, PolyhedronItems_3, HalfedgeDS, Alloc see Polyhedron_3 declaration. -/// -/// @return true on success. -template -#endif - class HalfedgeDS, - class Alloc - > -void -surface_reconstruction_output_surface_facets( - const SurfaceMeshComplex_2InTriangulation_3& c2t3, ///< Input surface. - Polyhedron_3& output_polyhedron) ///< Output polyhedron. -{ - typedef SurfaceMeshComplex_2InTriangulation_3 C2t3; - typedef Polyhedron_3 Polyhedron; - - Complex_2_in_triangulation_3_polyhedron_builder builder(c2t3); - output_polyhedron.delegate(builder); -} - - CGAL_END_NAMESPACE -#endif // CGAL_SURFACE_RECONSTRUCTION_OUTPUT_H +#endif // CGAL_OUTPUT_SURFACE_FACETS_TO_TRIANGLE_SOUP_H diff --git a/Surface_reconstruction_points_3/include/CGAL/Poisson_reconstruction_function.h b/Surface_reconstruction_points_3/include/CGAL/Poisson_reconstruction_function.h index 7546985be08..2dd5fa750eb 100644 --- a/Surface_reconstruction_points_3/include/CGAL/Poisson_reconstruction_function.h +++ b/Surface_reconstruction_points_3/include/CGAL/Poisson_reconstruction_function.h @@ -37,7 +37,7 @@ #include #include #include -#include +#include CGAL_BEGIN_NAMESPACE @@ -370,10 +370,10 @@ public: #define DELAUNAY_REFINEMENT_USE_BOUNDING_BOX #ifdef DELAUNAY_REFINEMENT_USE_BOUNDING_BOX Iso_cuboid enlarged_bbox = enlarged_bounding_box(enlarge_ratio); - unsigned int nb_vertices_added = poisson_refinement_3(m_tr,radius_edge_ratio_bound,cell_radius_bound,max_vertices,enlarged_bbox); + unsigned int nb_vertices_added = poisson_refine_triangulation(m_tr,radius_edge_ratio_bound,cell_radius_bound,max_vertices,enlarged_bbox); #else Sphere enlarged_bbox = enlarged_bounding_sphere(enlarge_ratio); - unsigned int nb_vertices_added = poisson_refinement_3(m_tr,radius_edge_ratio_bound,cell_radius_bound,max_vertices,enlarged_bbox); + unsigned int nb_vertices_added = poisson_refine_triangulation(m_tr,radius_edge_ratio_bound,cell_radius_bound,max_vertices,enlarged_bbox); #endif m_tr.invalidate_bounds(); diff --git a/Surface_reconstruction_points_3/include/CGAL/poisson_refinement_3.h b/Surface_reconstruction_points_3/include/CGAL/poisson_refine_triangulation.h similarity index 90% rename from Surface_reconstruction_points_3/include/CGAL/poisson_refinement_3.h rename to Surface_reconstruction_points_3/include/CGAL/poisson_refine_triangulation.h index f07c3da4e09..4d3c46bfd4e 100644 --- a/Surface_reconstruction_points_3/include/CGAL/poisson_refinement_3.h +++ b/Surface_reconstruction_points_3/include/CGAL/poisson_refine_triangulation.h @@ -16,8 +16,8 @@ // // Author(s) : Laurent RINEAU, Laurent Saboret -#ifndef CGAL_POISSON_REFINEMENT_3_H -#define CGAL_POISSON_REFINEMENT_3_H +#ifndef CGAL_POISSON_REFINE_TRIANGULATION_H +#define CGAL_POISSON_REFINE_TRIANGULATION_H // CGAL #include @@ -29,7 +29,7 @@ CGAL_BEGIN_NAMESPACE -/// Utility class for poisson_refinement_3(): +/// Utility class for poisson_refine_triangulation(): /// implements Delaunay refinement in a loose bounding /// box of point set (break bad tetrahedra, where /// bad means badly shaped or too big). @@ -148,7 +148,7 @@ private: }; // end Poisson_mesher_level_impl_base -/// Utility class for poisson_refinement_3(): +/// Utility class for poisson_refine_triangulation(): /// glue class that inherits from both Mesher_level /// and Poisson_mesher_level_impl_base. template -unsigned int poisson_refinement_3(Tr& tr, - double radius_edge_ratio_bound, ///< radius edge ratio bound (>= 1.0) - double cell_radius_bound, ///< cell radius bound (ignored if zero) - unsigned int max_vertices, ///< number of vertices bound (ignored if zero) - Surface& enlarged_bbox) ///< new bounding sphere or box +unsigned int poisson_refine_triangulation( + Tr& tr, + double radius_edge_ratio_bound, ///< radius edge ratio bound (>= 1.0) + double cell_radius_bound, ///< cell radius bound (ignored if zero) + unsigned int max_vertices, ///< number of vertices bound (ignored if zero) + Surface& enlarged_bbox) ///< new bounding sphere or box { - CGAL_TRACE("Call poisson_refinement_3()\n"); + CGAL_TRACE("Call poisson_refine_triangulation()\n"); // Convergence is guaranteed if radius_edge_ratio_bound >= 1.0 CGAL_precondition(radius_edge_ratio_bound >= 1.0); @@ -240,7 +241,7 @@ unsigned int poisson_refinement_3(Tr& tr, CGAL_TRACE(" Max allocation = %ld Mb\n", max_memory>>20); /*long*/ memory = CGAL::Memory_sizer().virtual_size(); CGAL_TRACE(" %ld Mb allocated\n", memory>>20); - CGAL_TRACE("End of poisson_refinement_3()\n"); + CGAL_TRACE("End of poisson_refine_triangulation()\n"); return (unsigned int) nb_vertices_added; } @@ -248,4 +249,4 @@ unsigned int poisson_refinement_3(Tr& tr, CGAL_END_NAMESPACE -#endif // CGAL_POISSON_REFINEMENT_3_H +#endif // CGAL_POISSON_REFINE_TRIANGULATION_H diff --git a/Surface_reconstruction_points_3/include/CGAL/polyhedron_connected_components.h b/Surface_reconstruction_points_3/include/CGAL/polyhedron_connected_components.h index aff4bbd518e..36f4fc2c26d 100644 --- a/Surface_reconstruction_points_3/include/CGAL/polyhedron_connected_components.h +++ b/Surface_reconstruction_points_3/include/CGAL/polyhedron_connected_components.h @@ -42,7 +42,7 @@ enum { tag_free, tag_done }; /// Get any vertex with tag == tag_free. /// /// @commentheading Template Parameters: -/// @param Polyhedron an instance of CGAL::Polyhedron_3<>. +/// @param Polyhedron an instance of CGAL::Polyhedron_3. /// /// @return a list of pairs (component's size (number of vertices), a vertex of the component), /// ordered by size. @@ -69,7 +69,7 @@ get_any_free_vertex(Polyhedron& polyhedron, /// Tag a "free" connected component as "done". /// /// @commentheading Template Parameters: -/// @param Polyhedron an instance of CGAL::Polyhedron_3<>. +/// @param Polyhedron an instance of CGAL::Polyhedron_3. /// /// @return the size (number of vertices) of the component. template @@ -126,7 +126,7 @@ unsigned int tag_component(Polyhedron& polyhedron, /// Compute the list of all connected components of a polyhedron. /// /// @commentheading Template Parameters: -/// @param Polyhedron an instance of CGAL::Polyhedron_3<> that supports vertices. +/// @param Polyhedron an instance of CGAL::Polyhedron_3 that supports vertices. /// /// @return a list of components expressed as pairs (number of vertices, vertex), /// ordered by size. @@ -136,7 +136,7 @@ get_polyhedron_connected_components(Polyhedron& polyhedron) { // Implementation note: // We tag vertices instead of halfedges to save a factor 6. - // The drawback is that we require the Polyhedron_3<> to support vertices. + // The drawback is that we require the Polyhedron_3 to support vertices. // TODO: replace std::map to tag vertices by a property map. Assert_compile_time_tag(typename Polyhedron::Supports_halfedge_vertex(), Tag_true()); std::map tags; @@ -174,7 +174,7 @@ get_polyhedron_connected_components(Polyhedron& polyhedron) /// erase all connected components but the largest. /// /// @commentheading Template Parameters: -/// @param Polyhedron an instance of CGAL::Polyhedron_3<> that supports +/// @param Polyhedron an instance of CGAL::Polyhedron_3 that supports /// vertices and removal operation. /// /// @return the number of connected components erased. diff --git a/Surface_reconstruction_points_3/test/Surface_reconstruction_points_3/APSS_reconstruction_test.cpp b/Surface_reconstruction_points_3/test/Surface_reconstruction_points_3/APSS_reconstruction_test.cpp index 3277cf33193..92c200a69e5 100644 --- a/Surface_reconstruction_points_3/test/Surface_reconstruction_points_3/APSS_reconstruction_test.cpp +++ b/Surface_reconstruction_points_3/test/Surface_reconstruction_points_3/APSS_reconstruction_test.cpp @@ -21,7 +21,7 @@ #include #include #include -#include +#include #include #include "compute_normal.h" @@ -262,7 +262,7 @@ int main(int argc, char * argv[]) // Convert to polyhedron Polyhedron output_mesh; - CGAL::surface_reconstruction_output_surface_facets(surface_mesher_c2t3, output_mesh); + CGAL::output_surface_facets_to_polyhedron(surface_mesher_c2t3, output_mesh); //*************************************** // Erase small connected components