mirror of https://github.com/CGAL/cgal
All reference manual reworked with in the named parameters fashion
This commit is contained in:
parent
aabd51c7b5
commit
a1696bc72e
|
|
@ -3,7 +3,15 @@
|
|||
PROJECT_NAME = "CGAL ${CGAL_DOC_VERSION} - Point Set Processing"
|
||||
EXCLUDE_PATTERNS += property_map.h
|
||||
|
||||
# macros to be used inside the code
|
||||
ALIASES += "cgalNamedParamsBegin=<dl class=\"params\"><dt>Named Parameters</dt><dd> <table class=\"params\">"
|
||||
ALIASES += "cgalNamedParamsEnd=</table> </dd> </dl>"
|
||||
ALIASES += "cgalParamBegin{1}=<tr><td class=\"paramname\">\ref PSP_\1 \"\1\"</td><td>"
|
||||
ALIASES += "cgalParamEnd=</td></tr>"
|
||||
|
||||
|
||||
|
||||
#macros for NamedParameters.txt
|
||||
ALIASES += "cgalNPTableBegin=<dl class=\"params\"><dt></dt><dd> <table class=\"params\">"
|
||||
ALIASES += "cgalNPTableEnd=</table> </dd> </dl>"
|
||||
ALIASES += "cgalNPBegin{1}=<tr><td class=\"paramname\">\1 </td><td>"
|
||||
ALIASES += "cgalNPEnd=</td></tr>"
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,180 @@
|
|||
/*!
|
||||
\defgroup psp_namedparameters Named Parameters for Point Set Processing
|
||||
\ingroup PkgPointSetProcessing
|
||||
|
||||
In this package, all functions optional parameters are implemented as BGL optional named parameters (see \ref BGLNamedParameters for more information on how to use them).
|
||||
|
||||
Since the parameters of the various point set processing functions defined in this
|
||||
package are redundant, their long descriptions are centralized below.
|
||||
|
||||
In the following, we assume that the following types are provided as template parameters of point set processing functions and classes. Note that, for some of these functions, the type is more specific.
|
||||
|
||||
<ul>
|
||||
<li>`PointRange` is a model of `Range`. The value type of its iterator is the key type of the related property maps (see below).</li>
|
||||
<li>`GeomTraits` a geometric traits class in which constructions are performed and predicates evaluated. Everywhere in this package, a \cgal `Kernel` fulfills the requirements.</li>
|
||||
</ul>
|
||||
|
||||
`CGAL::parameters::all_default()` can be used to indicate
|
||||
that default values of optional named parameters must be used.
|
||||
|
||||
Here is the list of the named parameters available in this package:
|
||||
|
||||
|
||||
\cgalNPTableBegin
|
||||
\cgalNPBegin{geom_traits} \anchor PSP_geom_traits
|
||||
the geometric traits instance in which the point set processing operation should be performed.\n
|
||||
\b Type: a Geometric traits class.\n
|
||||
\b Default type is
|
||||
\code
|
||||
typename CGAL::Kernel_traits<point_map::value_type>::Kernel
|
||||
\endcode
|
||||
\cgalNPEnd
|
||||
|
||||
\cgalNPBegin{point_map} \anchor PSP_point_map
|
||||
is the property map containing the points associated to the iterators of the point range `points`.\n
|
||||
\b Type: a class model of `ReadablePropertyMap` with
|
||||
`PointRange::iterator` as key type and
|
||||
`geom_traits::Point_3` as value type. \n
|
||||
\b Default value is \code CGAL::Identity_property_map<geom_traits::Point_3>\endcode
|
||||
\cgalNPEnd
|
||||
|
||||
\cgalNPBegin{normal_map} \anchor PSP_normal_map
|
||||
is the property map containing the normal vectors associated to the iterators of the point range `points`.\n
|
||||
\b Type: a class model of `ReadablePropertyMap` with
|
||||
`PointRange::iterator` as key type and
|
||||
`geom_traits::Vector_3` as value type. \n
|
||||
\b No default value.
|
||||
\cgalNPEnd
|
||||
|
||||
\cgalNPBegin{diagonalize_traits} \anchor PSP_diagonalize_traits
|
||||
is the solver used for diagonalizing covariance matrices.\n
|
||||
\b Type: a class model of `DiagonalizeTraits`.\n
|
||||
\b Default: if \ref thirdpartyEigen "Eigen" 3.2 (or greater) is available and `CGAL_EIGEN3_ENABLED` is defined, then `CGAL::Eigen_diagonalize_traits` is used. Otherwise, the fallback `CGAL::Diagonalize_traits` is used (note that it is significantly slower, so using Eigen is strongly advised).\n
|
||||
\cgalNPEnd
|
||||
|
||||
\cgalNPBegin{svd_traits} \anchor PSP_svd_traits
|
||||
is the linear algebra algorithm required by the jet fitting method. For more information, please refer to the documenation of `Monge_via_jet_fitting`.\n
|
||||
\b Type: a class fitting the requirements of `Monge_via_jet_fitting`.\n
|
||||
\b Default: if \ref thirdpartyEigen "Eigen" 3.2 (or greater) is available and `CGAL_EIGEN3_ENABLED` is defined, then `CGAL::Eigen_svd` is used.\n
|
||||
\cgalNPEnd
|
||||
|
||||
\cgalNPBegin{query_point_map} \anchor PSP_query_point_map
|
||||
is the property map containing the points associated to the iterators of the point range `queries`.\n
|
||||
\b Type: a class model of `ReadablePropertyMap` with
|
||||
`PointRange::iterator` as key type and
|
||||
`geom_traits::Point_3` as value type. \n
|
||||
\b Default value is \code CGAL::Identity_property_map<geom_traits::Point_3>\endcode
|
||||
\cgalNPEnd
|
||||
|
||||
|
||||
\cgalNPBegin{sharpness_angle} \anchor PSP_sharpness_angle
|
||||
controls the sharpness of the result. The larger the value is, the smoother the result will be.
|
||||
The range of possible value is [0, 90].\n
|
||||
\b Type: floating scalar value\n
|
||||
\b Default value is `30.`
|
||||
\cgalNPEnd
|
||||
|
||||
\cgalNPBegin{edge_sensitivity} \anchor PSP_edge_sensitivity
|
||||
controls the priority of points inserted along sharp features. Larger
|
||||
values of edge-sensitivity give higher priority to inserting points
|
||||
along sharp features. The range of possible values is `[0, 1]`. See
|
||||
section \ref Point_set_processing_3Upsample_Parameter1 for an example.\n
|
||||
\b Type: floating scalar value\n
|
||||
\b Default value is `1`.
|
||||
\cgalNPEnd
|
||||
|
||||
\cgalNPBegin{neighbor_radius} \anchor PSP_neighbor_radius
|
||||
is the spherical neighborhood radius.\n
|
||||
\b Type: floating scalar value\n
|
||||
\b Default value is `-1`, in which case the functions that use it will compute an adapted value automatically.
|
||||
\cgalNPEnd
|
||||
|
||||
\cgalNPBegin{number_of_output_points} \anchor PSP_number_of_output_points
|
||||
is the number of output points to generate.\n
|
||||
\b Type: \c unsigned \c int \n
|
||||
\b Default value is `1000`
|
||||
\cgalNPEnd
|
||||
|
||||
\cgalNPBegin{size} \anchor PSP_size
|
||||
maximum cluster size for hierarchical clustering. Must be strictly greather than 0.\n
|
||||
\b Type: \c unsigned \c int \n
|
||||
\b Default value is `10`
|
||||
\cgalNPEnd
|
||||
|
||||
\cgalNPBegin{maximum_variation} \anchor PSP_maximum_variation
|
||||
maximum cluster size for hierarchical clustering. Must be strictly greather than 0.\n
|
||||
\b Type: \c unsigned \c int \n
|
||||
\b Default value is `10`
|
||||
\cgalNPEnd
|
||||
|
||||
\cgalNPBegin{degree_fitting} \anchor PSP_degree_fitting
|
||||
is the degree of fitting (see `Monge_via_jet_fitting`).\n
|
||||
\b Type: \c unsigned \c int \n
|
||||
\b Default value is `2`
|
||||
\cgalNPEnd
|
||||
|
||||
\cgalNPBegin{degree_monge} \anchor PSP_degree_monge
|
||||
is the Monge degree (see `Monge_via_jet_fitting`).\n
|
||||
\b Type: \c unsigned \c int \n
|
||||
\b Default value is `2`
|
||||
\cgalNPEnd
|
||||
|
||||
\cgalNPBegin{threshold_distance} \anchor PSP_threshold_distance
|
||||
is the minimum distance for a point to be considered as outlier
|
||||
(distance here is the square root of the average squared distance to K nearest neighbors).\n
|
||||
\b Type: floating scalar value\n
|
||||
\b Default value is `0`
|
||||
\cgalNPEnd
|
||||
|
||||
\cgalNPBegin{threshold_percent} \anchor PSP_threshold_percent
|
||||
is the maximum percentage (betwenn 0 and 100) of points to remove in `remove_outliers()`.\n
|
||||
\b Type: floating scalar value\n
|
||||
\b Default value is `10`
|
||||
\cgalNPEnd
|
||||
|
||||
\cgalNPBegin{attraction_factor} \anchor PSP_attraction_factor
|
||||
multiple of a tolerance `epsilon` used to connect simplices.
|
||||
\b Type: floating scalar value\n
|
||||
\b Default value is `3`
|
||||
\cgalNPEnd
|
||||
|
||||
\cgalNPBegin{plane_map} \anchor PSP_plane_map
|
||||
is the property map containing the planes associated to the iterators of the plane range `planes`.\n
|
||||
\b Type: a class model of `ReadablePropertyMap` with
|
||||
`PlaneRange::iterator` as key type and
|
||||
`geom_traits::Plane_3` as value type. \n
|
||||
\b Default value is \code CGAL::Identity_property_map<geom_traits::Plane_3>\endcode
|
||||
\cgalNPEnd
|
||||
|
||||
\cgalNPBegin{plane_index_map} \anchor PSP_plane_index_map
|
||||
is the property map that associates the index of a point in the input range to the index of plane (-1 if
|
||||
point does is not assigned to a plane).\n
|
||||
\b Type: a class model of `ReadablePropertyMap` with
|
||||
`std::size_t` as key type and
|
||||
`int` as value type. \n
|
||||
\b No default value.
|
||||
\cgalNPEnd
|
||||
|
||||
\cgalNPBegin{select_percentage} \anchor PSP_select_percentage
|
||||
percentage of points to retain (between 0 and 100) in `wlop_simplify_and_regularize_point_set()`.\n
|
||||
\b Type: floating scalar value\n
|
||||
\b Default value is 5.
|
||||
\cgalNPEnd
|
||||
|
||||
|
||||
\cgalNPBegin{number_of_iterations} \anchor PSP_number_of_iterations
|
||||
number of iterations to solve the optimsation problem in `wlop_simplify_and_regularize_point_set()`.\n
|
||||
\b Type: \c unsigned \c int \n
|
||||
\b Default value is 35.
|
||||
\cgalNPEnd
|
||||
|
||||
\cgalNPBegin{require_uniform_sampling} \anchor PSP_require_uniform_sampling
|
||||
turn on or off an optional preprocessing of `wlop_simplify_and_regularize_point_set(), which will
|
||||
give better result if the distribution of the input points is highly non-uniform.\n
|
||||
\b Type: `bool`\n
|
||||
\b Default value is `false`
|
||||
\cgalNPEnd
|
||||
|
||||
\cgalNPTableEnd
|
||||
|
||||
*/
|
||||
|
|
@ -537,7 +537,7 @@ structure provides the user with a method
|
|||
`Point_set_with_structure::facet_coherence()` that estimates if a
|
||||
triplet of points form a coherent facet.
|
||||
|
||||
\cgalFigureBegin{Point_set_processing_3figstructuringcoherence, structuring_coherence.png}
|
||||
\cgalFigureBegin{Point_set_processing_3figstructuring_coherence, structuring_coherence.png}
|
||||
(a) Input point set (and structured output); (b) output with many
|
||||
incoherent facets; (c) output with all facets coherent. i, j and k
|
||||
each corresponds to a primitive index.
|
||||
|
|
|
|||
|
|
@ -12,3 +12,4 @@ Jet_fitting_3
|
|||
Solver_interface
|
||||
Point_set_shape_detection_3
|
||||
Advancing_front_surface_reconstruction
|
||||
BGL
|
||||
|
|
|
|||
|
|
@ -365,54 +365,55 @@ public:
|
|||
// Public section
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
//=============================================================================
|
||||
/// \ingroup PkgPointSetProcessingAlgorithms
|
||||
///
|
||||
/// This function smooths an input point set by iteratively projecting each
|
||||
/// point onto the implicit surface patch fitted over its k nearest neighbors.
|
||||
/// Bilateral projection preserves sharp features according to the normal
|
||||
/// (gradient) information. Both point positions and normals will be modified.
|
||||
/// For more details, please see section 4 in \cgalCite{ear-2013}.
|
||||
///
|
||||
/// A parallel version of this function is provided and requires the executable to be
|
||||
/// linked against the <a href="http://www.threadingbuildingblocks.org">Intel TBB library</a>.
|
||||
/// To control the number of threads used, the user may use the tbb::task_scheduler_init class.
|
||||
/// See the <a href="http://www.threadingbuildingblocks.org/documentation">TBB documentation</a>
|
||||
/// for more details.
|
||||
///
|
||||
/// \pre Normals must be unit vectors
|
||||
/// \pre k >= 2
|
||||
///
|
||||
/// @tparam ConcurrencyTag enables sequential versus parallel algorithm.
|
||||
/// Possible values are `Sequential_tag`
|
||||
/// and `Parallel_tag`.
|
||||
/// @tparam ForwardIterator iterator over input points.
|
||||
/// @tparam PointMap is a model of `ReadWritePropertyMap`
|
||||
/// with the value type of `ForwardIterator` as key and `Kernel::Point_3` as value type.
|
||||
/// It can be omitted if the value type of `ForwardIterator` is convertible to
|
||||
/// `Kernel::Point_3`.
|
||||
/// @tparam NormalMap is a model of `ReadWritePropertyMap` with the value type of `ForwardIterator` as key
|
||||
/// and `Kernel::Vector_3` as value type.
|
||||
/// @tparam Kernel Geometric traits class.
|
||||
/// It can be omitted and deduced automatically from the value type of `PointMap`
|
||||
/// using `Kernel_traits`.
|
||||
///
|
||||
/// @return Average point movement error. It's a convergence criterium for the algorithm.
|
||||
/// This value can help the user to decide how many iterations are
|
||||
/// sufficient.
|
||||
|
||||
// This variant requires all parameters.
|
||||
/**
|
||||
\ingroup PkgPointSetProcessingAlgorithms
|
||||
|
||||
This function smooths an input point set by iteratively projecting each
|
||||
point onto the implicit surface patch fitted over its k nearest neighbors.
|
||||
Bilateral projection preserves sharp features according to the normal
|
||||
(gradient) information. Both point positions and normals will be modified.
|
||||
For more details, please see section 4 in \cgalCite{ear-2013}.
|
||||
|
||||
A parallel version of this function is provided and requires the executable to be
|
||||
linked against the <a href="http://www.threadingbuildingblocks.org">Intel TBB library</a>.
|
||||
To control the number of threads used, the user may use the tbb::task_scheduler_init class.
|
||||
See the <a href="http://www.threadingbuildingblocks.org/documentation">TBB documentation</a>
|
||||
for more details.
|
||||
|
||||
\pre Normals must be unit vectors
|
||||
\pre k >= 2
|
||||
|
||||
\tparam ConcurrencyTag enables sequential versus parallel algorithm.
|
||||
Possible values are `Sequential_tag`
|
||||
And `Parallel_tag`.
|
||||
\tparam PointRange is a model of `Range`. The value type of
|
||||
its iterator is the key type of the named parameter `point_map`.
|
||||
|
||||
\param points input point range.
|
||||
\param k size of the neighborhood for the implicit surface patch fitting.
|
||||
The larger the value is, the smoother the result will be.
|
||||
\param np optional sequence of \ref psp_namedparameters "Named Parameters" among the ones listed below.
|
||||
|
||||
\cgalNamedParamsBegin
|
||||
\cgalParamBegin{point_map} a model of `ReadWritePropertyMap` with value type `geom_traits::Point_3`.
|
||||
If this parameter is omitted, `CGAL::Identity_property_map<geom_traits::Point_3>` is used.\cgalParamEnd
|
||||
\cgalParamBegin{normal_map} a model of `ReadWritePropertyMap` with value type
|
||||
`geom_traits::Vector_3`.\cgalParamEnd
|
||||
\cgalParamBegin{geom_traits} an instance of a geometric traits class, model of `Kernel`\cgalParamEnd
|
||||
\cgalNamedParamsEnd
|
||||
|
||||
\return Average point movement error. It's a convergence criterium for the algorithm.
|
||||
This value can help the user to decide how many iterations are
|
||||
sufficient.
|
||||
*/
|
||||
template <typename ConcurrencyTag,
|
||||
typename PointRange,
|
||||
typename NamedParameters>
|
||||
double
|
||||
bilateral_smooth_point_set(
|
||||
PointRange& points,
|
||||
unsigned int k, ///< size of the neighborhood for the implicit surface patch fitting.
|
||||
///< The larger the value is, the smoother the result will be.
|
||||
double sharpness_angle, ///< controls the sharpness of the result.
|
||||
///< The larger the value is, the smoother the result will be.
|
||||
///< The range of possible value is [0, 90].
|
||||
unsigned int k,
|
||||
const NamedParameters& np)
|
||||
{
|
||||
using boost::choose_param;
|
||||
|
|
@ -430,6 +431,8 @@ bilateral_smooth_point_set(
|
|||
typedef typename std::vector<Pwn,CGAL_PSP3_DEFAULT_ALLOCATOR<Pwn> > Pwns;
|
||||
typedef typename Kernel::FT FT;
|
||||
|
||||
double sharpness_angle = choose_param(get_param(np, internal_np::sharpness_angle), 30.);
|
||||
|
||||
CGAL_point_set_processing_precondition(points.begin() != points.end());
|
||||
CGAL_point_set_processing_precondition(k > 1);
|
||||
|
||||
|
|
@ -587,22 +590,21 @@ bilateral_smooth_point_set(
|
|||
return sum_move_error / nb_points;
|
||||
}
|
||||
|
||||
/// \cond SKIP_IN_MANUAL
|
||||
// variant with default NP
|
||||
template <typename ConcurrencyTag,
|
||||
typename PointRange>
|
||||
double
|
||||
bilateral_smooth_point_set(
|
||||
PointRange& points,
|
||||
unsigned int k, ///< size of the neighborhood for the implicit surface patch fitting.
|
||||
unsigned int k) ///< size of the neighborhood for the implicit surface patch fitting.
|
||||
///< The larger the value is, the smoother the result will be.
|
||||
double sharpness_angle) ///< controls the sharpness of the result.
|
||||
///< The larger the value is, the smoother the result will be.
|
||||
///< The range of possible value is [0, 90].
|
||||
{
|
||||
return bilateral_smooth_point_set<ConcurrencyTag>
|
||||
(points, k, sharpness_angle, CGAL::Point_set_processing_3::parameters::all_default(points));
|
||||
(points, k, CGAL::Point_set_processing_3::parameters::all_default(points));
|
||||
}
|
||||
|
||||
// This variant requires all parameters.
|
||||
// deprecated API
|
||||
template <typename ConcurrencyTag,
|
||||
typename ForwardIterator,
|
||||
typename PointMap,
|
||||
|
|
@ -625,12 +627,12 @@ bilateral_smooth_point_set(
|
|||
CGAL::Iterator_range<ForwardIterator> points = CGAL::make_range (first, beyond);
|
||||
return bilateral_smooth_point_set<ConcurrencyTag>
|
||||
(points,
|
||||
k, sharpness_angle,
|
||||
CGAL::parameters::point_map(point_map).normal_map(normal_map).geom_traits(Kernel()));
|
||||
k,
|
||||
CGAL::parameters::point_map(point_map).normal_map(normal_map)
|
||||
.sharpness_angle(sharpness_angle).geom_traits(Kernel()));
|
||||
}
|
||||
|
||||
/// @cond SKIP_IN_MANUAL
|
||||
// This variant deduces the kernel from the point property map.
|
||||
// deprecated API
|
||||
template <typename ConcurrencyTag,
|
||||
typename ForwardIterator,
|
||||
typename PointMap,
|
||||
|
|
@ -649,13 +651,11 @@ bilateral_smooth_point_set(
|
|||
CGAL::Iterator_range<ForwardIterator> points = CGAL::make_range (first, beyond);
|
||||
return bilateral_smooth_point_set<ConcurrencyTag>
|
||||
(points,
|
||||
k, sharpness_angle,
|
||||
CGAL::parameters::point_map(point_map).normal_map(normal_map));
|
||||
k,
|
||||
CGAL::parameters::point_map(point_map).normal_map(normal_map).sharpness_angle(sharpness_angle));
|
||||
}
|
||||
/// @endcond
|
||||
|
||||
/// @cond SKIP_IN_MANUAL
|
||||
// This variant creates a default point property map = Dereference_property_map.
|
||||
// deprecated API
|
||||
template <typename ConcurrencyTag,
|
||||
typename ForwardIterator,
|
||||
typename NormalMap>
|
||||
|
|
@ -671,10 +671,10 @@ bilateral_smooth_point_set(
|
|||
CGAL::Iterator_range<ForwardIterator> points = CGAL::make_range (first, beyond);
|
||||
return bilateral_smooth_point_set<ConcurrencyTag>
|
||||
(points,
|
||||
k, sharpness_angle,
|
||||
CGAL::parameters::normal_map(normal_map));
|
||||
k,
|
||||
CGAL::parameters::normal_map(normal_map).sharpness_angle(sharpness_angle));
|
||||
}
|
||||
/// @endcond
|
||||
/// \endcond
|
||||
|
||||
|
||||
} //namespace CGAL
|
||||
|
|
|
|||
|
|
@ -133,23 +133,30 @@ compute_average_spacing(const typename Kernel::Point_3& query, ///< 3D point who
|
|||
// Public section
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
/// \ingroup PkgPointSetProcessingAlgorithms
|
||||
/// Computes average spacing from k nearest neighbors.
|
||||
///
|
||||
/// \pre `k >= 2.`
|
||||
///
|
||||
/// @tparam ConcurrencyTag enables sequential versus parallel algorithm.
|
||||
/// Possible values are `Sequential_tag`
|
||||
/// and `Parallel_tag`.
|
||||
/// @tparam InputIterator iterator over input points.
|
||||
/// @tparam PointMap is a model of `ReadablePropertyMap` with value type `Point_3<Kernel>`.
|
||||
/// It can be omitted if the value type of `InputIterator` is convertible to `Point_3<Kernel>`.
|
||||
/// @tparam Kernel Geometric traits class.
|
||||
/// It can be omitted and deduced automatically from the value type of `PointMap`.
|
||||
///
|
||||
/// @return average spacing (scalar).
|
||||
/**
|
||||
\ingroup PkgPointSetProcessingAlgorithms
|
||||
Computes average spacing from k nearest neighbors.
|
||||
|
||||
// This variant requires the kernel.
|
||||
\pre `k >= 2.`
|
||||
|
||||
\tparam ConcurrencyTag enables sequential versus parallel algorithm.
|
||||
Possible values are `Sequential_tag`
|
||||
and `Parallel_tag`.
|
||||
\tparam PointRange is a model of `ConstRange`. The value type of
|
||||
its iterator is the key type of the named parameter `point_map`.
|
||||
|
||||
\param points input point range.
|
||||
\param k number of neighbors.
|
||||
\param np optional sequence of \ref psp_namedparameters "Named Parameters" among the ones listed below.
|
||||
|
||||
\cgalNamedParamsBegin
|
||||
\cgalParamBegin{point_map} a model of `ReadablePropertyMap` with value type `geom_traits::Point_3`.
|
||||
If this parameter is omitted, `CGAL::Identity_property_map<geom_traits::Point_3>` is used.\cgalParamEnd
|
||||
\cgalParamBegin{geom_traits} an instance of a geometric traits class, model of `Kernel`\cgalParamEnd
|
||||
\cgalNamedParamsEnd
|
||||
|
||||
\return average spacing (scalar).
|
||||
*/
|
||||
template <typename ConcurrencyTag,
|
||||
typename PointRange,
|
||||
typename NamedParameters
|
||||
|
|
@ -157,7 +164,7 @@ template <typename ConcurrencyTag,
|
|||
double
|
||||
compute_average_spacing(
|
||||
const PointRange& points,
|
||||
unsigned int k, ///< number of neighbors.
|
||||
unsigned int k,
|
||||
const NamedParameters& np)
|
||||
{
|
||||
using boost::choose_param;
|
||||
|
|
@ -223,6 +230,9 @@ compute_average_spacing(
|
|||
return sum_spacings / (FT)(kd_tree_points.size ());
|
||||
}
|
||||
|
||||
/// \cond SKIP_IN_MANUAL
|
||||
|
||||
// variant with default NP
|
||||
template <typename ConcurrencyTag, typename PointRange>
|
||||
double compute_average_spacing(
|
||||
const PointRange& points,
|
||||
|
|
@ -232,6 +242,8 @@ double compute_average_spacing(
|
|||
(points, k, CGAL::Point_set_processing_3::parameters::all_default(points));
|
||||
}
|
||||
|
||||
|
||||
// deprecated API
|
||||
template <typename ConcurrencyTag,
|
||||
typename InputIterator,
|
||||
typename PointMap,
|
||||
|
|
@ -253,8 +265,8 @@ compute_average_spacing(
|
|||
}
|
||||
|
||||
|
||||
/// @cond SKIP_IN_MANUAL
|
||||
// This variant deduces the kernel from the iterator type.
|
||||
|
||||
// deprecated API
|
||||
template <typename ConcurrencyTag,
|
||||
typename InputIterator,
|
||||
typename PointMap
|
||||
|
|
@ -272,10 +284,8 @@ compute_average_spacing(
|
|||
k,
|
||||
CGAL::parameters::point_map (point_map));
|
||||
}
|
||||
/// @endcond
|
||||
|
||||
/// @cond SKIP_IN_MANUAL
|
||||
// This variant creates a default point property map = Identity_property_map.
|
||||
// deprecated API
|
||||
template < typename ConcurrencyTag, typename InputIterator >
|
||||
typename Kernel_traits<typename std::iterator_traits<InputIterator>::value_type>::Kernel::FT
|
||||
compute_average_spacing(
|
||||
|
|
@ -287,7 +297,8 @@ compute_average_spacing(
|
|||
return compute_average_spacing<ConcurrencyTag>(
|
||||
CGAL::make_range (first,beyond), k);
|
||||
}
|
||||
/// @endcond
|
||||
|
||||
/// \endcond
|
||||
|
||||
|
||||
} //namespace CGAL
|
||||
|
|
|
|||
|
|
@ -279,36 +279,39 @@ update_new_point(
|
|||
// Public section
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
/// \ingroup PkgPointSetProcessingAlgorithms
|
||||
/// This method progressively upsamples the point set while
|
||||
/// approaching the edge singularities (detected by normal variation), which
|
||||
/// generates a denser point set from an input point set. This has applications
|
||||
/// in point-based rendering, hole filling, and sparse surface reconstruction.
|
||||
/// Normals of points are required as input. For more details, please refer to \cgalCite{ear-2013}.
|
||||
///
|
||||
/// @tparam ConcurrencyTag enables sequential versus parallel
|
||||
/// versions of `compute_average_spacing()` (called internally).
|
||||
/// Possible values are `Sequential_tag`
|
||||
/// and `Parallel_tag`.
|
||||
/// @tparam OutputIterator Type of the output iterator.
|
||||
/// The type of the objects put in it is
|
||||
/// `std::pair<Kernel::Point_3, Kernel::Vector_3>`.
|
||||
/// Note that the user may use a
|
||||
/// <A HREF="http://www.boost.org/libs/iterator/doc/function_output_iterator.html">function_output_iterator</A>
|
||||
/// to match specific needs.
|
||||
/// @tparam ForwardIterator iterator over input points.
|
||||
/// @tparam PointMap is a model of `ReadablePropertyMap`
|
||||
/// with the value type of `ForwardIterator` as key and `Kernel::Point_3` as value type.
|
||||
/// It can be omitted if the value type of `ForwardIterator` is convertible to
|
||||
/// `Kernel::Point_3`.
|
||||
/// @tparam NormalMap is a model of `ReadablePropertyMap` with the value type of `ForwardIterator` as key
|
||||
/// and `Kernel::Vector_3` as value type.
|
||||
/// @tparam Kernel Geometric traits class.
|
||||
/// It can be omitted and deduced automatically from the value type of `PointMap`
|
||||
/// using `Kernel_traits`.
|
||||
///
|
||||
/**
|
||||
\ingroup PkgPointSetProcessingAlgorithms
|
||||
This method progressively upsamples the point set while
|
||||
approaching the edge singularities (detected by normal variation), which
|
||||
generates a denser point set from an input point set. This has applications
|
||||
in point-based rendering, hole filling, and sparse surface reconstruction.
|
||||
Normals of points are required as input. For more details, please refer to \cgalCite{ear-2013}.
|
||||
|
||||
// This variant requires all parameters.
|
||||
\tparam ConcurrencyTag enables sequential versus parallel versions
|
||||
of `compute_average_spacing()` (called internally). Possible
|
||||
values are `Sequential_tag` and `Parallel_tag`.
|
||||
\tparam PointRange is a model of `ConstRange`. The value type of
|
||||
its iterator is the key type of the named parameter `point_map`.
|
||||
\tparam OutputIterator Type of the output iterator.
|
||||
The type of the objects put in it is
|
||||
`std::pair<geom_traits::Point_3, geom_traits::Vector_3>`.
|
||||
Note that the user may use a
|
||||
<A HREF="http://www.boost.org/libs/iterator/doc/function_output_iterator.html">function_output_iterator</A>
|
||||
to match specific needs.
|
||||
|
||||
\param points input point range.
|
||||
\param output iterator where output points and normals are put.
|
||||
\param np optional sequence of \ref psp_namedparameters "Named Parameters" among the ones listed below.
|
||||
|
||||
\cgalNamedParamsBegin
|
||||
\cgalParamBegin{point_map} a model of `ReadablePropertyMap` with value type `geom_traits::Point_3`.
|
||||
If this parameter is omitted, `CGAL::Identity_property_map<geom_traits::Point_3>` is used.\cgalParamEnd
|
||||
\cgalParamBegin{normal_map} a model of `ReadablePropertyMap` with value type
|
||||
`geom_traits::Vector_3`.\cgalParamEnd
|
||||
\cgalParamBegin{geom_traits} an instance of a geometric traits class, model of `Kernel`\cgalParamEnd
|
||||
\cgalNamedParamsEnd
|
||||
|
||||
*/
|
||||
template <typename ConcurrencyTag,
|
||||
typename PointRange,
|
||||
typename OutputIterator,
|
||||
|
|
@ -316,8 +319,7 @@ template <typename ConcurrencyTag,
|
|||
OutputIterator
|
||||
edge_aware_upsample_point_set(
|
||||
const PointRange& points,
|
||||
OutputIterator output, ///< output iterator where output points and normals
|
||||
///< are put.
|
||||
OutputIterator output,
|
||||
const NamedParameters& np)
|
||||
{
|
||||
using boost::choose_param;
|
||||
|
|
@ -571,19 +573,22 @@ edge_aware_upsample_point_set(
|
|||
return output;
|
||||
}
|
||||
|
||||
|
||||
/// \cond SKIP_IN_MANUAL
|
||||
// variant with default NP
|
||||
template <typename ConcurrencyTag,
|
||||
typename PointRange,
|
||||
typename OutputIterator>
|
||||
OutputIterator
|
||||
edge_aware_upsample_point_set(
|
||||
const PointRange& points,
|
||||
OutputIterator output) ///< output iterator where output points and normals
|
||||
///< are put.
|
||||
OutputIterator output)
|
||||
{
|
||||
return edge_aware_upsample_point_set<ConcurrencyTag>
|
||||
(points, output, CGAL::Point_set_processing_3::parameters::all_default(points));
|
||||
}
|
||||
// This variant requires all parameters.
|
||||
|
||||
// deprecated API
|
||||
template <typename ConcurrencyTag,
|
||||
typename OutputIterator,
|
||||
typename ForwardIterator,
|
||||
|
|
@ -633,8 +638,8 @@ edge_aware_upsample_point_set(
|
|||
geom_traits (Kernel()));
|
||||
}
|
||||
|
||||
/// @cond SKIP_IN_MANUAL
|
||||
// This variant deduces the kernel from the point property map.
|
||||
|
||||
// deprecated API
|
||||
template <typename ConcurrencyTag,
|
||||
typename OutputIterator,
|
||||
typename ForwardIterator,
|
||||
|
|
@ -663,10 +668,8 @@ edge_aware_upsample_point_set(
|
|||
neighbor_radius (neighbor_radius).
|
||||
number_of_output_points (number_of_output_points));
|
||||
}
|
||||
/// @endcond
|
||||
|
||||
|
||||
/// @cond SKIP_IN_MANUAL
|
||||
// deprecated API
|
||||
template <typename ConcurrencyTag,
|
||||
typename OutputIterator,
|
||||
typename ForwardIterator,
|
||||
|
|
@ -692,7 +695,7 @@ edge_aware_upsample_point_set(
|
|||
neighbor_radius (neighbor_radius).
|
||||
number_of_output_points (number_of_output_points));
|
||||
}
|
||||
/// @endcond
|
||||
/// \endcond
|
||||
|
||||
} //namespace CGAL
|
||||
|
||||
|
|
|
|||
|
|
@ -435,35 +435,46 @@ public:
|
|||
// Public section
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
/// \ingroup PkgPointSetProcessingAlgorithms
|
||||
/**
|
||||
\ingroup PkgPointSetProcessingAlgorithms
|
||||
|
||||
/// Estimates the local scale in a K nearest neighbors sense on a set
|
||||
/// of user-defined query points. The computed scales correspond to
|
||||
/// the smallest scales such that the K subsets of points have the
|
||||
/// appearance of a surface in 3D or the appearance of a curve in 2D
|
||||
/// (see \ref Point_set_processing_3Scale).
|
||||
///
|
||||
///
|
||||
/// @tparam SamplesInputIterator iterator over input sample points.
|
||||
/// @tparam SamplesPointMap is a model of `ReadablePropertyMap` with
|
||||
/// value type `Point_3<Kernel>` or `Point_2<Kernel>`. It can
|
||||
/// be omitted if the value type of `SamplesInputIterator` is
|
||||
/// convertible to `Point_3<Kernel>` or to `Point_2<Kernel>`.
|
||||
/// @tparam QueriesInputIterator iterator over points where scale
|
||||
/// should be computed.
|
||||
/// @tparam QueriesInputIterator is a model of `ReadablePropertyMap`
|
||||
/// with value type `Point_3<Kernel>` or `Point_2<Kernel>`. It
|
||||
/// can be omitted if the value type of `QueriesInputIterator` is
|
||||
/// convertible to `Point_3<Kernel>` or to `Point_2<Kernel>`.
|
||||
/// @tparam OutputIterator is used to store the computed scales. It accepts
|
||||
/// values of type `std::size_t`.
|
||||
/// @tparam Kernel Geometric traits class. It can be omitted and
|
||||
/// deduced automatically from the value type of `SamplesPointMap`.
|
||||
///
|
||||
/// @note This function accepts both 2D and 3D points, but sample
|
||||
/// points and query must have the same dimension.
|
||||
Estimates the local scale in a K nearest neighbors sense on a set
|
||||
of user-defined query points. The computed scales correspond to
|
||||
the smallest scales such that the K subsets of points have the
|
||||
appearance of a surface in 3D or the appearance of a curve in 2D
|
||||
(see \ref Point_set_processing_3Scale).
|
||||
|
||||
// This variant requires all parameters.
|
||||
\tparam PointRange is a model of `ConstRange`. The value type of
|
||||
its iterator is the key type of the named parameter `point_map`.
|
||||
\tparam QueryPointRange is a model of `ConstRange`. The value type of
|
||||
its iterator is the key type of the named parameter `query_point_map`.
|
||||
\tparam OutputIterator is used to store the computed scales. It accepts
|
||||
values of type `std::size_t`.
|
||||
|
||||
\param points input point range.
|
||||
\param queries range of locations where scale must be estimated
|
||||
\param output iterator to store the computed scales
|
||||
\param np optional sequence of \ref psp_namedparameters "Named Parameters" among the ones listed below.
|
||||
|
||||
\cgalNamedParamsBegin
|
||||
\cgalParamBegin{point_map} a model of `ReadablePropertyMap` with
|
||||
value type `geom_traits::Point_3` (or `geom_traits::Point_2`).
|
||||
If this parameter is omitted,
|
||||
`CGAL::Identity_property_map<geom_traits::Point_3>` (or
|
||||
`CGAL::Identity_property_map<geom_traits::Point_2>`) is
|
||||
used.\cgalParamEnd
|
||||
\cgalParamBegin{query_point_map} a model of `ReadablePropertyMap` with
|
||||
value type `geom_traits::Point_3` (or `geom_traits::Point_2`).
|
||||
If this parameter is omitted,
|
||||
`CGAL::Identity_property_map<geom_traits::Point_3>` (or
|
||||
`CGAL::Identity_property_map<geom_traits::Point_2>`) is
|
||||
used.\cgalParamEnd
|
||||
\cgalParamBegin{geom_traits} an instance of a geometric traits class, model of `Kernel`\cgalParamEnd
|
||||
\cgalNamedParamsEnd
|
||||
|
||||
\note This function accepts both 2D and 3D points, but sample
|
||||
points and query must have the same dimension.
|
||||
*/
|
||||
template <typename PointRange,
|
||||
typename QueryPointRange,
|
||||
typename OutputIterator,
|
||||
|
|
@ -473,7 +484,7 @@ OutputIterator
|
|||
estimate_local_k_neighbor_scales(
|
||||
const PointRange& points,
|
||||
const QueryPointRange& queries,
|
||||
OutputIterator output, ///< output iterator to store the computed scales
|
||||
OutputIterator output,
|
||||
const NamedParameters& np)
|
||||
{
|
||||
using boost::choose_param;
|
||||
|
|
@ -499,6 +510,8 @@ estimate_local_k_neighbor_scales(
|
|||
return output;
|
||||
}
|
||||
|
||||
/// \cond SKIP_IN_MANUAL
|
||||
// variant with default NP
|
||||
template <typename PointRange,
|
||||
typename QueryPointRange,
|
||||
typename OutputIterator
|
||||
|
|
@ -507,32 +520,41 @@ OutputIterator
|
|||
estimate_local_k_neighbor_scales(
|
||||
const PointRange& points,
|
||||
const QueryPointRange& queries,
|
||||
OutputIterator output) ///< output iterator to store the computed scales
|
||||
OutputIterator output)
|
||||
{
|
||||
return estimate_local_k_neighbor_scales
|
||||
(points, queries, output, CGAL::Point_set_processing_3::parameters::all_default(points));
|
||||
}
|
||||
/// \endcond
|
||||
|
||||
/// \ingroup PkgPointSetProcessingAlgorithms
|
||||
/**
|
||||
\ingroup PkgPointSetProcessingAlgorithms
|
||||
|
||||
/// Estimates the global scale in a K nearest neighbors sense. The
|
||||
/// computed scale corresponds to the smallest scale such that the K
|
||||
/// subsets of points have the appearance of a surface in 3D or the
|
||||
/// appearance of a curve in 2D (see \ref Point_set_processing_3Scale).
|
||||
///
|
||||
///
|
||||
/// @tparam InputIterator iterator over input points.
|
||||
/// @tparam PointMap is a model of `ReadablePropertyMap` with
|
||||
/// value type `Point_3<Kernel>` or `Point_2<Kernel>`. It can
|
||||
/// be omitted if the value type of `InputIterator` is
|
||||
/// convertible to `Point_3<Kernel>` or to `Point_2<Kernel>`.
|
||||
/// @tparam Kernel Geometric traits class. It can be omitted and
|
||||
/// deduced automatically from the value type of `PointMap`.
|
||||
///
|
||||
/// @note This function accepts both 2D and 3D points.
|
||||
///
|
||||
/// @return The estimated scale in the K nearest neighbors sense.
|
||||
// This variant requires all parameters.
|
||||
Estimates the global scale in a K nearest neighbors sense. The
|
||||
computed scale corresponds to the smallest scale such that the K
|
||||
subsets of points have the appearance of a surface in 3D or the
|
||||
appearance of a curve in 2D (see \ref Point_set_processing_3Scale).
|
||||
|
||||
\tparam PointRange is a model of `ConstRange`. The value type of
|
||||
its iterator is the key type of the named parameter `point_map`.
|
||||
|
||||
\param points input point range.
|
||||
\param np optional sequence of \ref psp_namedparameters "Named Parameters" among the ones listed below.
|
||||
|
||||
\cgalNamedParamsBegin
|
||||
\cgalParamBegin{point_map} a model of `ReadablePropertyMap` with
|
||||
value type `geom_traits::Point_3` (or `geom_traits::Point_2`).
|
||||
If this parameter is omitted,
|
||||
`CGAL::Identity_property_map<geom_traits::Point_3>` (or
|
||||
`CGAL::Identity_property_map<geom_traits::Point_2>`) is
|
||||
used.\cgalParamEnd
|
||||
\cgalParamBegin{geom_traits} an instance of a geometric traits class, model of `Kernel`\cgalParamEnd
|
||||
\cgalNamedParamsEnd
|
||||
|
||||
\note This function accepts both 2D and 3D points.
|
||||
|
||||
\return The estimated scale in the K nearest neighbors sense.
|
||||
*/
|
||||
template <typename PointRange,
|
||||
typename NamedParameters
|
||||
>
|
||||
|
|
@ -547,6 +569,8 @@ estimate_global_k_neighbor_scale(
|
|||
return scales[scales.size() / 2];
|
||||
}
|
||||
|
||||
/// \cond SKIP_IN_MANUAL
|
||||
// variant with default NP
|
||||
template <typename PointRange>
|
||||
std::size_t
|
||||
estimate_global_k_neighbor_scale(const PointRange& points)
|
||||
|
|
@ -554,36 +578,49 @@ estimate_global_k_neighbor_scale(const PointRange& points)
|
|||
return estimate_global_k_neighbor_scale
|
||||
(points, CGAL::Point_set_processing_3::parameters::all_default(points));
|
||||
}
|
||||
/// \endcond
|
||||
|
||||
/// \ingroup PkgPointSetProcessingAlgorithms
|
||||
/**
|
||||
\ingroup PkgPointSetProcessingAlgorithms
|
||||
|
||||
/// Estimates the local scale in a range sense on a set of
|
||||
/// user-defined query points. The computed scales correspond to the
|
||||
/// smallest scales such that the subsets of points included in the
|
||||
/// sphere range have the appearance of a surface in 3D or the
|
||||
/// appearance of a curve in 2D (see \ref Point_set_processing_3Scale).
|
||||
///
|
||||
///
|
||||
/// @tparam SamplesInputIterator iterator over input sample points.
|
||||
/// @tparam SamplesPointMap is a model of `ReadablePropertyMap` with
|
||||
/// value type `Point_3<Kernel>` or `Point_2<Kernel>`. It can
|
||||
/// be omitted if the value type of `SamplesInputIterator` is
|
||||
/// convertible to `Point_3<Kernel>` or to `Point_2<Kernel>`.
|
||||
/// @tparam QueriesInputIterator iterator over points where scale
|
||||
/// should be computed.
|
||||
/// @tparam QueriesInputIterator is a model of `ReadablePropertyMap`
|
||||
/// with value type `Point_3<Kernel>` or `Point_2<Kernel>`. It
|
||||
/// can be omitted if the value type of `QueriesInputIterator` is
|
||||
/// convertible to `Point_3<Kernel>` or to `Point_2<Kernel>`.
|
||||
/// @tparam OutputIterator is used to store the computed scales. It accepts
|
||||
/// values of type `Kernel::FT`.
|
||||
/// @tparam Kernel Geometric traits class. It can be omitted and
|
||||
/// deduced automatically from the value type of `SamplesPointMap`.
|
||||
///
|
||||
/// @note This function accepts both 2D and 3D points, but sample
|
||||
/// points and query must have the same dimension.
|
||||
Estimates the local scale in a range sense on a set of
|
||||
user-defined query points. The computed scales correspond to the
|
||||
smallest scales such that the subsets of points included in the
|
||||
sphere range have the appearance of a surface in 3D or the
|
||||
appearance of a curve in 2D (see \ref Point_set_processing_3Scale).
|
||||
|
||||
// This variant requires all parameters.
|
||||
|
||||
\tparam PointRange is a model of `ConstRange`. The value type of
|
||||
its iterator is the key type of the named parameter `point_map`.
|
||||
\tparam QueryPointRange is a model of `ConstRange`. The value type of
|
||||
its iterator is the key type of the named parameter `query_point_map`.
|
||||
\tparam OutputIterator is used to store the computed scales. It accepts
|
||||
values of type `geom_traits::FT`.
|
||||
|
||||
\param points input point range.
|
||||
\param queries range of locations where scale must be estimated
|
||||
\param output iterator to store the computed scales
|
||||
\param np optional sequence of \ref psp_namedparameters "Named Parameters" among the ones listed below.
|
||||
|
||||
\cgalNamedParamsBegin
|
||||
\cgalParamBegin{point_map} a model of `ReadablePropertyMap` with
|
||||
value type `geom_traits::Point_3` (or `geom_traits::Point_2`).
|
||||
If this parameter is omitted,
|
||||
`CGAL::Identity_property_map<geom_traits::Point_3>` (or
|
||||
`CGAL::Identity_property_map<geom_traits::Point_2>`) is
|
||||
used.\cgalParamEnd
|
||||
\cgalParamBegin{query_point_map} a model of `ReadablePropertyMap` with
|
||||
value type `geom_traits::Point_3` (or `geom_traits::Point_2`).
|
||||
If this parameter is omitted,
|
||||
`CGAL::Identity_property_map<geom_traits::Point_3>` (or
|
||||
`CGAL::Identity_property_map<geom_traits::Point_2>`) is
|
||||
used.\cgalParamEnd
|
||||
\cgalParamBegin{geom_traits} an instance of a geometric traits class, model of `Kernel`\cgalParamEnd
|
||||
\cgalNamedParamsEnd
|
||||
|
||||
\note This function accepts both 2D and 3D points, but sample
|
||||
points and query must have the same dimension.
|
||||
*/
|
||||
template <typename PointRange,
|
||||
typename QueryPointRange,
|
||||
typename OutputIterator,
|
||||
|
|
@ -593,7 +630,7 @@ OutputIterator
|
|||
estimate_local_range_scales(
|
||||
const PointRange& points,
|
||||
const QueryPointRange& queries,
|
||||
OutputIterator output, ///< output iterator to store the computed scales
|
||||
OutputIterator output,
|
||||
const NamedParameters& np)
|
||||
{
|
||||
using boost::choose_param;
|
||||
|
|
@ -618,6 +655,8 @@ estimate_local_range_scales(
|
|||
return output;
|
||||
}
|
||||
|
||||
/// \cond SKIP_IN_MANUAL
|
||||
// variant with default NP
|
||||
template <typename PointRange,
|
||||
typename QueryPointRange,
|
||||
typename OutputIterator
|
||||
|
|
@ -626,32 +665,42 @@ OutputIterator
|
|||
estimate_local_range_scales(
|
||||
const PointRange& points,
|
||||
const QueryPointRange& queries,
|
||||
OutputIterator output) ///< output iterator to store the computed scales
|
||||
OutputIterator output)
|
||||
{
|
||||
return estimate_local_range_scales
|
||||
(points, queries, output, CGAL::Point_set_processing_3::parameters::all_default(points));
|
||||
}
|
||||
/// \endcond
|
||||
|
||||
/// \ingroup PkgPointSetProcessingAlgorithms
|
||||
/**
|
||||
\ingroup PkgPointSetProcessingAlgorithms
|
||||
|
||||
/// Estimates the global scale in a range sense. The computed scale
|
||||
/// corresponds to the smallest scale such that the subsets of points
|
||||
/// inside the sphere range have the appearance of a surface in 3D or
|
||||
/// the appearance of a curve in 2D (see \ref Point_set_processing_3Scale).
|
||||
///
|
||||
///
|
||||
/// @tparam InputIterator iterator over input points.
|
||||
/// @tparam PointMap is a model of `ReadablePropertyMap` with
|
||||
/// value type `Point_3<Kernel>` or `Point_2<Kernel>`. It can
|
||||
/// be omitted if the value type of `InputIterator` is
|
||||
/// convertible to `Point_3<Kernel>` or to `Point_2<Kernel>`.
|
||||
/// @tparam Kernel Geometric traits class. It can be omitted and
|
||||
/// deduced automatically from the value type of `PointMap`.
|
||||
///
|
||||
/// @note This function accepts both 2D and 3D points.
|
||||
///
|
||||
/// @return The estimated scale in the range sense.
|
||||
// This variant requires all parameters.
|
||||
Estimates the global scale in a range sense. The computed scale
|
||||
corresponds to the smallest scale such that the subsets of points
|
||||
inside the sphere range have the appearance of a surface in 3D or
|
||||
the appearance of a curve in 2D (see \ref Point_set_processing_3Scale).
|
||||
|
||||
|
||||
\tparam PointRange is a model of `ConstRange`. The value type of
|
||||
its iterator is the key type of the named parameter `point_map`.
|
||||
|
||||
\param points input point range.
|
||||
\param np optional sequence of \ref psp_namedparameters "Named Parameters" among the ones listed below.
|
||||
|
||||
\cgalNamedParamsBegin
|
||||
\cgalParamBegin{point_map} a model of `ReadablePropertyMap` with
|
||||
value type `geom_traits::Point_3` (or `geom_traits::Point_2`).
|
||||
If this parameter is omitted,
|
||||
`CGAL::Identity_property_map<geom_traits::Point_3>` (or
|
||||
`CGAL::Identity_property_map<geom_traits::Point_2>`) is
|
||||
used.\cgalParamEnd
|
||||
\cgalParamBegin{geom_traits} an instance of a geometric traits class, model of `Kernel`\cgalParamEnd
|
||||
\cgalNamedParamsEnd
|
||||
|
||||
\note This function accepts both 2D and 3D points.
|
||||
|
||||
\return The estimated scale in the range sense.
|
||||
*/
|
||||
template <typename PointRange,
|
||||
typename NamedParameters
|
||||
>
|
||||
|
|
@ -666,6 +715,8 @@ estimate_global_range_scale(
|
|||
return std::sqrt (scales[scales.size() / 2]);
|
||||
}
|
||||
|
||||
/// \cond SKIP_IN_MANUAL
|
||||
// variant with default NP
|
||||
template <typename PointRange>
|
||||
double
|
||||
estimate_global_range_scale(const PointRange& points)
|
||||
|
|
@ -674,38 +725,7 @@ estimate_global_range_scale(const PointRange& points)
|
|||
(points, CGAL::Point_set_processing_3::parameters::all_default(points));
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Useful overloads
|
||||
// ----------------------------------------------------------------------------
|
||||
/// \cond SKIP_IN_MANUAL
|
||||
|
||||
/// Estimates the local scale in a K nearest neighbors sense on a set
|
||||
/// of user-defined query points. The computed scales correspond to
|
||||
/// the smallest scales such that the K subsets of points have the
|
||||
/// appearance of a surface in 3D or the appearance of a curve in 2D
|
||||
/// (see \ref Point_set_processing_3Scale).
|
||||
///
|
||||
///
|
||||
/// @tparam SamplesInputIterator iterator over input sample points.
|
||||
/// @tparam SamplesPointMap is a model of `ReadablePropertyMap` with
|
||||
/// value type `Point_3<Kernel>` or `Point_2<Kernel>`. It can
|
||||
/// be omitted if the value type of `SamplesInputIterator` is
|
||||
/// convertible to `Point_3<Kernel>` or to `Point_2<Kernel>`.
|
||||
/// @tparam QueriesInputIterator iterator over points where scale
|
||||
/// should be computed.
|
||||
/// @tparam QueriesInputIterator is a model of `ReadablePropertyMap`
|
||||
/// with value type `Point_3<Kernel>` or `Point_2<Kernel>`. It
|
||||
/// can be omitted if the value type of `QueriesInputIterator` is
|
||||
/// convertible to `Point_3<Kernel>` or to `Point_2<Kernel>`.
|
||||
/// @tparam OutputIterator is used to store the computed scales. It accepts
|
||||
/// values of type `std::size_t`.
|
||||
/// @tparam Kernel Geometric traits class. It can be omitted and
|
||||
/// deduced automatically from the value type of `SamplesPointMap`.
|
||||
///
|
||||
/// @note This function accepts both 2D and 3D points, but sample
|
||||
/// points and query must have the same dimension.
|
||||
|
||||
// This variant requires all parameters.
|
||||
// deprecated API
|
||||
template <typename SamplesInputIterator,
|
||||
typename SamplesPointMap,
|
||||
typename QueriesInputIterator,
|
||||
|
|
@ -734,7 +754,7 @@ estimate_local_k_neighbor_scales(
|
|||
geom_traits (Kernel()));
|
||||
}
|
||||
|
||||
|
||||
// deprecated API
|
||||
template <typename SamplesInputIterator,
|
||||
typename SamplesPointMap,
|
||||
typename QueriesInputIterator,
|
||||
|
|
@ -760,6 +780,7 @@ estimate_local_k_neighbor_scales(
|
|||
query_point_map (queries_map));
|
||||
}
|
||||
|
||||
// deprecated API
|
||||
template <typename SamplesInputIterator,
|
||||
typename QueriesInputIterator,
|
||||
typename OutputIterator
|
||||
|
|
@ -777,27 +798,9 @@ estimate_local_k_neighbor_scales(
|
|||
(CGAL::make_range (first, beyond),
|
||||
CGAL::make_range (first_query, beyond_query),
|
||||
output);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// Estimates the global scale in a K nearest neighbors sense. The
|
||||
/// computed scale corresponds to the smallest scale such that the K
|
||||
/// subsets of points have the appearance of a surface in 3D or the
|
||||
/// appearance of a curve in 2D (see \ref Point_set_processing_3Scale).
|
||||
///
|
||||
///
|
||||
/// @tparam InputIterator iterator over input points.
|
||||
/// @tparam PointMap is a model of `ReadablePropertyMap` with
|
||||
/// value type `Point_3<Kernel>` or `Point_2<Kernel>`. It can
|
||||
/// be omitted if the value type of `InputIterator` is
|
||||
/// convertible to `Point_3<Kernel>` or to `Point_2<Kernel>`.
|
||||
/// @tparam Kernel Geometric traits class. It can be omitted and
|
||||
/// deduced automatically from the value type of `PointMap`.
|
||||
///
|
||||
/// @note This function accepts both 2D and 3D points.
|
||||
///
|
||||
/// @return The estimated scale in the K nearest neighbors sense.
|
||||
// This variant requires all parameters.
|
||||
// deprecated API
|
||||
template <typename InputIterator,
|
||||
typename PointMap,
|
||||
typename Kernel
|
||||
|
|
@ -816,6 +819,7 @@ estimate_global_k_neighbor_scale(
|
|||
geom_traits (kernel));
|
||||
}
|
||||
|
||||
// deprecated API
|
||||
template <typename InputIterator,
|
||||
typename PointMap
|
||||
>
|
||||
|
|
@ -831,6 +835,7 @@ estimate_global_k_neighbor_scale(
|
|||
CGAL::parameters::point_map (point_map));
|
||||
}
|
||||
|
||||
// deprecated API
|
||||
template <typename InputIterator
|
||||
>
|
||||
std::size_t
|
||||
|
|
@ -843,34 +848,7 @@ estimate_global_k_neighbor_scale(
|
|||
(CGAL::make_range (first, beyond));
|
||||
}
|
||||
|
||||
|
||||
/// Estimates the local scale in a range sense on a set of
|
||||
/// user-defined query points. The computed scales correspond to the
|
||||
/// smallest scales such that the subsets of points included in the
|
||||
/// sphere range have the appearance of a surface in 3D or the
|
||||
/// appearance of a curve in 2D (see \ref Point_set_processing_3Scale).
|
||||
///
|
||||
///
|
||||
/// @tparam SamplesInputIterator iterator over input sample points.
|
||||
/// @tparam SamplesPointMap is a model of `ReadablePropertyMap` with
|
||||
/// value type `Point_3<Kernel>` or `Point_2<Kernel>`. It can
|
||||
/// be omitted if the value type of `SamplesInputIterator` is
|
||||
/// convertible to `Point_3<Kernel>` or to `Point_2<Kernel>`.
|
||||
/// @tparam QueriesInputIterator iterator over points where scale
|
||||
/// should be computed.
|
||||
/// @tparam QueriesInputIterator is a model of `ReadablePropertyMap`
|
||||
/// with value type `Point_3<Kernel>` or `Point_2<Kernel>`. It
|
||||
/// can be omitted if the value type of `QueriesInputIterator` is
|
||||
/// convertible to `Point_3<Kernel>` or to `Point_2<Kernel>`.
|
||||
/// @tparam OutputIterator is used to store the computed scales. It accepts
|
||||
/// values of type `Kernel::FT`.
|
||||
/// @tparam Kernel Geometric traits class. It can be omitted and
|
||||
/// deduced automatically from the value type of `SamplesPointMap`.
|
||||
///
|
||||
/// @note This function accepts both 2D and 3D points, but sample
|
||||
/// points and query must have the same dimension.
|
||||
|
||||
// This variant requires all parameters.
|
||||
// deprecated API
|
||||
template <typename SamplesInputIterator,
|
||||
typename SamplesPointMap,
|
||||
typename QueriesInputIterator,
|
||||
|
|
@ -899,6 +877,7 @@ estimate_local_range_scales(
|
|||
geom_traits (Kernel()));
|
||||
}
|
||||
|
||||
// deprecated API
|
||||
template <typename SamplesInputIterator,
|
||||
typename SamplesPointMap,
|
||||
typename QueriesInputIterator,
|
||||
|
|
@ -924,7 +903,7 @@ estimate_local_range_scales(
|
|||
query_point_map (queries_map));
|
||||
}
|
||||
|
||||
|
||||
// deprecated API
|
||||
template <typename SamplesInputIterator,
|
||||
typename QueriesInputIterator,
|
||||
typename OutputIterator
|
||||
|
|
@ -945,24 +924,7 @@ estimate_local_range_scales(
|
|||
}
|
||||
|
||||
|
||||
/// Estimates the global scale in a range sense. The computed scale
|
||||
/// corresponds to the smallest scale such that the subsets of points
|
||||
/// inside the sphere range have the appearance of a surface in 3D or
|
||||
/// the appearance of a curve in 2D (see \ref Point_set_processing_3Scale).
|
||||
///
|
||||
///
|
||||
/// @tparam InputIterator iterator over input points.
|
||||
/// @tparam PointMap is a model of `ReadablePropertyMap` with
|
||||
/// value type `Point_3<Kernel>` or `Point_2<Kernel>`. It can
|
||||
/// be omitted if the value type of `InputIterator` is
|
||||
/// convertible to `Point_3<Kernel>` or to `Point_2<Kernel>`.
|
||||
/// @tparam Kernel Geometric traits class. It can be omitted and
|
||||
/// deduced automatically from the value type of `PointMap`.
|
||||
///
|
||||
/// @note This function accepts both 2D and 3D points.
|
||||
///
|
||||
/// @return The estimated scale in the range sense.
|
||||
// This variant requires all parameters.
|
||||
// deprecated API
|
||||
template <typename InputIterator,
|
||||
typename PointMap,
|
||||
typename Kernel
|
||||
|
|
@ -981,6 +943,7 @@ estimate_global_range_scale(
|
|||
geom_traits (kernel));
|
||||
}
|
||||
|
||||
// deprecated API
|
||||
template <typename InputIterator,
|
||||
typename PointMap
|
||||
>
|
||||
|
|
@ -997,7 +960,7 @@ estimate_global_range_scale(
|
|||
}
|
||||
|
||||
|
||||
|
||||
// deprecated API
|
||||
template <typename InputIterator>
|
||||
double
|
||||
estimate_global_range_scale(
|
||||
|
|
|
|||
|
|
@ -128,11 +128,6 @@ public:
|
|||
} /* namespace internal */
|
||||
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Public section
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
|
||||
/// Utility class for grid_simplify_point_set():
|
||||
/// 3D points set which allows at most 1 point per cell
|
||||
/// of a grid of cell size = epsilon.
|
||||
|
|
@ -168,29 +163,40 @@ public:
|
|||
|
||||
/// \endcond
|
||||
|
||||
/// \ingroup PkgPointSetProcessingAlgorithms
|
||||
/// Merges points which belong to the same cell of a grid of cell size = `epsilon`.
|
||||
///
|
||||
/// This method modifies the order of input points so as to pack all remaining points first,
|
||||
/// and returns an iterator over the first point to remove (see erase-remove idiom).
|
||||
/// For this reason it should not be called on sorted containers.
|
||||
///
|
||||
/// \pre `epsilon > 0`
|
||||
///
|
||||
/// @tparam ForwardIterator iterator over input points.
|
||||
/// @tparam PointMap is a model of `ReadablePropertyMap` with value type `Point_3<Kernel>`.
|
||||
/// It can be omitted if the value type of `ForwardIterator` is convertible to `Point_3<Kernel>`.
|
||||
/// @tparam Kernel Geometric traits class.
|
||||
/// It can be omitted and deduced automatically from the value type of `PointMap`.
|
||||
///
|
||||
/// @return iterator over the first point to remove.
|
||||
// ----------------------------------------------------------------------------
|
||||
// Public section
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
// This variant requires all parameters.
|
||||
/**
|
||||
\ingroup PkgPointSetProcessingAlgorithms
|
||||
Merges points which belong to the same cell of a grid of cell size = `epsilon`.
|
||||
|
||||
This method modifies the order of input points so as to pack all remaining points first,
|
||||
and returns an iterator over the first point to remove (see erase-remove idiom).
|
||||
For this reason it should not be called on sorted containers.
|
||||
|
||||
\pre `epsilon > 0`
|
||||
|
||||
\tparam PointRange is a model of `Range`. The value type of
|
||||
its iterator is the key type of the named parameter `point_map`.
|
||||
|
||||
\param points input point range.
|
||||
\param epsilon tolerance value when merging 3D points.
|
||||
\param np optional sequence of \ref psp_namedparameters "Named Parameters" among the ones listed below.
|
||||
|
||||
\cgalNamedParamsBegin
|
||||
\cgalParamBegin{point_map} a model of `ReadWritePropertyMap` with value type `geom_traits::Point_3`.
|
||||
If this parameter is omitted, `CGAL::Identity_property_map<geom_traits::Point_3>` is used.\cgalParamEnd
|
||||
\cgalParamBegin{geom_traits} an instance of a geometric traits class, model of `Kernel`\cgalParamEnd
|
||||
\cgalNamedParamsEnd
|
||||
|
||||
\return iterator over the first point to remove.
|
||||
*/
|
||||
template <typename PointRange, typename NamedParameters>
|
||||
typename PointRange::iterator
|
||||
grid_simplify_point_set(
|
||||
PointRange& points,
|
||||
double epsilon, ///< tolerance value when merging 3D points.
|
||||
double epsilon,
|
||||
const NamedParameters& np)
|
||||
{
|
||||
using boost::choose_param;
|
||||
|
|
@ -223,6 +229,8 @@ grid_simplify_point_set(
|
|||
return first_point_to_remove;
|
||||
}
|
||||
|
||||
/// \cond SKIP_IN_MANUAL
|
||||
// variant with default NP
|
||||
template <typename PointRange>
|
||||
typename PointRange::iterator
|
||||
grid_simplify_point_set(PointRange& points, double epsilon)
|
||||
|
|
@ -231,23 +239,7 @@ grid_simplify_point_set(PointRange& points, double epsilon)
|
|||
(points, epsilon, CGAL::Point_set_processing_3::parameters::all_default(points));
|
||||
}
|
||||
|
||||
/// Merges points which belong to the same cell of a grid of cell size = `epsilon`.
|
||||
///
|
||||
/// This method modifies the order of input points so as to pack all remaining points first,
|
||||
/// and returns an iterator over the first point to remove (see erase-remove idiom).
|
||||
/// For this reason it should not be called on sorted containers.
|
||||
///
|
||||
/// \pre `epsilon > 0`
|
||||
///
|
||||
/// @tparam ForwardIterator iterator over input points.
|
||||
/// @tparam PointMap is a model of `ReadablePropertyMap` with value type `Point_3<Kernel>`.
|
||||
/// It can be omitted if the value type of `ForwardIterator` is convertible to `Point_3<Kernel>`.
|
||||
/// @tparam Kernel Geometric traits class.
|
||||
/// It can be omitted and deduced automatically from the value type of `PointMap`.
|
||||
///
|
||||
/// @return iterator over the first point to remove.
|
||||
|
||||
// This variant requires all parameters.
|
||||
// deprecated API
|
||||
template <typename ForwardIterator,
|
||||
typename PointMap,
|
||||
typename Kernel>
|
||||
|
|
@ -267,8 +259,8 @@ ForwardIterator grid_simplify_point_set(
|
|||
geom_traits (Kernel()));
|
||||
}
|
||||
|
||||
/// @cond SKIP_IN_MANUAL
|
||||
// This variant deduces the kernel from the iterator type.
|
||||
|
||||
// deprecated API
|
||||
template <typename ForwardIterator,
|
||||
typename PointMap
|
||||
>
|
||||
|
|
@ -286,10 +278,8 @@ grid_simplify_point_set(
|
|||
epsilon,
|
||||
CGAL::parameters::point_map (point_map));
|
||||
}
|
||||
/// @endcond
|
||||
|
||||
/// @cond SKIP_IN_MANUAL
|
||||
// This variant creates a default point property map = Identity_property_map.
|
||||
// deprecated API
|
||||
template <typename ForwardIterator
|
||||
>
|
||||
ForwardIterator
|
||||
|
|
@ -304,7 +294,7 @@ grid_simplify_point_set(
|
|||
(points,
|
||||
epsilon);
|
||||
}
|
||||
/// @endcond
|
||||
/// \endcond
|
||||
|
||||
|
||||
} //namespace CGAL
|
||||
|
|
|
|||
|
|
@ -45,6 +45,7 @@
|
|||
namespace CGAL {
|
||||
|
||||
|
||||
/// \cond SKIP_IN_MANUAL
|
||||
namespace internal {
|
||||
|
||||
template < typename InputIterator,
|
||||
|
|
@ -109,37 +110,42 @@ namespace CGAL {
|
|||
|
||||
|
||||
} // namespace internal
|
||||
/// \endcond
|
||||
|
||||
/**
|
||||
\ingroup PkgPointSetProcessingAlgorithms
|
||||
|
||||
/// \ingroup PkgPointSetProcessingAlgorithms
|
||||
Recursively split the point set in smaller clusters until the
|
||||
clusters have less than `size` elements or until their variation
|
||||
factor is below `var_max`.
|
||||
|
||||
/// Recursively split the point set in smaller clusters until the
|
||||
/// clusters have less than `size` elements or until their variation
|
||||
/// factor is below `var_max`.
|
||||
///
|
||||
/// This method modifies the order of input points so as to pack all remaining points first,
|
||||
/// and returns an iterator over the first point to remove (see erase-remove idiom).
|
||||
/// For this reason it should not be called on sorted containers.
|
||||
///
|
||||
/// \pre `0 < var_max < 1/3`
|
||||
/// \pre `size > 0`
|
||||
///
|
||||
/// @tparam ForwardIterator iterator over input points.
|
||||
/// @tparam PointMap is a model of `ReadablePropertyMap` with value type `Point_3<Kernel>`.
|
||||
/// It can be omitted if the value type of `ForwardIterator` is convertible to `Point_3<Kernel>`.
|
||||
/// @tparam DiagonalizeTraits is a model of `DiagonalizeTraits`. It
|
||||
/// can be omitted: if Eigen 3 (or greater) is available and
|
||||
/// `CGAL_EIGEN3_ENABLED` is defined then an overload using
|
||||
/// `Eigen_diagonalize_traits` is provided. Otherwise, the internal
|
||||
/// implementation `Internal_diagonalize_traits` is used.
|
||||
/// @tparam Kernel Geometric traits class.
|
||||
/// It can be omitted and deduced automatically from the value type of `PointMap`.
|
||||
///
|
||||
/// @return iterator over the first point to remove.
|
||||
This method modifies the order of input points so as to pack all remaining points first,
|
||||
and returns an iterator over the first point to remove (see erase-remove idiom).
|
||||
For this reason it should not be called on sorted containers.
|
||||
|
||||
\pre `0 < maximum_variation < 1/3`
|
||||
\pre `size > 0`
|
||||
|
||||
// This variant requires all parameters.
|
||||
\tparam PointRange is a model of `Range`. The value type of
|
||||
its iterator is the key type of the named parameter `point_map`.
|
||||
|
||||
\param points input point range.
|
||||
\param np optional sequence of \ref psp_namedparameters "Named Parameters" among the ones listed below.
|
||||
|
||||
\cgalNamedParamsBegin
|
||||
\cgalParamBegin{point_map} a model of `ReadWritePropertyMap` with value type `geom_traits::Point_3`.
|
||||
If this parameter is omitted, `CGAL::Identity_property_map<geom_traits::Point_3>` is used.\cgalParamEnd
|
||||
\cgalParamBegin{size} maximum cluster size.\cgalParamEnd
|
||||
\cgalParamBegin{maximum_variation} maximum cluster variation value.\cgalParamEnd
|
||||
\cgalParamBegin{diagonalize_traits} a model of `DiagonalizeTraits`. It can be omitted:
|
||||
if Eigen 3 (or greater) is available and `CGAL_EIGEN3_ENABLED` is defined then an overload
|
||||
using `Eigen_diagonalize_traits` is provided. Otherwise, the internal implementation
|
||||
`CGAL::Diagonalize_traits` is used.\cgalParamEnd
|
||||
\cgalParamBegin{geom_traits} an instance of a geometric traits class, model of `Kernel`\cgalParamEnd
|
||||
\cgalNamedParamsEnd
|
||||
|
||||
\return iterator over the first point to remove.
|
||||
*/
|
||||
template <typename PointRange,
|
||||
typename NamedParameters>
|
||||
typename PointRange::iterator
|
||||
|
|
@ -320,8 +326,10 @@ namespace CGAL {
|
|||
return first_point_to_remove;
|
||||
|
||||
}
|
||||
/// @endcond
|
||||
|
||||
|
||||
/// \cond SKIP_IN_MANUAL
|
||||
// variant with default NP
|
||||
template <typename PointRange>
|
||||
typename PointRange::iterator
|
||||
hierarchy_simplify_point_set (PointRange& points)
|
||||
|
|
@ -330,33 +338,7 @@ namespace CGAL {
|
|||
(points, CGAL::Point_set_processing_3::parameters::all_default(points));
|
||||
}
|
||||
|
||||
/// Recursively split the point set in smaller clusters until the
|
||||
/// clusters have less than `size` elements or until their variation
|
||||
/// factor is below `var_max`.
|
||||
///
|
||||
/// This method modifies the order of input points so as to pack all remaining points first,
|
||||
/// and returns an iterator over the first point to remove (see erase-remove idiom).
|
||||
/// For this reason it should not be called on sorted containers.
|
||||
///
|
||||
/// \pre `0 < var_max < 1/3`
|
||||
/// \pre `size > 0`
|
||||
///
|
||||
/// @tparam ForwardIterator iterator over input points.
|
||||
/// @tparam PointMap is a model of `ReadablePropertyMap` with value type `Point_3<Kernel>`.
|
||||
/// It can be omitted if the value type of `ForwardIterator` is convertible to `Point_3<Kernel>`.
|
||||
/// @tparam DiagonalizeTraits is a model of `DiagonalizeTraits`. It
|
||||
/// can be omitted: if Eigen 3 (or greater) is available and
|
||||
/// `CGAL_EIGEN3_ENABLED` is defined then an overload using
|
||||
/// `Eigen_diagonalize_traits` is provided. Otherwise, the internal
|
||||
/// implementation `Internal_diagonalize_traits` is used.
|
||||
/// @tparam Kernel Geometric traits class.
|
||||
/// It can be omitted and deduced automatically from the value type of `PointMap`.
|
||||
///
|
||||
/// @return iterator over the first point to remove.
|
||||
|
||||
|
||||
// This variant requires all parameters.
|
||||
|
||||
// deprecated API
|
||||
template <typename ForwardIterator,
|
||||
typename PointMap,
|
||||
typename DiagonalizeTraits,
|
||||
|
|
@ -380,8 +362,7 @@ namespace CGAL {
|
|||
geom_traits(Kernel()));
|
||||
}
|
||||
|
||||
/// @cond SKIP_IN_MANUAL
|
||||
// This variant deduces the kernel from the iterator type.
|
||||
// deprecated API
|
||||
template <typename ForwardIterator,
|
||||
typename PointMap,
|
||||
typename DiagonalizeTraits>
|
||||
|
|
@ -401,10 +382,8 @@ namespace CGAL {
|
|||
maximum_variation (var_max).
|
||||
diagonalize_traits (diagonalize_traits));
|
||||
}
|
||||
/// @endcond
|
||||
|
||||
/// @cond SKIP_IN_MANUAL
|
||||
// This variant uses default diagonalize traits
|
||||
// deprecated API
|
||||
template <typename ForwardIterator,
|
||||
typename PointMap >
|
||||
ForwardIterator hierarchy_simplify_point_set (ForwardIterator begin,
|
||||
|
|
@ -421,10 +400,8 @@ namespace CGAL {
|
|||
size (size).
|
||||
maximum_variation (var_max));
|
||||
}
|
||||
/// @endcond
|
||||
|
||||
/// @cond SKIP_IN_MANUAL
|
||||
// This variant creates a default point property map = Identity_property_map.
|
||||
// deprecated API
|
||||
template <typename ForwardIterator >
|
||||
ForwardIterator hierarchy_simplify_point_set (ForwardIterator begin,
|
||||
ForwardIterator end,
|
||||
|
|
@ -438,7 +415,7 @@ namespace CGAL {
|
|||
CGAL::parameters::size (size).
|
||||
maximum_variation (var_max));
|
||||
}
|
||||
/// @endcond
|
||||
/// \endcond
|
||||
|
||||
} // namespace CGAL
|
||||
|
||||
|
|
|
|||
|
|
@ -151,26 +151,36 @@ jet_estimate_normal(const typename Kernel::Point_3& query, ///< point to compute
|
|||
// Public section
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
/// \ingroup PkgPointSetProcessingAlgorithms
|
||||
/// Estimates normal directions of the `[first, beyond)` range of points
|
||||
/// using jet fitting on the k nearest neighbors.
|
||||
/// The output normals are randomly oriented.
|
||||
///
|
||||
/// \pre `k >= 2`
|
||||
///
|
||||
/// @tparam ConcurrencyTag enables sequential versus parallel algorithm.
|
||||
/// Possible values are `Sequential_tag`
|
||||
/// and `Parallel_tag`.
|
||||
/// @tparam ForwardIterator iterator model of the concept of the same name over input points and able to store output normals.
|
||||
/// @tparam PointMap is a model of `ReadablePropertyMap` with value type `Point_3<Kernel>`.
|
||||
/// It can be omitted if the value type of `ForwardIterator` is convertible to `Point_3<Kernel>`.
|
||||
/// @tparam NormalMap is a model of `WritablePropertyMap` with value type `Vector_3<Kernel>`.
|
||||
/// @tparam Kernel Geometric traits class.
|
||||
/// It can be omitted and deduced automatically from the value type of `PointMap`.
|
||||
/// @tparam SvdTraits template parameter for the class `Monge_via_jet_fitting` that
|
||||
/// can be ommited under conditions described in the documentation of `Monge_via_jet_fitting`.
|
||||
/**
|
||||
\ingroup PkgPointSetProcessingAlgorithms
|
||||
Estimates normal directions of the range of `points`
|
||||
using jet fitting on the k nearest neighbors.
|
||||
The output normals are randomly oriented.
|
||||
|
||||
// This variant requires all parameters.
|
||||
\pre `k >= 2`
|
||||
|
||||
\tparam ConcurrencyTag enables sequential versus parallel algorithm.
|
||||
Possible values are `Sequential_tag`
|
||||
and `Parallel_tag`.
|
||||
\tparam PointRange is a model of `Range`. The value type of
|
||||
its iterator is the key type of the named parameter `point_map`.
|
||||
|
||||
\param points input point range.
|
||||
\param k number of neighbors
|
||||
\param np optional sequence of \ref psp_namedparameters "Named Parameters" among the ones listed below.
|
||||
|
||||
\cgalNamedParamsBegin
|
||||
\cgalParamBegin{point_map} a model of `ReadablePropertyMap` with value type `geom_traits::Point_3`.
|
||||
If this parameter is omitted, `CGAL::Identity_property_map<geom_traits::Point_3>` is used.\cgalParamEnd
|
||||
\cgalParamBegin{normal_map} a model of `ReadWritePropertyMap` with value type
|
||||
`geom_traits::Vector_3`.\cgalParamEnd
|
||||
\cgalParamBegin{degree_fitting} degree of jet fitting.\cgalParamEnd
|
||||
\cgalParamBegin{svd_traits} template parameter for the class `Monge_via_jet_fitting`. If
|
||||
\ref thirdpartyEigen "Eigen" 3.2 (or greater) is available and `CGAL_EIGEN3_ENABLED` is defined,
|
||||
then `CGAL::Eigen_svd` is used.\cgalParamEnd
|
||||
\cgalParamBegin{geom_traits} an instance of a geometric traits class, model of `Kernel`\cgalParamEnd
|
||||
\cgalNamedParamsEnd
|
||||
*/
|
||||
template <typename ConcurrencyTag,
|
||||
typename PointRange,
|
||||
typename NamedParameters
|
||||
|
|
@ -178,7 +188,7 @@ template <typename ConcurrencyTag,
|
|||
void
|
||||
jet_estimate_normals(
|
||||
PointRange& points,
|
||||
unsigned int k, ///< number of neighbors.
|
||||
unsigned int k,
|
||||
const NamedParameters& np)
|
||||
{
|
||||
using boost::choose_param;
|
||||
|
|
@ -272,6 +282,9 @@ jet_estimate_normals(
|
|||
CGAL_TRACE("End of jet_estimate_normals()\n");
|
||||
}
|
||||
|
||||
|
||||
/// \cond SKIP_IN_MANUAL
|
||||
// variant with default NP
|
||||
template <typename ConcurrencyTag,
|
||||
typename PointRange>
|
||||
void
|
||||
|
|
@ -283,26 +296,7 @@ jet_estimate_normals(
|
|||
(points, k, CGAL::Point_set_processing_3::parameters::all_default(points));
|
||||
}
|
||||
|
||||
/// \ingroup PkgPointSetProcessingAlgorithms
|
||||
/// Estimates normal directions of the `[first, beyond)` range of points
|
||||
/// using jet fitting on the k nearest neighbors.
|
||||
/// The output normals are randomly oriented.
|
||||
///
|
||||
/// \pre `k >= 2`
|
||||
///
|
||||
/// @tparam ConcurrencyTag enables sequential versus parallel algorithm.
|
||||
/// Possible values are `Sequential_tag`
|
||||
/// and `Parallel_tag`.
|
||||
/// @tparam ForwardIterator iterator model of the concept of the same name over input points and able to store output normals.
|
||||
/// @tparam PointMap is a model of `ReadablePropertyMap` with value type `Point_3<Kernel>`.
|
||||
/// It can be omitted if the value type of `ForwardIterator` is convertible to `Point_3<Kernel>`.
|
||||
/// @tparam NormalMap is a model of `WritablePropertyMap` with value type `Vector_3<Kernel>`.
|
||||
/// @tparam Kernel Geometric traits class.
|
||||
/// It can be omitted and deduced automatically from the value type of `PointMap`.
|
||||
/// @tparam SvdTraits template parameter for the class `Monge_via_jet_fitting` that
|
||||
/// can be ommited under conditions described in the documentation of `Monge_via_jet_fitting`.
|
||||
|
||||
// This variant requires all parameters.
|
||||
// deprecated API
|
||||
template <typename ConcurrencyTag,
|
||||
typename ForwardIterator,
|
||||
typename PointMap,
|
||||
|
|
@ -332,7 +326,7 @@ jet_estimate_normals(
|
|||
}
|
||||
|
||||
#if defined(CGAL_EIGEN3_ENABLED) || defined(CGAL_LAPACK_ENABLED)
|
||||
/// @cond SKIP_IN_MANUAL
|
||||
// deprecated API
|
||||
template <typename ConcurrencyTag,
|
||||
typename ForwardIterator,
|
||||
typename PointMap,
|
||||
|
|
@ -367,8 +361,7 @@ jet_estimate_normals(
|
|||
geom_traits(kernel));
|
||||
}
|
||||
|
||||
/// @cond SKIP_IN_MANUAL
|
||||
// This variant deduces the kernel from the point property map.
|
||||
// deprecated API
|
||||
template <typename ConcurrencyTag,
|
||||
typename ForwardIterator,
|
||||
typename PointMap,
|
||||
|
|
@ -392,10 +385,8 @@ jet_estimate_normals(
|
|||
normal_map (normal_map).
|
||||
degree_fitting (degree_fitting));
|
||||
}
|
||||
/// @endcond
|
||||
|
||||
/// @cond SKIP_IN_MANUAL
|
||||
// This variant creates a default point property map = Identity_property_map.
|
||||
// deprecated API
|
||||
template <typename ConcurrencyTag,
|
||||
typename ForwardIterator,
|
||||
typename NormalMap
|
||||
|
|
@ -416,8 +407,8 @@ jet_estimate_normals(
|
|||
CGAL::parameters::normal_map (normal_map).
|
||||
degree_fitting (degree_fitting));
|
||||
}
|
||||
/// @endcond
|
||||
#endif
|
||||
/// \endcond
|
||||
|
||||
} //namespace CGAL
|
||||
|
||||
|
|
|
|||
|
|
@ -154,26 +154,37 @@ jet_smooth_point(
|
|||
// Public section
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
/// \ingroup PkgPointSetProcessingAlgorithms
|
||||
/// Smoothes the `[first, beyond)` range of points using jet fitting on the k
|
||||
/// nearest neighbors and reprojection onto the jet.
|
||||
/// As this method relocates the points, it
|
||||
/// should not be called on containers sorted w.r.t. point locations.
|
||||
///
|
||||
/// \pre `k >= 2`
|
||||
///
|
||||
/// @tparam ConcurrencyTag enables sequential versus parallel algorithm.
|
||||
/// Possible values are `Sequential_tag`
|
||||
/// and `Parallel_tag`.
|
||||
/// @tparam InputIterator iterator over input points.
|
||||
/// @tparam PointMap is a model of `ReadWritePropertyMap` with value type `Point_3<Kernel>`.
|
||||
/// It can be omitted if the value type of `InputIterator` is convertible to `Point_3<Kernel>`.
|
||||
/// @tparam Kernel Geometric traits class.
|
||||
/// It can be omitted and deduced automatically from the value type of `PointMap`.
|
||||
/// @tparam SvdTraits template parameter for the class `Monge_via_jet_fitting` that
|
||||
/// can be ommited under conditions described in the documentation of `Monge_via_jet_fitting`.
|
||||
/**
|
||||
\ingroup PkgPointSetProcessingAlgorithms
|
||||
Smoothes the range of `points` using jet fitting on the k
|
||||
nearest neighbors and reprojection onto the jet.
|
||||
As this method relocates the points, it
|
||||
should not be called on containers sorted w.r.t. point locations.
|
||||
|
||||
// This variant requires all parameters.
|
||||
\pre `k >= 2`
|
||||
|
||||
\tparam ConcurrencyTag enables sequential versus parallel algorithm.
|
||||
Possible values are `Sequential_tag`
|
||||
and `Parallel_tag`.
|
||||
\tparam PointRange is a model of `Range`. The value type of
|
||||
its iterator is the key type of the named parameter `point_map`.
|
||||
|
||||
\param points input point range.
|
||||
\param k number of neighbors
|
||||
\param np optional sequence of \ref psp_namedparameters "Named Parameters" among the ones listed below.
|
||||
|
||||
\cgalNamedParamsBegin
|
||||
\cgalParamBegin{point_map} a model of `ReadablePropertyMap` with value type `geom_traits::Point_3`.
|
||||
If this parameter is omitted, `CGAL::Identity_property_map<geom_traits::Point_3>` is used.\cgalParamEnd
|
||||
\cgalParamBegin{degree_fitting} degree of jet fitting.\cgalParamEnd
|
||||
\cgalParamBegin{degree_monge} Monge degree.\cgalParamEnd
|
||||
\cgalParamBegin{svd_traits} template parameter for the class `Monge_via_jet_fitting`. If
|
||||
\ref thirdpartyEigen "Eigen" 3.2 (or greater) is available and `CGAL_EIGEN3_ENABLED` is defined,
|
||||
then `CGAL::Eigen_svd` is used.\cgalParamEnd
|
||||
\cgalParamBegin{geom_traits} an instance of a geometric traits class, model of `Kernel`\cgalParamEnd
|
||||
\cgalNamedParamsEnd
|
||||
|
||||
*/
|
||||
template <typename ConcurrencyTag,
|
||||
typename PointRange,
|
||||
typename NamedParameters
|
||||
|
|
@ -181,7 +192,7 @@ template <typename ConcurrencyTag,
|
|||
void
|
||||
jet_smooth_point_set(
|
||||
PointRange& points,
|
||||
unsigned int k, ///< number of neighbors.
|
||||
unsigned int k,
|
||||
const NamedParameters& np)
|
||||
{
|
||||
using boost::choose_param;
|
||||
|
|
@ -257,6 +268,9 @@ jet_smooth_point_set(
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
/// \cond SKIP_IN_MANUAL
|
||||
// variant with default NP
|
||||
template <typename ConcurrencyTag,
|
||||
typename PointRange>
|
||||
void
|
||||
|
|
@ -269,25 +283,7 @@ jet_smooth_point_set(
|
|||
}
|
||||
|
||||
|
||||
/// Smoothes the `[first, beyond)` range of points using jet fitting on the k
|
||||
/// nearest neighbors and reprojection onto the jet.
|
||||
/// As this method relocates the points, it
|
||||
/// should not be called on containers sorted w.r.t. point locations.
|
||||
///
|
||||
/// \pre `k >= 2`
|
||||
///
|
||||
/// @tparam ConcurrencyTag enables sequential versus parallel algorithm.
|
||||
/// Possible values are `Sequential_tag`
|
||||
/// and `Parallel_tag`.
|
||||
/// @tparam InputIterator iterator over input points.
|
||||
/// @tparam PointMap is a model of `ReadWritePropertyMap` with value type `Point_3<Kernel>`.
|
||||
/// It can be omitted if the value type of `InputIterator` is convertible to `Point_3<Kernel>`.
|
||||
/// @tparam Kernel Geometric traits class.
|
||||
/// It can be omitted and deduced automatically from the value type of `PointMap`.
|
||||
/// @tparam SvdTraits template parameter for the class `Monge_via_jet_fitting` that
|
||||
/// can be ommited under conditions described in the documentation of `Monge_via_jet_fitting`.
|
||||
|
||||
// This variant requires all parameters.
|
||||
// deprecated API
|
||||
template <typename ConcurrencyTag,
|
||||
typename InputIterator,
|
||||
typename PointMap,
|
||||
|
|
@ -316,7 +312,7 @@ jet_smooth_point_set(
|
|||
}
|
||||
|
||||
#if defined(CGAL_EIGEN3_ENABLED) || defined(CGAL_LAPACK_ENABLED)
|
||||
/// @cond SKIP_IN_MANUAL
|
||||
// deprecated API
|
||||
template <typename ConcurrencyTag,
|
||||
typename InputIterator,
|
||||
typename PointMap,
|
||||
|
|
@ -349,8 +345,7 @@ jet_smooth_point_set(
|
|||
geom_traits(kernel));
|
||||
}
|
||||
|
||||
/// @cond SKIP_IN_MANUAL
|
||||
// This variant deduces the kernel from the point property map.
|
||||
// deprecated API
|
||||
template <typename ConcurrencyTag,
|
||||
typename InputIterator,
|
||||
typename PointMap
|
||||
|
|
@ -373,10 +368,8 @@ jet_smooth_point_set(
|
|||
degree_fitting (degree_fitting).
|
||||
degree_monge (degree_monge));
|
||||
}
|
||||
/// @endcond
|
||||
|
||||
/// @cond SKIP_IN_MANUAL
|
||||
// This variant creates a default point property map = Identity_property_map.
|
||||
// deprecated API
|
||||
template <typename ConcurrencyTag,
|
||||
typename InputIterator
|
||||
>
|
||||
|
|
@ -396,8 +389,9 @@ jet_smooth_point_set(
|
|||
CGAL::parameters::degree_fitting (degree_fitting).
|
||||
degree_monge (degree_monge));
|
||||
}
|
||||
/// @endcond
|
||||
#endif
|
||||
/// \endcond
|
||||
|
||||
|
||||
} //namespace CGAL
|
||||
|
||||
|
|
|
|||
|
|
@ -497,36 +497,44 @@ create_mst_graph(
|
|||
// Public section
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
/// \ingroup PkgPointSetProcessingAlgorithms
|
||||
/// Orients the normals of the `[first, beyond)` range of points using the propagation
|
||||
/// of a seed orientation through a minimum spanning tree of the Riemannian graph [Hoppe92].
|
||||
///
|
||||
/// This method modifies the order of input points so as to pack all sucessfully oriented points first,
|
||||
/// and returns an iterator over the first point with an unoriented normal (see erase-remove idiom).
|
||||
/// For this reason it should not be called on sorted containers.
|
||||
/// \warning This function may fail when Boost version 1.54 is used,
|
||||
/// because of the following bug: https://svn.boost.org/trac/boost/ticket/9012
|
||||
///
|
||||
/// \pre Normals must be unit vectors
|
||||
/// \pre `k >= 2`
|
||||
///
|
||||
/// @tparam ForwardIterator iterator over input points.
|
||||
/// @tparam PointMap is a model of `ReadablePropertyMap` with value type `Point_3<Kernel>`.
|
||||
/// It can be omitted if the value type of `ForwardIterator` is convertible to `Point_3<Kernel>`.
|
||||
/// @tparam NormalMap is a model of `ReadWritePropertyMap` with value type `Vector_3<Kernel>` .
|
||||
/// @tparam Kernel Geometric traits class.
|
||||
/// It can be omitted and deduced automatically from the value type of `PointMap`.
|
||||
///
|
||||
/// @return iterator over the first point with an unoriented normal.
|
||||
/**
|
||||
\ingroup PkgPointSetProcessingAlgorithms
|
||||
Orients the normals of the range of `points` using the propagation
|
||||
of a seed orientation through a minimum spanning tree of the Riemannian graph [Hoppe92].
|
||||
|
||||
// This variant requires all parameters.
|
||||
This method modifies the order of input points so as to pack all sucessfully oriented points first,
|
||||
and returns an iterator over the first point with an unoriented normal (see erase-remove idiom).
|
||||
For this reason it should not be called on sorted containers.
|
||||
\warning This function may fail when Boost version 1.54 is used,
|
||||
because of the following bug: https://svn.boost.org/trac/boost/ticket/9012
|
||||
|
||||
\pre Normals must be unit vectors
|
||||
\pre `k >= 2`
|
||||
|
||||
\tparam PointRange is a model of `Range`. The value type of
|
||||
its iterator is the key type of the named parameter `point_map`.
|
||||
|
||||
\param points input point range.
|
||||
\param k number of neighbors.
|
||||
\param np optional sequence of \ref psp_namedparameters "Named Parameters" among the ones listed below.
|
||||
|
||||
\cgalNamedParamsBegin
|
||||
\cgalParamBegin{point_map} a model of `ReadablePropertyMap` with value type `geom_traits::Point_3`.
|
||||
If this parameter is omitted, `CGAL::Identity_property_map<geom_traits::Point_3>` is used.\cgalParamEnd
|
||||
\cgalParamBegin{normal_map} a model of `ReadWritePropertyMap` with value type
|
||||
`geom_traits::Vector_3`.\cgalParamEnd
|
||||
\cgalParamBegin{geom_traits} an instance of a geometric traits class, model of `Kernel`\cgalParamEnd
|
||||
\cgalNamedParamsEnd
|
||||
|
||||
\return iterator over the first point with an unoriented normal.
|
||||
*/
|
||||
template <typename PointRange,
|
||||
typename NamedParameters
|
||||
>
|
||||
typename PointRange::iterator
|
||||
mst_orient_normals(
|
||||
PointRange& points,
|
||||
unsigned int k, ///< number of neighbors
|
||||
unsigned int k,
|
||||
const NamedParameters& np)
|
||||
{
|
||||
using boost::choose_param;
|
||||
|
|
@ -635,6 +643,8 @@ mst_orient_normals(
|
|||
return first_unoriented_point;
|
||||
}
|
||||
|
||||
/// \cond SKIP_IN_MANUAL
|
||||
// variant with default NP
|
||||
template <typename PointRange,
|
||||
typename NamedParameters
|
||||
>
|
||||
|
|
@ -647,28 +657,7 @@ mst_orient_normals(
|
|||
return mst_orient_normals (points, k, CGAL::Point_set_processing_3::parameters::all_default(points));
|
||||
}
|
||||
|
||||
/// Orients the normals of the `[first, beyond)` range of points using the propagation
|
||||
/// of a seed orientation through a minimum spanning tree of the Riemannian graph [Hoppe92].
|
||||
///
|
||||
/// This method modifies the order of input points so as to pack all sucessfully oriented points first,
|
||||
/// and returns an iterator over the first point with an unoriented normal (see erase-remove idiom).
|
||||
/// For this reason it should not be called on sorted containers.
|
||||
/// \warning This function may fail when Boost version 1.54 is used,
|
||||
/// because of the following bug: https://svn.boost.org/trac/boost/ticket/9012
|
||||
///
|
||||
/// \pre Normals must be unit vectors
|
||||
/// \pre `k >= 2`
|
||||
///
|
||||
/// @tparam ForwardIterator iterator over input points.
|
||||
/// @tparam PointMap is a model of `ReadablePropertyMap` with value type `Point_3<Kernel>`.
|
||||
/// It can be omitted if the value type of `ForwardIterator` is convertible to `Point_3<Kernel>`.
|
||||
/// @tparam NormalMap is a model of `ReadWritePropertyMap` with value type `Vector_3<Kernel>` .
|
||||
/// @tparam Kernel Geometric traits class.
|
||||
/// It can be omitted and deduced automatically from the value type of `PointMap`.
|
||||
///
|
||||
/// @return iterator over the first point with an unoriented normal.
|
||||
|
||||
// This variant requires all parameters.
|
||||
// deprecated API
|
||||
template <typename ForwardIterator,
|
||||
typename PointMap,
|
||||
typename NormalMap,
|
||||
|
|
@ -693,8 +682,7 @@ mst_orient_normals(
|
|||
geom_traits(kernel));
|
||||
}
|
||||
|
||||
/// @cond SKIP_IN_MANUAL
|
||||
// This variant deduces the kernel from the point property map.
|
||||
// deprecated API
|
||||
template <typename ForwardIterator,
|
||||
typename PointMap,
|
||||
typename NormalMap
|
||||
|
|
@ -715,10 +703,8 @@ mst_orient_normals(
|
|||
CGAL::parameters::point_map (point_map).
|
||||
normal_map (normal_map));
|
||||
}
|
||||
/// @endcond
|
||||
|
||||
/// @cond SKIP_IN_MANUAL
|
||||
// This variant creates a default point property map = Identity_property_map.
|
||||
// deprecated API
|
||||
template <typename ForwardIterator,
|
||||
typename NormalMap
|
||||
>
|
||||
|
|
@ -736,7 +722,7 @@ mst_orient_normals(
|
|||
k,
|
||||
CGAL::parameters::normal_map (normal_map));
|
||||
}
|
||||
/// @endcond
|
||||
/// \endcond
|
||||
|
||||
|
||||
} //namespace CGAL
|
||||
|
|
|
|||
|
|
@ -142,24 +142,32 @@ pca_estimate_normal(const typename Kernel::Point_3& query, ///< point to compute
|
|||
// Public section
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
/// \ingroup PkgPointSetProcessingAlgorithms
|
||||
/// Estimates normal directions of the `[first, beyond)` range of points
|
||||
/// by linear least squares fitting of a plane over the k nearest neighbors.
|
||||
/// The output normals are randomly oriented.
|
||||
///
|
||||
/// \pre `k >= 2`
|
||||
///
|
||||
/// @tparam ConcurrencyTag enables sequential versus parallel algorithm.
|
||||
/// Possible values are `Sequential_tag`
|
||||
/// and `Parallel_tag`.
|
||||
/// @tparam ForwardIterator iterator over input points.
|
||||
/// @tparam PointMap is a model of `ReadablePropertyMap` with value type `Point_3<Kernel>`.
|
||||
/// It can be omitted if the value type of `ForwardIterator` is convertible to `Point_3<Kernel>`.
|
||||
/// @tparam NormalMap is a model of `WritablePropertyMap` with value type `Vector_3<Kernel>`.
|
||||
/// @tparam Kernel Geometric traits class.
|
||||
/// It can be omitted and deduced automatically from the value type of `PointMap`.
|
||||
/**
|
||||
\ingroup PkgPointSetProcessingAlgorithms
|
||||
Estimates normal directions of the range of `points`
|
||||
by linear least squares fitting of a plane over the k nearest neighbors.
|
||||
The output normals are randomly oriented.
|
||||
|
||||
// This variant requires all parameters.
|
||||
\pre `k >= 2`
|
||||
|
||||
\tparam ConcurrencyTag enables sequential versus parallel algorithm.
|
||||
Possible values are `Sequential_tag`
|
||||
and `Parallel_tag`.
|
||||
\tparam PointRange is a model of `Range`. The value type of
|
||||
its iterator is the key type of the named parameter `point_map`.
|
||||
|
||||
\param points input point range.
|
||||
\param k number of neighbors
|
||||
\param np optional sequence of \ref psp_namedparameters "Named Parameters" among the ones listed below.
|
||||
|
||||
\cgalNamedParamsBegin
|
||||
\cgalParamBegin{point_map} a model of `ReadablePropertyMap` with value type `geom_traits::Point_3`.
|
||||
If this parameter is omitted, `CGAL::Identity_property_map<geom_traits::Point_3>` is used.\cgalParamEnd
|
||||
\cgalParamBegin{normal_map} a model of `WritablePropertyMap` with value type
|
||||
`geom_traits::Vector_3`.\cgalParamEnd
|
||||
\cgalParamBegin{geom_traits} an instance of a geometric traits class, model of `Kernel`\cgalParamEnd
|
||||
\cgalNamedParamsEnd
|
||||
*/
|
||||
template <typename ConcurrencyTag,
|
||||
typename PointRange,
|
||||
typename NamedParameters
|
||||
|
|
@ -167,7 +175,7 @@ template <typename ConcurrencyTag,
|
|||
void
|
||||
pca_estimate_normals(
|
||||
PointRange& points,
|
||||
unsigned int k, ///< number of neighbors.
|
||||
unsigned int k,
|
||||
const NamedParameters& np)
|
||||
{
|
||||
using boost::choose_param;
|
||||
|
|
@ -254,6 +262,8 @@ pca_estimate_normals(
|
|||
CGAL_TRACE("End of pca_estimate_normals()\n");
|
||||
}
|
||||
|
||||
/// \cond SKIP_IN_MANUAL
|
||||
// variant with default NP
|
||||
template <typename ConcurrencyTag,
|
||||
typename PointRange
|
||||
>
|
||||
|
|
@ -266,23 +276,7 @@ pca_estimate_normals(
|
|||
(points, k, CGAL::Point_set_processing_3::parameters::all_default(points));
|
||||
}
|
||||
|
||||
/// Estimates normal directions of the `[first, beyond)` range of points
|
||||
/// by linear least squares fitting of a plane over the k nearest neighbors.
|
||||
/// The output normals are randomly oriented.
|
||||
///
|
||||
/// \pre `k >= 2`
|
||||
///
|
||||
/// @tparam ConcurrencyTag enables sequential versus parallel algorithm.
|
||||
/// Possible values are `Sequential_tag`
|
||||
/// and `Parallel_tag`.
|
||||
/// @tparam ForwardIterator iterator over input points.
|
||||
/// @tparam PointMap is a model of `ReadablePropertyMap` with value type `Point_3<Kernel>`.
|
||||
/// It can be omitted if the value type of `ForwardIterator` is convertible to `Point_3<Kernel>`.
|
||||
/// @tparam NormalMap is a model of `WritablePropertyMap` with value type `Vector_3<Kernel>`.
|
||||
/// @tparam Kernel Geometric traits class.
|
||||
/// It can be omitted and deduced automatically from the value type of `PointMap`.
|
||||
|
||||
// This variant requires all parameters.
|
||||
// deprecated API
|
||||
template <typename ConcurrencyTag,
|
||||
typename ForwardIterator,
|
||||
typename PointMap,
|
||||
|
|
@ -308,8 +302,7 @@ pca_estimate_normals(
|
|||
geom_traits(Kernel()));
|
||||
}
|
||||
|
||||
/// @cond SKIP_IN_MANUAL
|
||||
// This variant deduces the kernel from the point property map.
|
||||
// deprecated API
|
||||
template <typename ConcurrencyTag,
|
||||
typename ForwardIterator,
|
||||
typename PointMap,
|
||||
|
|
@ -331,10 +324,8 @@ pca_estimate_normals(
|
|||
CGAL::parameters::point_map (point_map).
|
||||
normal_map (normal_map));
|
||||
}
|
||||
/// @endcond
|
||||
|
||||
/// @cond SKIP_IN_MANUAL
|
||||
// This variant creates a default point property map = Identity_property_map.
|
||||
// deprecated API
|
||||
template <typename ConcurrencyTag,
|
||||
typename ForwardIterator,
|
||||
typename NormalMap
|
||||
|
|
@ -353,7 +344,7 @@ pca_estimate_normals(
|
|||
k,
|
||||
CGAL::parameters::normal_map (normal_map));
|
||||
}
|
||||
/// @endcond
|
||||
/// \endcond
|
||||
|
||||
|
||||
} //namespace CGAL
|
||||
|
|
|
|||
|
|
@ -39,27 +39,26 @@
|
|||
|
||||
namespace CGAL {
|
||||
|
||||
/// \ingroup PkgPointSetProcessingAlgorithms
|
||||
/// Randomly deletes a user-specified fraction of the input points.
|
||||
///
|
||||
/// This method modifies the order of input points so as to pack all remaining points first,
|
||||
/// and returns an iterator over the first point to remove (see erase-remove idiom).
|
||||
/// For this reason it should not be called on sorted containers.
|
||||
///
|
||||
/// @tparam ForwardIterator iterator over input points.
|
||||
/// @tparam PointMap is a model of `ReadablePropertyMap` with value type `Point_3<Kernel>`.
|
||||
/// It can be omitted if the value type of `ForwardIterator` is convertible to `Point_3<Kernel>`.
|
||||
/// @tparam Kernel Geometric traits class.
|
||||
/// It can be omitted and deduced automatically from the value type of `PointMap`.
|
||||
///
|
||||
/// @return iterator over the first point to remove.
|
||||
/**
|
||||
\ingroup PkgPointSetProcessingAlgorithms
|
||||
Randomly deletes a user-specified fraction of the input points.
|
||||
|
||||
// This variant requires all parameters.
|
||||
This method modifies the order of input points so as to pack all remaining points first,
|
||||
and returns an iterator over the first point to remove (see erase-remove idiom).
|
||||
For this reason it should not be called on sorted containers.
|
||||
|
||||
\tparam PointRange is a model of `Range`.
|
||||
|
||||
\param points input point range.
|
||||
\param removed_percentage percentage of points to remove.
|
||||
|
||||
\return iterator over the first point to remove.
|
||||
*/
|
||||
template <typename PointRange>
|
||||
typename PointRange::iterator
|
||||
random_simplify_point_set(
|
||||
PointRange& points,
|
||||
double removed_percentage) ///< percentage of points to remove.
|
||||
double removed_percentage)
|
||||
{
|
||||
CGAL_point_set_processing_precondition(removed_percentage >= 0 && removed_percentage <= 100);
|
||||
|
||||
|
|
@ -75,22 +74,8 @@ random_simplify_point_set(
|
|||
return first_point_to_remove;
|
||||
}
|
||||
|
||||
|
||||
/// Randomly deletes a user-specified fraction of the input points.
|
||||
///
|
||||
/// This method modifies the order of input points so as to pack all remaining points first,
|
||||
/// and returns an iterator over the first point to remove (see erase-remove idiom).
|
||||
/// For this reason it should not be called on sorted containers.
|
||||
///
|
||||
/// @tparam ForwardIterator iterator over input points.
|
||||
/// @tparam PointMap is a model of `ReadablePropertyMap` with value type `Point_3<Kernel>`.
|
||||
/// It can be omitted if the value type of `ForwardIterator` is convertible to `Point_3<Kernel>`.
|
||||
/// @tparam Kernel Geometric traits class.
|
||||
/// It can be omitted and deduced automatically from the value type of `PointMap`.
|
||||
///
|
||||
/// @return iterator over the first point to remove.
|
||||
|
||||
// This variant requires all parameters.
|
||||
/// \cond SKIP_IN_MANUAL
|
||||
// deprecated API
|
||||
template <typename ForwardIterator,
|
||||
typename PointMap,
|
||||
typename Kernel
|
||||
|
|
@ -109,8 +94,7 @@ random_simplify_point_set(
|
|||
}
|
||||
|
||||
|
||||
/// @cond SKIP_IN_MANUAL
|
||||
// This variant deduces the kernel from the iterator type.
|
||||
// deprecated API
|
||||
template <typename ForwardIterator,
|
||||
typename PointMap
|
||||
>
|
||||
|
|
@ -125,10 +109,8 @@ random_simplify_point_set(
|
|||
CGAL::Iterator_range<ForwardIterator> points (first, beyond);
|
||||
return random_simplify_point_set (points, removed_percentage);
|
||||
}
|
||||
/// @endcond
|
||||
|
||||
/// @cond SKIP_IN_MANUAL
|
||||
// This variant creates a default point property map = Identity_property_map.
|
||||
// deprecated API
|
||||
template <typename ForwardIterator
|
||||
>
|
||||
ForwardIterator
|
||||
|
|
@ -141,7 +123,7 @@ random_simplify_point_set(
|
|||
CGAL::Iterator_range<ForwardIterator> points (first, beyond);
|
||||
return random_simplify_point_set (points, removed_percentage);
|
||||
}
|
||||
/// @endcond
|
||||
/// \endcond
|
||||
|
||||
|
||||
} //namespace CGAL
|
||||
|
|
|
|||
|
|
@ -106,41 +106,51 @@ compute_avg_knn_sq_distance_3(
|
|||
// Public section
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
/// \ingroup PkgPointSetProcessingAlgorithms
|
||||
/// Removes outliers:
|
||||
/// - computes average squared distance to the K nearest neighbors,
|
||||
/// - and sorts the points in increasing order of average distance.
|
||||
///
|
||||
/// This method modifies the order of input points so as to pack all remaining points first,
|
||||
/// and returns an iterator over the first point to remove (see erase-remove idiom).
|
||||
/// For this reason it should not be called on sorted containers.
|
||||
///
|
||||
/// \pre `k >= 2`
|
||||
///
|
||||
/// @tparam InputIterator iterator over input points.
|
||||
/// @tparam PointMap is a model of `ReadablePropertyMap` with value type `Point_3<Kernel>`.
|
||||
/// It can be omitted ifthe value type of `InputIterator` is convertible to `Point_3<Kernel>`.
|
||||
/// @tparam Kernel Geometric traits class.
|
||||
/// It can be omitted and deduced automatically from the value type of `PointMap`.
|
||||
///
|
||||
/// @return iterator over the first point to remove.
|
||||
///
|
||||
/// @note There are two thresholds that can be used:
|
||||
/// `threshold_percent` and `threshold_distance`. This function
|
||||
/// returns the smallest number of outliers such that at least one of
|
||||
/// these threshold is fullfilled. This means that if
|
||||
/// `threshold_percent=100`, only `threshold_distance` is taken into
|
||||
/// account; if `threshold_distance=0` only `threshold_percent` is
|
||||
/// taken into account.
|
||||
/**
|
||||
\ingroup PkgPointSetProcessingAlgorithms
|
||||
Removes outliers:
|
||||
- computes average squared distance to the K nearest neighbors,
|
||||
- and sorts the points in increasing order of average distance.
|
||||
|
||||
// This variant requires all parameters.
|
||||
This method modifies the order of input points so as to pack all remaining points first,
|
||||
and returns an iterator over the first point to remove (see erase-remove idiom).
|
||||
For this reason it should not be called on sorted containers.
|
||||
|
||||
\pre `k >= 2`
|
||||
|
||||
\tparam PointRange is a model of `Range`. The value type of
|
||||
its iterator is the key type of the named parameter `point_map`.
|
||||
|
||||
\param points input point range.
|
||||
\param k number of neighbors
|
||||
\param np optional sequence of \ref psp_namedparameters "Named Parameters" among the ones listed below.
|
||||
|
||||
\cgalNamedParamsBegin
|
||||
\cgalParamBegin{point_map} a model of `ReadablePropertyMap` with value type `geom_traits::Point_3`.
|
||||
If this parameter is omitted, `CGAL::Identity_property_map<geom_traits::Point_3>` is used.\cgalParamEnd
|
||||
\cgalParamBegin{threshold_percent} maximum percentage of points to remove.\cgalParamEnd
|
||||
\cgalParamBegin{threshold_distance} minimum distance for a point to be considered as outlier
|
||||
(distance here is the square root of the average squared distance to K nearest neighbors).\cgalParamEnd
|
||||
\cgalParamBegin{geom_traits} an instance of a geometric traits class, model of `Kernel`\cgalParamEnd
|
||||
\cgalNamedParamsEnd
|
||||
|
||||
\return iterator over the first point to remove.
|
||||
|
||||
\note There are two thresholds that can be used:
|
||||
`threshold_percent` and `threshold_distance`. This function
|
||||
returns the smallest number of outliers such that at least one of
|
||||
these threshold is fullfilled. This means that if
|
||||
`threshold_percent=100`, only `threshold_distance` is taken into
|
||||
account; if `threshold_distance=0` only `threshold_percent` is
|
||||
taken into account.
|
||||
*/
|
||||
template <typename PointRange,
|
||||
typename NamedParameters
|
||||
>
|
||||
typename PointRange::iterator
|
||||
remove_outliers(
|
||||
PointRange& points,
|
||||
unsigned int k, ///< number of neighbors.
|
||||
unsigned int k,
|
||||
const NamedParameters& np)
|
||||
{
|
||||
using boost::choose_param;
|
||||
|
|
@ -215,6 +225,8 @@ remove_outliers(
|
|||
return first_point_to_remove;
|
||||
}
|
||||
|
||||
/// \cond SKIP_IN_MANUAL
|
||||
// variant with default NP
|
||||
template <typename PointRange>
|
||||
typename PointRange::iterator
|
||||
remove_outliers(
|
||||
|
|
@ -224,33 +236,7 @@ remove_outliers(
|
|||
return remove_outliers (points, k, CGAL::Point_set_processing_3::parameters::all_default(points));
|
||||
}
|
||||
|
||||
/// Removes outliers:
|
||||
/// - computes average squared distance to the K nearest neighbors,
|
||||
/// - and sorts the points in increasing order of average distance.
|
||||
///
|
||||
/// This method modifies the order of input points so as to pack all remaining points first,
|
||||
/// and returns an iterator over the first point to remove (see erase-remove idiom).
|
||||
/// For this reason it should not be called on sorted containers.
|
||||
///
|
||||
/// \pre `k >= 2`
|
||||
///
|
||||
/// @tparam InputIterator iterator over input points.
|
||||
/// @tparam PointMap is a model of `ReadablePropertyMap` with value type `Point_3<Kernel>`.
|
||||
/// It can be omitted ifthe value type of `InputIterator` is convertible to `Point_3<Kernel>`.
|
||||
/// @tparam Kernel Geometric traits class.
|
||||
/// It can be omitted and deduced automatically from the value type of `PointMap`.
|
||||
///
|
||||
/// @return iterator over the first point to remove.
|
||||
///
|
||||
/// @note There are two thresholds that can be used:
|
||||
/// `threshold_percent` and `threshold_distance`. This function
|
||||
/// returns the smallest number of outliers such that at least one of
|
||||
/// these threshold is fullfilled. This means that if
|
||||
/// `threshold_percent=100`, only `threshold_distance` is taken into
|
||||
/// account; if `threshold_distance=0` only `threshold_percent` is
|
||||
/// taken into account.
|
||||
|
||||
// This variant requires all parameters.
|
||||
// deprecated API
|
||||
template <typename InputIterator,
|
||||
typename PointMap,
|
||||
typename Kernel
|
||||
|
|
@ -279,8 +265,7 @@ remove_outliers(
|
|||
geom_traits(Kernel()));
|
||||
}
|
||||
|
||||
/// @cond SKIP_IN_MANUAL
|
||||
// This variant deduces the kernel from the iterator type.
|
||||
// deprecated API
|
||||
template <typename InputIterator,
|
||||
typename PointMap
|
||||
>
|
||||
|
|
@ -303,10 +288,8 @@ remove_outliers(
|
|||
threshold_percent (threshold_percent).
|
||||
threshold_distance (threshold_distance));
|
||||
}
|
||||
/// @endcond
|
||||
|
||||
/// @cond SKIP_IN_MANUAL
|
||||
// This variant creates a default point property map = Identity_property_map.
|
||||
// deprecated API
|
||||
template <typename InputIterator
|
||||
>
|
||||
InputIterator
|
||||
|
|
@ -326,7 +309,7 @@ remove_outliers(
|
|||
CGAL::parameters::threshold_percent (threshold_percent).
|
||||
threshold_distance (threshold_distance));
|
||||
}
|
||||
/// @endcond
|
||||
/// \endcond
|
||||
|
||||
|
||||
} //namespace CGAL
|
||||
|
|
|
|||
|
|
@ -1426,44 +1426,61 @@ private:
|
|||
// Public section
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
/// \ingroup PkgPointSetProcessingAlgorithms
|
||||
/**
|
||||
\ingroup PkgPointSetProcessingAlgorithms
|
||||
|
||||
/// This is an implementation of the Point Set Structuring algorithm. This
|
||||
/// algorithm takes advantage of a set of detected planes: it detects adjacency
|
||||
/// relationships between planes and resamples the detected planes, edges and
|
||||
/// corners to produce a structured point set.
|
||||
///
|
||||
/// The size parameter `epsilon` is used both for detecting adjacencies and for
|
||||
/// setting the sampling density of the structured point set.
|
||||
///
|
||||
/// For more details, please refer to \cgalCite{cgal:la-srpss-13}.
|
||||
///
|
||||
/// @tparam PointRange range of points, model of `ConstRange`
|
||||
/// @tparam PointMap is a model of `ReadablePropertyMap` with value type `Kernel::Point_3`.
|
||||
/// It can be omitted if the value type of the iterator of `PointRange` is convertible to `Point_3<Kernel>`.
|
||||
/// @tparam NormalMap is a model of `ReadablePropertyMap` with value type `Kernel::Vector_3`.
|
||||
/// @tparam PlaneRange range of planes, model of `ConstRange`
|
||||
/// @tparam PlaneMap is a model of `ReadablePropertyMap` with value type `Kernel::Plane_3`.
|
||||
/// It can be omitted if the value type of the iterator of `PlaneRange` is convertible to `Plane_3<Kernel>`.
|
||||
/// @tparam IndexMap is a model of `ReadablePropertyMap` with value type `std::size_t`.
|
||||
/// @tparam OutputIterator Type of the output iterator. The type of the objects
|
||||
/// put in it is `std::pair<Kernel::Point_3, Kernel::Vector_3>`. Note that the
|
||||
/// user may use a <A HREF="http://www.boost.org/libs/iterator/doc/function_output_iterator.html">function_output_iterator</A>
|
||||
/// to match specific needs.
|
||||
/// @tparam Kernel Geometric traits class.
|
||||
/// It can be omitted and deduced automatically from the value type of `PointMap`.
|
||||
This is an implementation of the Point Set Structuring algorithm. This
|
||||
algorithm takes advantage of a set of detected planes: it detects adjacency
|
||||
relationships between planes and resamples the detected planes, edges and
|
||||
corners to produce a structured point set.
|
||||
|
||||
// This variant requires all parameters
|
||||
The size parameter `epsilon` is used both for detecting adjacencies and for
|
||||
setting the sampling density of the structured point set.
|
||||
|
||||
For more details, please refer to \cgalCite{cgal:la-srpss-13}.
|
||||
|
||||
\tparam PointRange is a model of `ConstRange`. The value type of
|
||||
its iterator is the key type of the named parameter `point_map`.
|
||||
\tparam PlaneRange is a model of `ConstRange`. The value type of
|
||||
its iterator is the key type of the named parameter `plane_map`.
|
||||
\tparam OutputIterator Type of the output iterator. The type of the
|
||||
objects put in it is `std::pair<Kernel::Point_3, Kernel::Vector_3>`.
|
||||
Note that the user may use a
|
||||
<A HREF="http://www.boost.org/libs/iterator/doc/function_output_iterator.html">function_output_iterator</A>
|
||||
to match specific needs.
|
||||
|
||||
\param points input point range.
|
||||
\param planes input plane range.
|
||||
\param output output iterator where output points are written
|
||||
\param epsilon size parameters.
|
||||
\param np optional sequence of \ref psp_namedparameters "Named Parameters" among the ones listed below.
|
||||
|
||||
\cgalNamedParamsBegin
|
||||
\cgalParamBegin{point_map} a model of `ReadablePropertyMap` with value type `geom_traits::Point_3`.
|
||||
If this parameter is omitted, `CGAL::Identity_property_map<geom_traits::Point_3>` is used.\cgalParamEnd
|
||||
\cgalParamBegin{normal_map} a model of `ReadablePropertyMap` with value type
|
||||
`geom_traits::Vector_3`.\cgalParamEnd
|
||||
\cgalParamBegin{plane_index_map} a model of `ReadablePropertyMap` with value type `int`.
|
||||
Associates the index of a point in the input range to the index of plane (-1 if point does is not assigned to
|
||||
a plane).\cgalParamEnd
|
||||
\cgalParamBegin{plane_map} a model of `ReadablePropertyMap` with value type
|
||||
`geom_traits::Plane_3`. If this parameter is omitted, `CGAL::Identity_property_map<geom_traits::Plane_3>`
|
||||
is used.\cgalParamEnd
|
||||
\cgalParamBegin{attraction_factor} multiple of `epsilon` used to connect simplices.\cgalParamEnd
|
||||
\cgalParamBegin{geom_traits} an instance of a geometric traits class, model of `Kernel`\cgalParamEnd
|
||||
\cgalNamedParamsEnd
|
||||
|
||||
*/
|
||||
template <typename PointRange,
|
||||
typename PlaneRange,
|
||||
typename OutputIterator,
|
||||
typename NamedParameters
|
||||
>
|
||||
OutputIterator
|
||||
structure_point_set (const PointRange& points, ///< range of points.
|
||||
const PlaneRange& planes, ///< range of planes.
|
||||
OutputIterator output, ///< output iterator where output points are written.
|
||||
double epsilon, ///< size parameter.
|
||||
structure_point_set (const PointRange& points,
|
||||
const PlaneRange& planes,
|
||||
OutputIterator output,
|
||||
double epsilon,
|
||||
const NamedParameters& np)
|
||||
{
|
||||
using boost::choose_param;
|
||||
|
|
@ -1497,6 +1514,8 @@ structure_point_set (const PointRange& points, ///< range of points.
|
|||
return output;
|
||||
}
|
||||
|
||||
/// \cond SKIP_IN_MANUAL
|
||||
// variant with default NP
|
||||
template <typename PointRange,
|
||||
typename PlaneRange,
|
||||
typename OutputIterator>
|
||||
|
|
@ -1511,32 +1530,7 @@ structure_point_set (const PointRange& points, ///< range of points.
|
|||
CGAL::Point_set_processing_3::parameters::all_default(points));
|
||||
}
|
||||
|
||||
/// This is an implementation of the Point Set Structuring algorithm. This
|
||||
/// algorithm takes advantage of a set of detected planes: it detects adjacency
|
||||
/// relationships between planes and resamples the detected planes, edges and
|
||||
/// corners to produce a structured point set.
|
||||
///
|
||||
/// The size parameter `epsilon` is used both for detecting adjacencies and for
|
||||
/// setting the sampling density of the structured point set.
|
||||
///
|
||||
/// For more details, please refer to \cgalCite{cgal:la-srpss-13}.
|
||||
///
|
||||
/// @tparam PointRange range of points, model of `ConstRange`
|
||||
/// @tparam PointMap is a model of `ReadablePropertyMap` with value type `Kernel::Point_3`.
|
||||
/// It can be omitted if the value type of the iterator of `PointRange` is convertible to `Point_3<Kernel>`.
|
||||
/// @tparam NormalMap is a model of `ReadablePropertyMap` with value type `Kernel::Vector_3`.
|
||||
/// @tparam PlaneRange range of planes, model of `ConstRange`
|
||||
/// @tparam PlaneMap is a model of `ReadablePropertyMap` with value type `Kernel::Plane_3`.
|
||||
/// It can be omitted if the value type of the iterator of `PlaneRange` is convertible to `Plane_3<Kernel>`.
|
||||
/// @tparam IndexMap is a model of `ReadablePropertyMap` with value type `std::size_t`.
|
||||
/// @tparam OutputIterator Type of the output iterator. The type of the objects
|
||||
/// put in it is `std::pair<Kernel::Point_3, Kernel::Vector_3>`. Note that the
|
||||
/// user may use a <A HREF="http://www.boost.org/libs/iterator/doc/function_output_iterator.html">function_output_iterator</A>
|
||||
/// to match specific needs.
|
||||
/// @tparam Kernel Geometric traits class.
|
||||
/// It can be omitted and deduced automatically from the value type of `PointMap`.
|
||||
|
||||
// This variant requires all parameters
|
||||
// deprecated API
|
||||
template <typename PointRange,
|
||||
typename PointMap,
|
||||
typename NormalMap,
|
||||
|
|
@ -1569,9 +1563,7 @@ structure_point_set (const PointRange& points, ///< range of points.
|
|||
geom_traits (Kernel()));
|
||||
}
|
||||
|
||||
/// \cond SKIP_IN_MANUAL
|
||||
|
||||
// This variant deduces the kernel from the point property map.
|
||||
// deprecated API
|
||||
template <typename PointRange,
|
||||
typename PointMap,
|
||||
typename NormalMap,
|
||||
|
|
@ -1601,7 +1593,7 @@ structure_point_set (const PointRange& points,
|
|||
attraction_factor (attraction_factor));
|
||||
}
|
||||
|
||||
// This variant creates a default point property map = Identity_property_map.
|
||||
// deprecated API
|
||||
template <typename PointRange,
|
||||
typename NormalMap,
|
||||
typename PlaneRange,
|
||||
|
|
@ -1625,7 +1617,6 @@ structure_point_set (const PointRange& points,
|
|||
attraction_factor (attraction_factor));
|
||||
}
|
||||
|
||||
|
||||
/// \endcond
|
||||
|
||||
} //namespace CGAL
|
||||
|
|
|
|||
|
|
@ -363,31 +363,44 @@ vcm_estimate_normals (ForwardIterator first, ///< iterator over the first input
|
|||
}
|
||||
/// @endcond
|
||||
|
||||
/// \ingroup PkgPointSetProcessingAlgorithms
|
||||
/// Estimates normal directions of the points in the range `[first, beyond)`
|
||||
/// using the Voronoi Covariance Measure with a radius for the convolution.
|
||||
/// The output normals are randomly oriented.
|
||||
///
|
||||
/// See `compute_vcm()` for a detailed description of the parameters `offset_radius` and `convolution_radius`
|
||||
/// and of the Voronoi Covariance Measure.
|
||||
///
|
||||
/// @tparam ForwardIterator iterator over input points.
|
||||
/// @tparam PointMap is a model of `ReadablePropertyMap` with a value_type = `Kernel::Point_3`.
|
||||
/// @tparam NormalMap is a model of `WritablePropertyMap` with a value_type = `Kernel::Vector_3`.
|
||||
/// \tparam VCMTraits is a model of `DiagonalizeTraits`. It can be
|
||||
/// omitted: if Eigen 3 (or greater) is available and
|
||||
/// `CGAL_EIGEN3_ENABLED` is defined then an overload using
|
||||
/// `Eigen_diagonalize_traits` is provided. Otherwise, the internal
|
||||
/// implementation `Diagonalize_traits` is used.
|
||||
// This variant deduces the kernel from the point property map
|
||||
// and uses a radius for the convolution.
|
||||
|
||||
/**
|
||||
\ingroup PkgPointSetProcessingAlgorithms
|
||||
Estimates normal directions of the range of `points`
|
||||
using the Voronoi Covariance Measure with a radius for the convolution.
|
||||
The output normals are randomly oriented.
|
||||
|
||||
See `compute_vcm()` for a detailed description of the parameters `offset_radius` and `convolution_radius`
|
||||
and of the Voronoi Covariance Measure.
|
||||
|
||||
\tparam PointRange is a model of `Range`. The value type of
|
||||
its iterator is the key type of the named parameter `point_map`.
|
||||
|
||||
\param points input point range.
|
||||
\param offset_radius offset_radius.
|
||||
\param convolution_radius convolution_radius.
|
||||
\param np optional sequence of \ref psp_namedparameters "Named Parameters" among the ones listed below.
|
||||
|
||||
\cgalNamedParamsBegin
|
||||
\cgalParamBegin{point_map} a model of `ReadablePropertyMap` with value type `geom_traits::Point_3`.
|
||||
If this parameter is omitted, `CGAL::Identity_property_map<geom_traits::Point_3>` is used.\cgalParamEnd
|
||||
\cgalParamBegin{normal_map} a model of `WritablePropertyMap` with value type
|
||||
`geom_traits::Vector_3`.\cgalParamEnd
|
||||
\cgalParamBegin{diagonalize_traits} a model of `DiagonalizeTraits`. It can be omitted:
|
||||
if Eigen 3 (or greater) is available and `CGAL_EIGEN3_ENABLED` is defined then an overload
|
||||
using `Eigen_diagonalize_traits` is provided. Otherwise, the internal implementation
|
||||
`CGAL::Diagonalize_traits` is used.\cgalParamEnd
|
||||
\cgalParamBegin{geom_traits} an instance of a geometric traits class, model of `Kernel`\cgalParamEnd
|
||||
\cgalNamedParamsEnd
|
||||
|
||||
*/
|
||||
template <typename PointRange,
|
||||
typename NamedParameters
|
||||
>
|
||||
void
|
||||
vcm_estimate_normals (PointRange& points,
|
||||
double offset_radius, ///< offset radius.
|
||||
double convolution_radius, ///< convolution radius.
|
||||
double offset_radius,
|
||||
double convolution_radius,
|
||||
const NamedParameters& np
|
||||
)
|
||||
{
|
||||
|
|
@ -411,6 +424,8 @@ vcm_estimate_normals (PointRange& points,
|
|||
Kernel());
|
||||
}
|
||||
|
||||
/// \cond SKIP_IN_MANUAL
|
||||
// variant with default NP
|
||||
template <typename PointRange>
|
||||
void
|
||||
vcm_estimate_normals (PointRange& points,
|
||||
|
|
@ -422,23 +437,7 @@ vcm_estimate_normals (PointRange& points,
|
|||
CGAL::Point_set_processing_3::parameters::all_default(points));
|
||||
}
|
||||
|
||||
/// Estimates normal directions of the points in the range `[first, beyond)`
|
||||
/// using the Voronoi Covariance Measure with a radius for the convolution.
|
||||
/// The output normals are randomly oriented.
|
||||
///
|
||||
/// See `compute_vcm()` for a detailed description of the parameters `offset_radius` and `convolution_radius`
|
||||
/// and of the Voronoi Covariance Measure.
|
||||
///
|
||||
/// @tparam ForwardIterator iterator over input points.
|
||||
/// @tparam PointMap is a model of `ReadablePropertyMap` with a value_type = `Kernel::Point_3`.
|
||||
/// @tparam NormalMap is a model of `WritablePropertyMap` with a value_type = `Kernel::Vector_3`.
|
||||
/// \tparam VCMTraits is a model of `DiagonalizeTraits`. It can be
|
||||
/// omitted: if Eigen 3 (or greater) is available and
|
||||
/// `CGAL_EIGEN3_ENABLED` is defined then an overload using
|
||||
/// `Eigen_diagonalize_traits` is provided. Otherwise, the internal
|
||||
/// implementation `Diagonalize_traits` is used.
|
||||
// This variant deduces the kernel from the point property map
|
||||
// and uses a radius for the convolution.
|
||||
// deprecated API
|
||||
template < typename ForwardIterator,
|
||||
typename PointMap,
|
||||
typename NormalMap,
|
||||
|
|
@ -463,34 +462,45 @@ vcm_estimate_normals (ForwardIterator first, ///< iterator over the first input
|
|||
normal_map (normal_map).
|
||||
diagonalize_traits (VCMTraits()));
|
||||
}
|
||||
/// \endcond
|
||||
|
||||
|
||||
/// \ingroup PkgPointSetProcessingAlgorithms
|
||||
/// Estimates normal directions of the points in the range `[first, beyond)`
|
||||
/// using the Voronoi Covariance Measure with a number of neighbors for the convolution.
|
||||
/// The output normals are randomly oriented.
|
||||
///
|
||||
/// See `compute_vcm()` for a detailed description of the parameter `offset_radius`
|
||||
/// and of the Voronoi Covariance Measure.
|
||||
///
|
||||
/// @tparam ForwardIterator iterator over input points.
|
||||
/// @tparam PointMap is a model of `ReadablePropertyMap` with a value_type = `Kernel::Point_3`.
|
||||
/// @tparam NormalMap is a model of `WritablePropertyMap` with a value_type = `Kernel::Vector_3`.
|
||||
/// \tparam VCMTraits is a model of `DiagonalizeTraits`. It can be
|
||||
/// omitted: if Eigen 3 (or greater) is available and
|
||||
/// `CGAL_EIGEN3_ENABLED` is defined then an overload using
|
||||
/// `Eigen_diagonalize_traits` is provided. Otherwise, the internal
|
||||
/// implementation `Diagonalize_traits` is used.
|
||||
/**
|
||||
\ingroup PkgPointSetProcessingAlgorithms
|
||||
Estimates normal directions of the range of `points`
|
||||
using the Voronoi Covariance Measure with a number of neighbors for the convolution.
|
||||
The output normals are randomly oriented.
|
||||
|
||||
// This variant deduces the kernel from the point property map
|
||||
// and uses a number of neighbors for the convolution.
|
||||
See `compute_vcm()` for a detailed description of the parameter `offset_radius`
|
||||
and of the Voronoi Covariance Measure.
|
||||
|
||||
\tparam PointRange is a model of `Range`. The value type of
|
||||
its iterator is the key type of the named parameter `point_map`.
|
||||
|
||||
\param points input point range.
|
||||
\param offset_radius offset_radius.
|
||||
\param k number of neighbor points used for convolution.
|
||||
\param np optional sequence of \ref psp_namedparameters "Named Parameters" among the ones listed below.
|
||||
|
||||
\cgalNamedParamsBegin
|
||||
\cgalParamBegin{point_map} a model of `ReadablePropertyMap` with value type `geom_traits::Point_3`.
|
||||
If this parameter is omitted, `CGAL::Identity_property_map<geom_traits::Point_3>` is used.\cgalParamEnd
|
||||
\cgalParamBegin{normal_map} a model of `WritablePropertyMap` with value type
|
||||
`geom_traits::Vector_3`.\cgalParamEnd
|
||||
\cgalParamBegin{diagonalize_traits} a model of `DiagonalizeTraits`. It can be omitted:
|
||||
if Eigen 3 (or greater) is available and `CGAL_EIGEN3_ENABLED` is defined then an overload
|
||||
using `Eigen_diagonalize_traits` is provided. Otherwise, the internal implementation
|
||||
`CGAL::Diagonalize_traits` is used.\cgalParamEnd
|
||||
\cgalParamBegin{geom_traits} an instance of a geometric traits class, model of `Kernel`\cgalParamEnd
|
||||
\cgalNamedParamsEnd
|
||||
*/
|
||||
template < typename PointRange,
|
||||
typename NamedParameters
|
||||
>
|
||||
void
|
||||
vcm_estimate_normals (PointRange& points,
|
||||
double offset_radius, ///< offset radius.
|
||||
unsigned int k, ///< number of neighbor points used for the convolution.
|
||||
double offset_radius,
|
||||
unsigned int k,
|
||||
const NamedParameters& np
|
||||
)
|
||||
{
|
||||
|
|
@ -515,24 +525,20 @@ vcm_estimate_normals (PointRange& points,
|
|||
k);
|
||||
}
|
||||
|
||||
/// Estimates normal directions of the points in the range `[first, beyond)`
|
||||
/// using the Voronoi Covariance Measure with a number of neighbors for the convolution.
|
||||
/// The output normals are randomly oriented.
|
||||
///
|
||||
/// See `compute_vcm()` for a detailed description of the parameter `offset_radius`
|
||||
/// and of the Voronoi Covariance Measure.
|
||||
///
|
||||
/// @tparam ForwardIterator iterator over input points.
|
||||
/// @tparam PointMap is a model of `ReadablePropertyMap` with a value_type = `Kernel::Point_3`.
|
||||
/// @tparam NormalMap is a model of `WritablePropertyMap` with a value_type = `Kernel::Vector_3`.
|
||||
/// \tparam VCMTraits is a model of `DiagonalizeTraits`. It can be
|
||||
/// omitted: if Eigen 3 (or greater) is available and
|
||||
/// `CGAL_EIGEN3_ENABLED` is defined then an overload using
|
||||
/// `Eigen_diagonalize_traits` is provided. Otherwise, the internal
|
||||
/// implementation `Diagonalize_traits` is used.
|
||||
/// \cond SKIP_IN_MANUAL
|
||||
// variant with default NP
|
||||
template <typename PointRange>
|
||||
void
|
||||
vcm_estimate_normals (PointRange& points,
|
||||
double offset_radius, ///< offset radius.
|
||||
unsigned int k)
|
||||
{
|
||||
return vcm_estimate_normals
|
||||
(points, offset_radius, k,
|
||||
CGAL::Point_set_processing_3::parameters::all_default(points));
|
||||
}
|
||||
|
||||
// This variant deduces the kernel from the point property map
|
||||
// and uses a number of neighbors for the convolution.
|
||||
// deprecated API
|
||||
template < typename ForwardIterator,
|
||||
typename PointMap,
|
||||
typename NormalMap,
|
||||
|
|
@ -558,6 +564,7 @@ vcm_estimate_normals (ForwardIterator first, ///< iterator over the first input
|
|||
diagonalize_traits (VCMTraits()));
|
||||
}
|
||||
|
||||
// deprecated API
|
||||
template < typename ForwardIterator,
|
||||
typename PointMap,
|
||||
typename NormalMap
|
||||
|
|
@ -579,6 +586,7 @@ vcm_estimate_normals (ForwardIterator first,
|
|||
normal_map (normal_map));
|
||||
}
|
||||
|
||||
// deprecated API
|
||||
template < typename ForwardIterator,
|
||||
typename PointMap,
|
||||
typename NormalMap
|
||||
|
|
@ -601,9 +609,7 @@ vcm_estimate_normals (ForwardIterator first,
|
|||
}
|
||||
|
||||
|
||||
/// @cond SKIP_IN_MANUAL
|
||||
// This variant creates a default point property map = Identity_property_map
|
||||
// and use a radius for the convolution.
|
||||
// deprecated API
|
||||
template < typename ForwardIterator,
|
||||
typename NormalMap
|
||||
>
|
||||
|
|
@ -620,11 +626,8 @@ vcm_estimate_normals (ForwardIterator first,
|
|||
offset_radius, convolution_radius,
|
||||
CGAL::parameters::normal_map (normal_map));
|
||||
}
|
||||
/// @endcond
|
||||
|
||||
/// @cond SKIP_IN_MANUAL
|
||||
// This variant creates a default point property map = Identity_property_map
|
||||
// and use a number of neighbors for the convolution.
|
||||
// deprecated API
|
||||
template < typename ForwardIterator,
|
||||
typename NormalMap
|
||||
>
|
||||
|
|
@ -641,7 +644,7 @@ vcm_estimate_normals (ForwardIterator first,
|
|||
offset_radius, nb_neighbors_convolve,
|
||||
CGAL::parameters::normal_map (normal_map));
|
||||
}
|
||||
/// @endcond
|
||||
/// \endcond
|
||||
|
||||
} // namespace CGAL
|
||||
|
||||
|
|
|
|||
|
|
@ -395,37 +395,54 @@ public:
|
|||
// Public section
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
//=============================================================================
|
||||
/// \ingroup PkgPointSetProcessingAlgorithms
|
||||
/// This is an implementation of the Weighted Locally Optimal Projection (WLOP) simplification algorithm.
|
||||
/// The WLOP simplification algorithm can produce a set of
|
||||
/// denoised, outlier-free and evenly distributed particles over the original
|
||||
/// dense point cloud.
|
||||
/// The core of the algorithm is a Weighted Locally Optimal Projection operator
|
||||
/// with a density uniformization term.
|
||||
/// For more details, please refer to \cgalCite{wlop-2009}.
|
||||
///
|
||||
/// A parallel version of WLOP is provided and requires the executable to be
|
||||
/// linked against the <a href="http://www.threadingbuildingblocks.org">Intel TBB library</a>.
|
||||
/// To control the number of threads used, the user may use the tbb::task_scheduler_init class.
|
||||
/// See the <a href="http://www.threadingbuildingblocks.org/documentation">TBB documentation</a>
|
||||
/// for more details.
|
||||
///
|
||||
/// @tparam ConcurrencyTag enables sequential versus parallel algorithm.
|
||||
/// Possible values are `Sequential_tag`
|
||||
/// and `Parallel_tag`.
|
||||
/// @tparam OutputIterator Type of the output iterator.
|
||||
/// It must accept objects of type `Kernel::Point_3`.
|
||||
/// @tparam RandomAccessIterator Iterator over input points.
|
||||
/// @tparam PointMap is a model of `ReadablePropertyMap`
|
||||
/// with the value type of `ForwardIterator` as key type and `Kernel::Point_3` as value type.
|
||||
/// It can be omitted if the value type of ` RandomAccessIterator` is convertible
|
||||
/// to `Kernel::Point_3`.
|
||||
/// @tparam Kernel Geometric traits class.
|
||||
/// It can be omitted and deduced automatically from the value type of `PointMap`
|
||||
/// using `Kernel_traits`.
|
||||
/**
|
||||
\ingroup PkgPointSetProcessingAlgorithms
|
||||
This is an implementation of the Weighted Locally Optimal Projection (WLOP) simplification algorithm.
|
||||
The WLOP simplification algorithm can produce a set of
|
||||
denoised, outlier-free and evenly distributed particles over the original
|
||||
dense point cloud.
|
||||
The core of the algorithm is a Weighted Locally Optimal Projection operator
|
||||
with a density uniformization term.
|
||||
For more details, please refer to \cgalCite{wlop-2009}.
|
||||
|
||||
// This variant requires all parameters.
|
||||
A parallel version of WLOP is provided and requires the executable to be
|
||||
linked against the <a href="http://www.threadingbuildingblocks.org">Intel TBB library</a>.
|
||||
To control the number of threads used, the user may use the tbb::task_scheduler_init class.
|
||||
See the <a href="http://www.threadingbuildingblocks.org/documentation">TBB documentation</a>
|
||||
for more details.
|
||||
|
||||
\tparam ConcurrencyTag enables sequential versus parallel algorithm.
|
||||
Possible values are `Sequential_tag`
|
||||
and `Parallel_tag`.
|
||||
\tparam PointRange is a model of `Range`. The value type of
|
||||
its iterator is the key type of the named parameter `point_map`.
|
||||
\tparam OutputIterator Type of the output iterator.
|
||||
It must accept objects of type `geom_traits::Point_3`.
|
||||
|
||||
\param points input point range.
|
||||
\param output iterator where output points are put.
|
||||
\param np optional sequence of \ref psp_namedparameters "Named Parameters" among the ones listed below.
|
||||
|
||||
\cgalNamedParamsBegin
|
||||
\cgalParamBegin{point_map} a model of `ReadWritePropertyMap` with value type `geom_traits::Point_3`.
|
||||
If this parameter is omitted, `CGAL::Identity_property_map<geom_traits::Point_3>` is used.\cgalParamEnd
|
||||
\cgalParamBegin{normal_map} a model of `ReadWritePropertyMap` with value type
|
||||
`geom_traits::Vector_3`.\cgalParamEnd
|
||||
\cgalParamBegin{select_percentage} percentage of points to retain. The default value is set to
|
||||
5 (\%).\cgalParamEnd
|
||||
\cgalParamBegin{neighbor_radius} spherical neighborhood radius. This is a key parameter that needs to be
|
||||
finely tuned. The result will be irregular if too small, but a larger value will impact the runtime. In
|
||||
practice, choosing a radius such that the neighborhood of each sample point includes at least two rings
|
||||
of neighboring sample points gives satisfactory result. The default value is set to 8 times the average
|
||||
spacing of the point set.\cgalParamEnd
|
||||
\cgalParamBegin{number_of_iterations} number of iterations to solve the optimsation problem. The default
|
||||
value is 35. More iterations give a more regular result but increase the runtime.\cgalParamEnd
|
||||
\cgalParamBegin{require_uniform_sampling} an optional preprocessing, which will give better result if the
|
||||
distribution of the input points is highly non-uniform. The default value is `false`. \cgalParamEnd
|
||||
\cgalParamBegin{geom_traits} an instance of a geometric traits class, model of `Kernel`\cgalParamEnd
|
||||
\cgalNamedParamsEnd
|
||||
|
||||
*/
|
||||
template <typename ConcurrencyTag,
|
||||
typename PointRange,
|
||||
typename OutputIterator,
|
||||
|
|
@ -433,7 +450,7 @@ template <typename ConcurrencyTag,
|
|||
OutputIterator
|
||||
wlop_simplify_and_regularize_point_set(
|
||||
PointRange& points,
|
||||
OutputIterator output, ///< output iterator where output points are put.
|
||||
OutputIterator output,
|
||||
const NamedParameters& np
|
||||
)
|
||||
{
|
||||
|
|
@ -624,6 +641,9 @@ wlop_simplify_and_regularize_point_set(
|
|||
return output;
|
||||
}
|
||||
|
||||
|
||||
/// \cond SKIP_IN_MANUAL
|
||||
// variant with default NP
|
||||
template <typename ConcurrencyTag,
|
||||
typename PointRange,
|
||||
typename OutputIterator>
|
||||
|
|
@ -636,35 +656,7 @@ wlop_simplify_and_regularize_point_set(
|
|||
(points, output, CGAL::Point_set_processing_3::parameters::all_default(points));
|
||||
}
|
||||
|
||||
/// This is an implementation of the Weighted Locally Optimal Projection (WLOP) simplification algorithm.
|
||||
/// The WLOP simplification algorithm can produce a set of
|
||||
/// denoised, outlier-free and evenly distributed particles over the original
|
||||
/// dense point cloud.
|
||||
/// The core of the algorithm is a Weighted Locally Optimal Projection operator
|
||||
/// with a density uniformization term.
|
||||
/// For more details, please refer to \cgalCite{wlop-2009}.
|
||||
///
|
||||
/// A parallel version of WLOP is provided and requires the executable to be
|
||||
/// linked against the <a href="http://www.threadingbuildingblocks.org">Intel TBB library</a>.
|
||||
/// To control the number of threads used, the user may use the tbb::task_scheduler_init class.
|
||||
/// See the <a href="http://www.threadingbuildingblocks.org/documentation">TBB documentation</a>
|
||||
/// for more details.
|
||||
///
|
||||
/// @tparam ConcurrencyTag enables sequential versus parallel algorithm.
|
||||
/// Possible values are `Sequential_tag`
|
||||
/// and `Parallel_tag`.
|
||||
/// @tparam OutputIterator Type of the output iterator.
|
||||
/// It must accept objects of type `Kernel::Point_3`.
|
||||
/// @tparam RandomAccessIterator Iterator over input points.
|
||||
/// @tparam PointMap is a model of `ReadablePropertyMap`
|
||||
/// with the value type of `ForwardIterator` as key type and `Kernel::Point_3` as value type.
|
||||
/// It can be omitted if the value type of ` RandomAccessIterator` is convertible
|
||||
/// to `Kernel::Point_3`.
|
||||
/// @tparam Kernel Geometric traits class.
|
||||
/// It can be omitted and deduced automatically from the value type of `PointMap`
|
||||
/// using `Kernel_traits`.
|
||||
|
||||
// This variant requires all parameters.
|
||||
// deprecated API
|
||||
template <typename ConcurrencyTag,
|
||||
typename OutputIterator,
|
||||
typename RandomAccessIterator,
|
||||
|
|
@ -735,12 +727,8 @@ wlop_simplify_and_regularize_point_set(
|
|||
number_of_iterations(max_iter_number).
|
||||
require_uniform_sampling (require_uniform_sampling));
|
||||
}
|
||||
/// @endcond
|
||||
|
||||
|
||||
|
||||
/// @cond SKIP_IN_MANUAL
|
||||
/// This variant creates a default point property map=Dereference_property_map.
|
||||
// deprecated API
|
||||
template <typename ConcurrencyTag,
|
||||
typename OutputIterator,
|
||||
typename RandomAccessIterator >
|
||||
|
|
|
|||
Loading…
Reference in New Issue