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
This commit is contained in:
Laurent Saboret 2009-04-21 14:10:02 +00:00
parent 31992dd000
commit 87e3e65ddb
66 changed files with 634 additions and 534 deletions

18
.gitattributes vendored
View File

@ -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

View File

@ -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}
% <img width="90%" border=0 src="./outlier_removal.jpg"><P>
% <img width="90%" border=0 src="./remove_outliers.jpg"><P>
% \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}
% <img width="90%" border=0 src="./pca_normal_estimation.jpg"><P>
% <img width="90%" border=0 src="./pca_estimate_normals.jpg"><P>
% \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}
<img width="100%" border=0 src="./mst_normal_orientation.jpg"><P>
<img width="100%" border=0 src="./mst_orient_normals.jpg"><P>
\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}

View File

@ -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<typename InputIterator, typename Kernel> Kernel::FT average_spacing_3(InputIterator first, InputIterator beyond, unsigned int k, const Kernel& kernel);}
\ccFunction{template<typename InputIterator, typename Kernel> 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<typename InputIterator, typename FT> FT average_spacing_3(InputIterator first, InputIterator beyond, unsigned int k);}
\ccFunction{template<typename InputIterator, typename FT> 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.

View File

@ -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} \\

View File

@ -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<typename InputIterator, typename OutputIterator, typename Kernel> OutputIterator jet_normal_estimation(InputIterator first, InputIterator beyond, OutputIterator normals, unsigned int k, const Kernel& kernel, unsigned int degree_fitting);}
\ccFunction{template<typename InputIterator, typename OutputIterator, typename Kernel> 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<typename InputIterator, typename OutputIterator> OutputIterator jet_normal_estimation(InputIterator first, InputIterator beyond, OutputIterator normals, unsigned int k, unsigned int degree_fitting = 2);}
\ccFunction{template<typename InputIterator, typename OutputIterator> 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

View File

@ -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<typename InputIterator, typename OutputIterator, typename Kernel> 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<typename InputIterator, typename OutputIterator, typename Kernel> 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<typename ForwardIterator, typename Kernel> 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<typename ForwardIterator, typename Kernel> 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<typename InputIterator, typename OutputIterator> 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<typename InputIterator, typename OutputIterator> 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<typename ForwardIterator> 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<typename ForwardIterator> 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.

View File

@ -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}

View File

@ -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<typename InputIterator, typename OutputIterator, typename Kernel> OutputIterator merge_simplification_3(InputIterator first, InputIterator beyond, OutputIterator output, double epsilon, const Kernel& kernel);}
\ccFunction{template<typename InputIterator, typename OutputIterator, typename Kernel> 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<typename ForwardIterator, typename Kernel> ForwardIterator merge_simplification_3(ForwardIterator first, ForwardIterator beyond, double epsilon, const Kernel& kernel);}
\ccFunction{template<typename ForwardIterator, typename Kernel> 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<typename InputIterator, typename OutputIterator> OutputIterator merge_simplification_3(InputIterator first, InputIterator beyond, OutputIterator output, double epsilon);}
\ccFunction{template<typename InputIterator, typename OutputIterator> 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<typename ForwardIterator> ForwardIterator merge_simplification_3(ForwardIterator first, ForwardIterator beyond, double epsilon);}
\ccFunction{template<typename ForwardIterator> 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<Point> 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<Point>::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}

View File

@ -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<class VertexIterator, class VertexPointMap, class VertexIndexMap, class VertexNormalMap> 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<class VertexIterator, class VertexPointMap, class VertexIndexMap, class VertexNormalMap> 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}

View File

@ -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<typename InputIterator, typename OutputIterator, typename Kernel> OutputIterator pca_normal_estimation(InputIterator first, InputIterator beyond, OutputIterator normals, unsigned int k, const Kernel& kernel);}
\ccFunction{template<typename InputIterator, typename OutputIterator, typename Kernel> 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<typename InputIterator, typename OutputIterator> OutputIterator pca_normal_estimation(InputIterator first, InputIterator beyond, OutputIterator normals, unsigned int k);}
\ccFunction{template<typename InputIterator, typename OutputIterator> 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}

View File

@ -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<typename InputIterator, typename OutputIterator, typename Kernel> OutputIterator random_simplification_3(InputIterator first, InputIterator beyond, OutputIterator output, double threshold_percent, const Kernel& kernel);}
\ccFunction{template<typename InputIterator, typename OutputIterator, typename Kernel> 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<typename ForwardIterator, typename Kernel> ForwardIterator random_simplification_3(ForwardIterator first, ForwardIterator beyond, double threshold_percent, const Kernel& kernel);}
\ccFunction{template<typename ForwardIterator, typename Kernel> 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<typename InputIterator, typename OutputIterator> OutputIterator random_simplification_3(InputIterator first, InputIterator beyond, OutputIterator output, double threshold_percent);}
\ccFunction{template<typename InputIterator, typename OutputIterator> 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<typename ForwardIterator> ForwardIterator random_simplification_3(ForwardIterator first, ForwardIterator beyond, double threshold_percent);}
\ccFunction{template<typename ForwardIterator> 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

View File

@ -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<typename InputIterator, typename OutputIterator, typename Kernel> OutputIterator outlier_removal_3(InputIterator first, InputIterator beyond, OutputIterator output, unsigned int k, const Kernel& kernel, double threshold_percent);}
\ccFunction{template<typename InputIterator, typename OutputIterator, typename Kernel> 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<typename ForwardIterator, typename Kernel> ForwardIterator outlier_removal_3(ForwardIterator first, ForwardIterator beyond, unsigned int k, const Kernel& kernel, double threshold_percent);}
\ccFunction{template<typename ForwardIterator, typename Kernel> 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<typename InputIterator, typename OutputIterator> OutputIterator outlier_removal_3(InputIterator first, InputIterator beyond, OutputIterator output, unsigned int k, double threshold_percent);}
\ccFunction{template<typename InputIterator, typename OutputIterator> 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<typename ForwardIterator> ForwardIterator outlier_removal_3(ForwardIterator first, ForwardIterator beyond, unsigned int k, double threshold_percent);}
\ccFunction{template<typename ForwardIterator> 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}

View File

@ -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

View File

@ -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" )

View File

@ -1,5 +1,5 @@
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
#include <CGAL/average_spacing_3.h>
#include <CGAL/compute_average_spacing.h>
#include <CGAL/IO/read_xyz_point_set.h>
#include <deque>
@ -26,8 +26,8 @@ int main(void)
// Average Spacing
const unsigned int nb_neighbors = 7;
typedef std::deque<Point>::iterator Iterator;
FT average_spacing = CGAL::average_spacing_3<Iterator,FT>(points.begin(), points.end(),
nb_neighbors);
FT average_spacing = CGAL::compute_average_spacing<Iterator,FT>(points.begin(), points.end(),
nb_neighbors);
std::cout << "Average spacing = " << average_spacing << std::endl;
return EXIT_SUCCESS;

View File

@ -1,5 +1,5 @@
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
#include <CGAL/jet_smoothing_3.h>
#include <CGAL/jet_smooth_point_set.h>
#include <deque>
// types
@ -23,7 +23,7 @@ int main(void)
// smoothing
std::deque<Point> 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;
}

View File

@ -17,9 +17,9 @@
#include <CGAL/IO/Polyhedron_iostream.h>
// This package
#include <CGAL/pca_normal_estimation.h>
#include <CGAL/jet_normal_estimation.h>
#include <CGAL/mst_normal_orientation.h>
#include <CGAL/pca_estimate_normals.h>
#include <CGAL/jet_estimate_normals.h>
#include <CGAL/mst_orient_normals.h>
#include <CGAL/Point_with_normal_3.h>
#include <CGAL/Orientable_normal_3.h>
#include <CGAL/IO/read_xyz_point_set.h>
@ -53,9 +53,9 @@ typedef std::deque<Point_with_normal> PointList;
// ----------------------------------------------------------------------------
// Compute normals direction by Principal Component Analysis
void run_pca_normal_estimation(const PointList& points, // input point set
std::deque<Orientable_normal>& 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<Orientable_normal>& 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<Orientable_normal>& 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<Orientable_normal>& 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<Orientable_normal>& 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<Orientable_normal>& 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

View File

@ -1,7 +1,7 @@
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
#include <CGAL/boost/graph/properties.h>
#include <CGAL/pca_normal_estimation.h>
#include <CGAL/mst_normal_orientation.h>
#include <CGAL/pca_estimate_normals.h>
#include <CGAL/mst_orient_normals.h>
#include <CGAL/Point_with_normal_3.h>
#include <CGAL/Orientable_normal_3.h>
#include <CGAL/IO/read_xyz_point_set.h>
@ -31,16 +31,16 @@ int main(void)
// Estimate normals direction.
std::deque<Orientable_normal> 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

View File

@ -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

View File

@ -1,5 +1,5 @@
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
#include <CGAL/random_simplification_3.h>
#include <CGAL/random_simplify_point_set.h>
#include <CGAL/IO/read_xyz_point_set.h>
#include <deque>
@ -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<Point> output;
CGAL::random_simplification_3(
CGAL::random_simplify_point_set(
points.begin(), points.end(),
std::back_inserter(output),
random_simplification_percentage);

View File

@ -1,5 +1,5 @@
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
#include <CGAL/outlier_removal_3.h>
#include <CGAL/remove_outliers.h>
#include <CGAL/IO/read_xyz_point_set.h>
#include <deque>
@ -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<Point> output;
CGAL::outlier_removal_3(
CGAL::remove_outliers(
points.begin(), points.end(),
std::back_inserter(output),
nb_neighbors,

View File

@ -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 InputIterator,
typename Kernel
>
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<Kernel,Tree>(*it,tree,k);
sum_spacings += CGALi::compute_average_spacing<Kernel,Tree>(*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<InputIterator>::value_type Value_type;
typedef typename Kernel_traits<Value_type>::Kernel Kernel;
return average_spacing_3(first,beyond,k,Kernel());
return compute_average_spacing(first,beyond,k,Kernel());
}

View File

@ -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 <CGAL/Search_traits_3.h>
#include <CGAL/Orthogonal_k_neighbor_search.h>
@ -140,7 +140,7 @@ laplacian_smoothing_3(
template <typename Kernel,
typename Tree>
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 <typename InputIterator,
typename Kernel
>
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<Kernel>(p[i],b[i],tree,b,k,beta);
p[i] = improved_laplacian_smoothing_i::improved_laplacian_smooth_point_set<Kernel>(p[i],b[i],tree,b,k,beta);
}
}
@ -298,7 +298,7 @@ improved_laplacian_smoothing_3(
template <typename ForwardIterator,
typename Kernel>
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<Kernel>(p[i],b[i],tree,b,k,beta);
p[i] = improved_laplacian_smoothing_i::improved_laplacian_smooth_point_set<Kernel>(p[i],b[i],tree,b,k,beta);
}
}
@ -389,7 +389,7 @@ template <typename InputIterator,
typename OutputIterator
>
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<InputIterator>::value_type Input_point_3;
typedef typename Kernel_traits<Input_point_3>::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<Kernel>.
template <typename ForwardIterator>
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<ForwardIterator>::value_type Input_point_3;
typedef typename Kernel_traits<Input_point_3>::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

View File

@ -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 <CGAL/value_type_traits.h>
#include <CGAL/Search_traits_3.h>
@ -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 <typename InputIterator,
typename Kernel
>
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<OutputIterator>::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<Kernel,Tree,Normal>(*it,tree,k,degree_fitting);
*normals = CGALi::jet_estimate_normals<Kernel,Tree,Normal>(*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 <typename InputIterator,
typename OutputIterator
>
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<InputIterator>::value_type Value_type;
typedef typename Kernel_traits<Value_type>::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

View File

@ -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 <CGAL/Search_traits_3.h>
#include <CGAL/Orthogonal_k_neighbor_search.h>
@ -48,11 +48,11 @@ namespace CGALi {
template <typename Kernel,
typename Tree>
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 <typename InputIterator,
typename Kernel
>
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<InputIterator>::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<Kernel>(*it,tree,k,degree_fitting,degree_monge);
(Point_3&)(point) = CGALi::jet_smooth_point_set<Kernel>(*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 <typename ForwardIterator,
typename Kernel>
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<ForwardIterator>::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<Kernel>(*it,tree,k,degree_fitting,degree_monge);
(Point_3&)(*it) = CGALi::jet_smooth_point_set<Kernel>(*it,tree,k,degree_fitting,degree_monge);
}
@ -227,16 +227,16 @@ template <typename InputIterator,
typename OutputIterator
>
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<InputIterator>::value_type Input_point_3;
typedef typename Kernel_traits<Input_point_3>::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<Kernel>.
template <typename ForwardIterator>
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<ForwardIterator>::value_type Input_point_3;
typedef typename Kernel_traits<Input_point_3>::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

View File

@ -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 <CGAL/Search_traits_3.h>
#include <CGAL/Orthogonal_k_neighbor_search.h>
@ -36,7 +36,7 @@ template <typename InputIterator,
typename Kernel
>
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 <typename InputIterator,
typename OutputIterator
>
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<InputIterator>::value_type Value_type;
typedef typename CGAL::Kernel_traits<Value_type>::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

View File

@ -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 <iterator>
#include <set>
@ -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 <class Point_3>
@ -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 <typename InputIterator,
typename Kernel
>
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 <typename ForwardIterator,
typename Kernel
>
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<ForwardIterator>::value_type Point;
@ -210,7 +210,7 @@ template <typename InputIterator,
typename OutputIterator
>
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<InputIterator>::value_type Value_type;
typedef typename Kernel_traits<Value_type>::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 <typename ForwardIterator>
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<ForwardIterator>::value_type Value_type;
typedef typename Kernel_traits<Value_type>::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

View File

@ -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 <CGAL/Search_traits_3.h>
#include <CGAL/Orthogonal_k_neighbor_search.h>
@ -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<class VertexIterator, class VertexPointMap, class VertexIndexMap, class VertexNormalMap>
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

View File

@ -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 <CGAL/Dimension.h>
#include <CGAL/value_type_traits.h>
@ -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 <typename InputIterator,
typename Kernel
>
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<OutputIterator>::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<Kernel,Tree,Normal>(*it,tree,k);
*normals = CGALi::pca_estimate_normals<Kernel,Tree,Normal>(*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 <typename InputIterator,
typename OutputIterator
>
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<InputIterator>::value_type Value_type;
typedef typename Kernel_traits<Value_type>::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

View File

@ -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 <CGAL/Orientable_normal_3.h>
#include <CGAL/Memory_sizer.h>
@ -44,13 +44,13 @@ CGAL_BEGIN_NAMESPACE
template<class VertexIterator, class VertexPointMap, class VertexIndexMap, class VertexNormalMap>
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<VertexPointMap>::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

View File

@ -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 <iterator>
#include <set>
@ -40,7 +40,7 @@ template <typename InputIterator,
typename Kernel
>
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 <typename ForwardIterator,
typename Kernel
>
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 <typename InputIterator,
typename OutputIterator
>
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<InputIterator>::value_type Value_type;
typedef typename Kernel_traits<Value_type>::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 <typename ForwardIterator>
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<ForwardIterator>::value_type Value_type;
typedef typename Kernel_traits<Value_type>::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

View File

@ -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 <CGAL/Search_traits_3.h>
#include <CGAL/Orthogonal_k_neighbor_search.h>
@ -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 <typename InputIterator,
typename Kernel
>
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 <typename ForwardIterator,
typename Kernel
>
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 <typename InputIterator,
typename OutputIterator
>
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<InputIterator>::value_type Value_type;
typedef typename Kernel_traits<Value_type>::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 <typename ForwardIterator>
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<ForwardIterator>::value_type Value_type;
typedef typename Kernel_traits<Value_type>::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

View File

@ -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 <CGAL/Search_traits_3.h>
#include <CGAL/Orthogonal_k_neighbor_search.h>
@ -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 <typename InputIterator,
typename Kernel
>
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 <typename ForwardIterator,
typename Kernel
>
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 <typename InputIterator,
typename OutputIterator
>
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<InputIterator>::value_type Value_type;
typedef typename Kernel_traits<Value_type>::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 <typename ForwardIterator>
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<ForwardIterator>::value_type Value_type;
typedef typename Kernel_traits<Value_type>::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

View File

@ -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)

View File

@ -14,7 +14,7 @@
#include <CGAL/Memory_sizer.h>
// This package
#include <CGAL/average_spacing_3.h>
#include <CGAL/compute_average_spacing.h>
#include <CGAL/IO/read_xyz_point_set.h>
#include <deque>
@ -46,8 +46,8 @@ void test_average_spacing(std::deque<Point>& points, // input point set
CGAL::Timer task_timer; task_timer.start();
typedef std::deque<Point>::iterator Iterator;
std::cerr << CGAL::average_spacing_3<Iterator,FT>(points.begin(), points.end(),
nb_neighbors_avg_spacing) << "\n";
std::cerr << CGAL::compute_average_spacing<Iterator,FT>(points.begin(), points.end(),
nb_neighbors_avg_spacing) << "\n";
long memory = CGAL::Memory_sizer().virtual_size();
std::cerr << "ok: " << task_timer.time() << " seconds, "

View File

@ -16,9 +16,9 @@
#include <CGAL/boost/graph/properties.h>
// This package
#include <CGAL/pca_normal_estimation.h>
#include <CGAL/jet_normal_estimation.h>
#include <CGAL/mst_normal_orientation.h>
#include <CGAL/pca_estimate_normals.h>
#include <CGAL/jet_estimate_normals.h>
#include <CGAL/mst_orient_normals.h>
#include <CGAL/Point_with_normal_3.h>
#include <CGAL/Orientable_normal_3.h>
#include <CGAL/IO/read_off_point_set.h>
@ -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<Orientable_normal>& 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<Orientable_normal>& 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<Orientable_normal>& 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<Orientable_normal>& 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<Orientable_normal>& 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<Orientable_normal>& 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<Orientable_normal> 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

View File

@ -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

View File

@ -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 <CGAL/Simple_cartesian.h>
@ -15,7 +15,7 @@
#include <CGAL/boost/graph/properties.h>
// This package
#include <CGAL/outlier_removal_3.h>
#include <CGAL/remove_outliers.h>
#include <CGAL/IO/read_xyz_point_set.h>
#include <deque>
@ -41,13 +41,13 @@ typedef Kernel::Point_3 Point;
// ----------------------------------------------------------------------------
void test_avg_knn_sq_distance(std::deque<Point>& 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<Point>& 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<Point> 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

View File

@ -14,7 +14,7 @@
#include <CGAL/Memory_sizer.h>
// This package
#include <CGAL/jet_smoothing_3.h>
#include <CGAL/jet_smooth_point_set.h>
#include <CGAL/IO/read_xyz_point_set.h>
#include <deque>
@ -56,18 +56,18 @@ void test_smooth_jet_fitting(std::deque<Point>& points,// input point set
<< nb_neighbors_smooth_jet_fitting << "%=" << nb_neighbors << ")...\n";
std::deque<Point> 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;
}

View File

@ -15,7 +15,7 @@
// This package
#include <CGAL/APSS_reconstruction_function.h>
#include <CGAL/IO/surface_reconstruction_output_surface_facets.h>
#include <CGAL/IO/output_surface_facets_to_polyhedron.h>
#include <CGAL/polyhedron_connected_components.h>
@ -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

View File

@ -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);

View File

@ -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)

View File

@ -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 <CGAL/IO/write_off_point_set.h>
#include <CGAL/IO/read_xyz_point_set.h>
#include <CGAL/IO/write_xyz_point_set.h>
#include <CGAL/IO/surface_reconstruction_output_surface_facets.h>
#include <CGAL/outlier_removal_3.h>
#include <CGAL/jet_normal_estimation.h>
#include <CGAL/jet_smoothing_3.h>
#include <CGAL/pca_normal_estimation.h>
#include <CGAL/mst_normal_orientation.h>
#include <CGAL/average_spacing_3.h>
#include <CGAL/merge_simplification_3.h>
#include <CGAL/random_simplification_3.h>
#include <CGAL/radial_normal_orientation_3.h>
#include <CGAL/IO/output_surface_facets_to_triangle_soup.h>
#include <CGAL/remove_outliers.h>
#include <CGAL/jet_estimate_normals.h>
#include <CGAL/jet_smooth_point_set.h>
#include <CGAL/pca_estimate_normals.h>
#include <CGAL/mst_orient_normals.h>
#include <CGAL/compute_average_spacing.h>
#include <CGAL/merge_simplify_point_set.h>
#include <CGAL/random_simplify_point_set.h>
#include <CGAL/radial_orient_normals.h>
#include <CGAL/Peak_memory_sizer.h>
#include <CGAL/surface_reconstruction_points_assertions.h>
@ -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<Triangle> 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<Triangle> 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());

View File

@ -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

View File

@ -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<Kernel>& 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 <typename Kernel>
struct Is_cameras_cone_angle_greater_equal
@ -86,11 +86,11 @@ template <typename InputIterator,
typename Kernel
>
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 <typename ForwardIterator,
typename Kernel
>
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 <typename InputIterator,
typename OutputIterator
>
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<InputIterator>::value_type Value_type;
typedef typename CGAL::Kernel_traits<Value_type>::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 <typename ForwardIterator>
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<ForwardIterator>::value_type Value_type;
typedef typename CGAL::Kernel_traits<Value_type>::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

View File

@ -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:

View File

@ -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<Traits>} 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<Traits>} \\
\ccRefIdfierPage{CGAL::get_polyhedron_connected_components<Polyhedron>} \\
\ccExample

View File

@ -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<Traits>} 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<Traits>} \\
\ccRefIdfierPage{CGAL::erase_small_polyhedron_connected_components<Polyhedron>} \\
\end{ccRefFunction}

View File

@ -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<Polyhedron>} \\
\ccRefIdfierPage{CGAL::get_polyhedron_connected_components<Polyhedron>} \\

View File

@ -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

View File

@ -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<Traits>}.
\ccInclude{CGAL/output_surface_facets_to_polyhedron.h}
% The section below is automatically generated. Do not edit!
%START-AUTO(\ccDefinition)
\ccFunction{template<class SurfaceMeshComplex_2InTriangulation_3, typename OutputIterator> 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<Kernel>}.\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 SurfaceMeshComplex_2InTriangulation_3, class PolyhedronTraits_3, class PolyhedronItems_3, template<class T, class I, class A> class HalfedgeDS, class Alloc> void output_surface_facets_to_polyhedron(const SurfaceMeshComplex_2InTriangulation_3& c2t3, Polyhedron_3<PolyhedronTraits_3, PolyhedronItems_3, HalfedgeDS, Alloc>& 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
% +------------------------------------------------------------------------+

View File

@ -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<class SurfaceMeshComplex_2InTriangulation_3, typename OutputIterator> void surface_reconstruction_output_surface_facets(const SurfaceMeshComplex_2InTriangulation_3& c2t3, OutputIterator output_iterator);}
\ccFunction{template<class SurfaceMeshComplex_2InTriangulation_3, typename OutputIterator> 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 SurfaceMeshComplex_2InTriangulation_3, class PolyhedronTraits_3, class PolyhedronItems_3, template<class T, class I, class A> class HalfedgeDS, class Alloc> void surface_reconstruction_output_surface_facets(const SurfaceMeshComplex_2InTriangulation_3& c2t3, Polyhedron_3<PolyhedronTraits_3, PolyhedronItems_3, HalfedgeDS, Alloc>& output_polyhedron);}
\ccFunction{template<class SurfaceMeshComplex_2InTriangulation_3, class PolyhedronTraits_3, class PolyhedronItems_3, template<class T, class I, class A> class HalfedgeDS, class Alloc> void output_surface_facets_to_triangle_soup(const SurfaceMeshComplex_2InTriangulation_3& c2t3, Polyhedron_3<PolyhedronTraits_3, PolyhedronItems_3, HalfedgeDS, Alloc>& 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<Triangle> 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}

View File

@ -21,7 +21,7 @@
#include <CGAL/APSS_reconstruction_function.h>
#include <CGAL/Point_with_normal_3.h>
#include <CGAL/IO/read_xyz_point_set.h>
#include <CGAL/IO/surface_reconstruction_output_surface_facets.h>
#include <CGAL/IO/output_surface_facets_to_polyhedron.h>
#include <CGAL/polyhedron_connected_components.h>
#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

View File

@ -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 <CGAL/Polyhedron_3.h>
#include <CGAL/IO/Complex_2_in_triangulation_3_polyhedron_builder.h>
#include <CGAL/value_type_traits.h>
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<Traits>.
///
/// @return true on success.
template <class SurfaceMeshComplex_2InTriangulation_3,
class Polyhedron>
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<C2t3, Polyhedron> builder(c2t3);
output_polyhedron.delegate(builder);
}
CGAL_END_NAMESPACE
#endif // CGAL_OUTPUT_SURFACE_FACETS_TO_POLYHEDRON_H

View File

@ -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 <CGAL/Polyhedron_3.h>
#include <CGAL/IO/Complex_2_in_triangulation_3_polyhedron_builder.h>
@ -38,7 +38,7 @@ CGAL_BEGIN_NAMESPACE
template <class SurfaceMeshComplex_2InTriangulation_3,
typename OutputIterator>
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 <class SurfaceMeshComplex_2InTriangulation_3,
class PolyhedronTraits_3,
class PolyhedronItems_3,
#ifndef CGAL_CFG_NO_TMPL_IN_TMPL_PARAM
template < class T, class I, class A>
#endif
class HalfedgeDS,
class Alloc
>
void
surface_reconstruction_output_surface_facets(
const SurfaceMeshComplex_2InTriangulation_3& c2t3, ///< Input surface.
Polyhedron_3<PolyhedronTraits_3, PolyhedronItems_3, HalfedgeDS, Alloc>& output_polyhedron) ///< Output polyhedron.
{
typedef SurfaceMeshComplex_2InTriangulation_3 C2t3;
typedef Polyhedron_3<PolyhedronTraits_3, PolyhedronItems_3, HalfedgeDS, Alloc> Polyhedron;
Complex_2_in_triangulation_3_polyhedron_builder<C2t3, Polyhedron> builder(c2t3);
output_polyhedron.delegate(builder);
}
CGAL_END_NAMESPACE
#endif // CGAL_SURFACE_RECONSTRUCTION_OUTPUT_H
#endif // CGAL_OUTPUT_SURFACE_FACETS_TO_TRIANGLE_SOUP_H

View File

@ -37,7 +37,7 @@
#include <CGAL/surface_reconstruction_points_assertions.h>
#include <CGAL/Memory_sizer.h>
#include <CGAL/Peak_memory_sizer.h>
#include <CGAL/poisson_refinement_3.h>
#include <CGAL/poisson_refine_triangulation.h>
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();

View File

@ -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 <CGAL/Mesher_level.h>
@ -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 <typename Tr,
@ -200,13 +200,14 @@ public:
/// @param Surface Sphere_3 or Iso_cuboid_3.
template <typename Tr,
typename Surface>
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

View File

@ -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<Traits>.
///
/// @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<Traits>.
///
/// @return the size (number of vertices) of the component.
template<class Polyhedron>
@ -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<Traits> 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<Traits> 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<typename Polyhedron::Vertex*, int> 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<Traits> that supports
/// vertices and removal operation.
///
/// @return the number of connected components erased.

View File

@ -21,7 +21,7 @@
#include <CGAL/APSS_reconstruction_function.h>
#include <CGAL/Point_with_normal_3.h>
#include <CGAL/IO/read_xyz_point_set.h>
#include <CGAL/IO/surface_reconstruction_output_surface_facets.h>
#include <CGAL/IO/output_surface_facets_to_polyhedron.h>
#include <CGAL/polyhedron_connected_components.h>
#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