\( \newcommand{\E}{\mathrm{E}} \) \( \newcommand{\A}{\mathrm{A}} \) \( \newcommand{\R}{\mathrm{R}} \) \( \newcommand{\N}{\mathrm{N}} \) \( \newcommand{\Q}{\mathrm{Q}} \) \( \newcommand{\Z}{\mathrm{Z}} \) \( \def\ccSum #1#2#3{ \sum_{#1}^{#2}{#3} } \def\ccProd #1#2#3{ \sum_{#1}^{#2}{#3} }\)
CGAL 4.3 - Point Set Processing
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
CGAL Namespace Reference

Namespaces

 cpp11
 
 internal
 
 IO
 

Classes

class  Aff_transformation_2
 
class  Aff_transformation_3
 
class  Identity_transformation
 
class  Reflection
 
class  Rotation
 
class  Scaling
 
class  Translation
 
class  Bbox_2
 
class  Bbox_3
 
class  Cartesian
 
class  Cartesian_converter
 
class  Circle_2
 
class  Circle_3
 
class  Ambient_dimension
 
class  Dimension_tag
 
class  Dynamic_dimension_tag
 
class  Feature_dimension
 
class  Direction_2
 
class  Direction_3
 
class  Exact_predicates_exact_constructions_kernel
 
class  Exact_predicates_exact_constructions_kernel_with_sqrt
 
class  Exact_predicates_inexact_constructions_kernel
 
class  Filtered_kernel_adaptor
 
class  Filtered_kernel
 
class  Filtered_predicate
 
class  Homogeneous
 
class  Homogeneous_converter
 
class  Iso_cuboid_3
 
class  Iso_rectangle_2
 
class  Kernel_traits
 
class  Line_2
 
class  Line_3
 
class  Null_vector
 
class  Origin
 
class  Plane_3
 
class  Point_2
 
class  Point_3
 
class  Projection_traits_xy_3
 
class  Projection_traits_xz_3
 
class  Projection_traits_yz_3
 
class  Ray_2
 
class  Ray_3
 
class  Segment_2
 
class  Segment_3
 
class  Simple_cartesian
 
class  Simple_homogeneous
 
class  Sphere_3
 
class  Tetrahedron_3
 
class  Triangle_2
 
class  Triangle_3
 
class  Vector_2
 
class  Vector_3
 
class  Compact_container_base
 
class  Compact_container
 
class  Compact_container_traits
 
class  Compact
 
class  Fast
 
class  Default
 
class  Fourtuple
 
class  Cast_function_object
 
class  Compare_to_less
 
class  Creator_1
 
class  Creator_2
 
class  Creator_3
 
class  Creator_4
 
class  Creator_5
 
class  Creator_uniform_2
 
class  Creator_uniform_3
 
class  Creator_uniform_4
 
class  Creator_uniform_5
 
class  Creator_uniform_6
 
class  Creator_uniform_7
 
class  Creator_uniform_8
 
class  Creator_uniform_9
 
class  Creator_uniform_d
 
class  Dereference
 
class  Get_address
 
class  Identity
 
class  Project_facet
 
class  Project_next
 
class  Project_next_opposite
 
class  Project_normal
 
class  Project_opposite_prev
 
class  Project_plane
 
class  Project_point
 
class  Project_prev
 
class  Project_vertex
 
class  In_place_list_base
 
class  In_place_list
 
class  Const_oneset_iterator
 
class  Counting_iterator
 
class  Dispatch_or_drop_output_iterator
 
class  Dispatch_output_iterator
 
class  Emptyset_iterator
 
class  Filter_iterator
 
class  Insert_iterator
 
class  Inverse_index
 
class  Join_input_iterator_1
 
class  Join_input_iterator_2
 
class  Join_input_iterator_3
 
class  N_step_adaptor
 
class  Oneset_iterator
 
class  Random_access_adaptor
 
class  Random_access_value_adaptor
 
class  Location_policy
 
class  Multiset
 
class  Object
 
class  Sixtuple
 
class  Boolean_tag
 
struct  Null_functor
 
struct  Sequential_tag
 
struct  Parallel_tag
 
class  Null_tag
 
class  Threetuple
 
class  Twotuple
 
class  Uncertain
 
class  Quadruple
 
class  Triple
 
class  Algebraic_structure_traits
 
class  Euclidean_ring_tag
 
class  Field_tag
 
class  Field_with_kth_root_tag
 
class  Field_with_root_of_tag
 
class  Field_with_sqrt_tag
 
class  Integral_domain_tag
 
class  Integral_domain_without_division_tag
 
class  Unique_factorization_domain_tag
 
class  Coercion_traits
 
class  Fraction_traits
 
class  Real_embeddable_traits
 
class  Circulator_from_container
 
class  Circulator_from_iterator
 
class  Circulator_traits
 
class  Container_from_circulator
 
struct  Circulator_tag
 
struct  Iterator_tag
 
struct  Forward_circulator_tag
 
struct  Bidirectional_circulator_tag
 
struct  Random_access_circulator_tag
 
struct  Circulator_base
 
struct  Forward_circulator_base
 
struct  Bidirectional_circulator_base
 
struct  Random_access_circulator_base
 
class  Forward_circulator_ptrbase
 
class  Bidirectional_circulator_ptrbase
 
class  Random_access_circulator_ptrbase
 
class  Color
 
class  Input_rep
 
class  Output_rep
 
class  Istream_iterator
 
class  Ostream_iterator
 
class  Verbose_ostream
 
class  Poisson_reconstruction_function
 
struct  Input_iterator_property_map
 
struct  Dereference_property_map
 
struct  Identity_property_map
 
struct  First_of_pair_property_map
 
struct  Second_of_pair_property_map
 
struct  Nth_of_tuple_property_map
 
class  Approximate_min_ellipsoid_d
 
class  Approximate_min_ellipsoid_d_traits_2
 
class  Approximate_min_ellipsoid_d_traits_3
 
class  Approximate_min_ellipsoid_d_traits_d
 
class  Min_annulus_d
 
class  Min_circle_2
 
class  Min_circle_2_traits_2
 
class  Min_ellipse_2
 
class  Min_ellipse_2_traits_2
 
class  Min_quadrilateral_default_traits_2
 
class  Min_sphere_annulus_d_traits_2
 
class  Min_sphere_annulus_d_traits_3
 
class  Min_sphere_annulus_d_traits_d
 
class  Min_sphere_d
 
class  Min_sphere_of_points_d_traits_2
 
class  Min_sphere_of_points_d_traits_3
 
class  Min_sphere_of_points_d_traits_d
 
class  Min_sphere_of_spheres_d
 
class  Min_sphere_of_spheres_d_traits_2
 
class  Min_sphere_of_spheres_d_traits_3
 
class  Min_sphere_of_spheres_d_traits_d
 
class  Rectangular_p_center_default_traits_2
 
struct  value_type_traits
 Class providing the value type of an iterator, and in the case of an output iterator, a type of objects that can be put in it. More...
 
struct  value_type_traits< std::back_insert_iterator< Container > >
 
struct  value_type_traits< std::insert_iterator< Container > >
 
struct  value_type_traits< std::front_insert_iterator< Container > >
 

Functions

NT abs (const NT &x)
 
result_type compare (const NT &x, const NT &y)
 
result_type div (const NT1 &x, const NT2 &y)
 
void div_mod (const NT1 &x, const NT2 &y, result_type &q, result_type &r)
 
result_type gcd (const NT1 &x, const NT2 &y)
 
result_type integral_division (const NT1 &x, const NT2 &y)
 
NT inverse (const NT &x)
 
result_type is_negative (const NT &x)
 
result_type is_one (const NT &x)
 
result_type is_positive (const NT &x)
 
result_type is_square (const NT &x)
 
result_type is_square (const NT &x, NT &y)
 
result_type is_zero (const NT &x)
 
NT kth_root (int k, const NT &x)
 
result_type mod (const NT1 &x, const NT2 &y)
 
NT root_of (int k, InputIterator begin, InputIterator end)
 
result_type sign (const NT &x)
 
void simplify (const NT &x)
 
NT sqrt (const NT &x)
 
NT square (const NT &x)
 
double to_double (const NT &x)
 
std::pair< double, double > to_interval (const NT &x)
 
NT unit_part (const NT &x)
 
void Assert_circulator (const C &c)
 
void Assert_iterator (const I &i)
 
void Assert_circulator_or_iterator (const IC &i)
 
void Assert_input_category (const I &i)
 
void Assert_output_category (const I &i)
 
void Assert_forward_category (const IC &ic)
 
void Assert_bidirectional_category (const IC &ic)
 
void Assert_random_access_category (const IC &ic)
 
C::difference_type circulator_distance (C c, C d)
 
C::size_type circulator_size (C c)
 
bool is_empty_range (const IC &i, const IC &j)
 
iterator_traits< IC >
::difference_type 
iterator_distance (IC ic1, IC ic2)
 
Iterator_tag query_circulator_or_iterator (const I &i)
 
Circulator_tag query_circulator_or_iterator (const C &c)
 
Mode get_mode (std::ios &s)
 
Mode set_ascii_mode (std::ios &s)
 
Mode set_binary_mode (std::ios &s)
 
Mode set_mode (std::ios &s, IO::Mode m)
 
Mode set_pretty_mode (std::ios &s)
 
bool is_ascii (std::ios &s)
 
bool is_binary (std::ios &s)
 
bool is_pretty (std::ios &s)
 
Output_rep< T > oformat (const T &t)
 
Input_rep< T > iformat (const T &t)
 
Output_rep< T, F > oformat (const T &t, F)
 
ostream & operator<< (ostream &os, Class c)
 
istream & operator>> (istream &is, Class c)
 
OutputIterator min_parallelogram_2 (ForwardIterator points_begin, ForwardIterator points_end, OutputIterator o, Traits &t=Default_traits)
 
OutputIterator min_rectangle_2 (ForwardIterator points_begin, ForwardIterator points_end, OutputIterator o, Traits &t=Default_traits)
 
OutputIterator min_strip_2 (ForwardIterator points_begin, ForwardIterator points_end, OutputIterator o, Traits &t=Default_traits)
 
OutputIterator rectangular_p_center_2 (ForwardIterator f, ForwardIterator l, OutputIterator o, FT &r, int p, const Traits &t=Default_traits)
 
template<typename InputIterator , typename PointPMap , typename Kernel >
Kernel::FT compute_average_spacing (InputIterator first, InputIterator beyond, PointPMap point_pmap, unsigned int k, const Kernel &)
 Computes average spacing from k nearest neighbors. More...
 
template<typename ForwardIterator , typename PointPMap , typename Kernel >
ForwardIterator grid_simplify_point_set (ForwardIterator first, ForwardIterator beyond, PointPMap point_pmap, double epsilon, const Kernel &)
 Merges points which belong to the same cell of a grid of cell size = epsilon. More...
 
template<class Iter >
Index_property_map< Iter > make_index_property_map (Iter first, Iter beyond)
 Free function to create an Index_property_map property map. More...
 
template<typename OutputIteratorValueType , typename OutputIterator , typename PointPMap , typename NormalPMap , typename Kernel >
bool read_off_points_and_normals (std::istream &stream, OutputIterator output, PointPMap point_pmap, NormalPMap normal_pmap, const Kernel &)
 Reads points (positions + normals, if available) from a .off ASCII stream. More...
 
template<typename OutputIteratorValueType , typename OutputIterator , typename PointPMap , typename Kernel >
bool read_off_points (std::istream &stream, OutputIterator output, PointPMap point_pmap, const Kernel &kernel)
 Reads points (position only) from a .off ASCII stream. More...
 
template<typename OutputIteratorValueType , typename OutputIterator , typename PointPMap , typename NormalPMap , typename Kernel >
bool read_xyz_points_and_normals (std::istream &stream, OutputIterator output, PointPMap point_pmap, NormalPMap normal_pmap, const Kernel &)
 Reads points (positions + normals, if available) from a .xyz ASCII stream. More...
 
template<typename OutputIteratorValueType , typename OutputIterator , typename PointPMap , typename Kernel >
bool read_xyz_points (std::istream &stream, OutputIterator output, PointPMap point_pmap, const Kernel &kernel)
 Reads points (positions only) from a .xyz ASCII stream. More...
 
template<typename ForwardIterator , typename PointPMap , typename NormalPMap , typename Kernel >
bool write_off_points_and_normals (std::ostream &stream, ForwardIterator first, ForwardIterator beyond, PointPMap point_pmap, NormalPMap normal_pmap, const Kernel &)
 Saves the [first, beyond) range of points (positions + normals) to a .off ASCII stream. More...
 
template<typename ForwardIterator , typename PointPMap , typename Kernel >
bool write_off_points (std::ostream &stream, ForwardIterator first, ForwardIterator beyond, PointPMap point_pmap, const Kernel &)
 Saves the [first, beyond) range of points (positions only) to a .off ASCII stream. More...
 
template<typename ForwardIterator , typename PointPMap , typename NormalPMap , typename Kernel >
bool write_xyz_points_and_normals (std::ostream &stream, ForwardIterator first, ForwardIterator beyond, PointPMap point_pmap, NormalPMap normal_pmap, const Kernel &)
 Saves the [first, beyond) range of points (positions + normals) to a .xyz ASCII stream. More...
 
template<typename ForwardIterator , typename PointPMap , typename Kernel >
bool write_xyz_points (std::ostream &stream, ForwardIterator first, ForwardIterator beyond, PointPMap point_pmap, const Kernel &)
 Saves the [first, beyond) range of points (positions only) to a .xyz ASCII stream. More...
 
template<typename ForwardIterator , typename PointPMap , typename NormalPMap , typename Kernel >
void jet_estimate_normals (ForwardIterator first, ForwardIterator beyond, PointPMap point_pmap, NormalPMap normal_pmap, unsigned int k, const Kernel &, unsigned int degree_fitting=2)
 Estimates normal directions of the [first, beyond) range of points using jet fitting on the k nearest neighbors. More...
 
template<typename InputIterator , typename PointPMap , typename Kernel >
void jet_smooth_point_set (InputIterator first, InputIterator beyond, PointPMap point_pmap, unsigned int k, const Kernel &, unsigned int degree_fitting=2, unsigned int degree_monge=2)
 Smoothes the [first, beyond) range of points using jet fitting on the k nearest neighbors and reprojection onto the jet. More...
 
template<typename ForwardIterator , typename PointPMap , typename NormalPMap , typename Kernel >
ForwardIterator mst_orient_normals (ForwardIterator first, ForwardIterator beyond, PointPMap point_pmap, NormalPMap normal_pmap, unsigned int k, const Kernel &kernel)
 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]. More...
 
template<typename ForwardIterator , typename PointPMap , typename NormalPMap , typename Kernel >
void pca_estimate_normals (ForwardIterator first, ForwardIterator beyond, PointPMap point_pmap, NormalPMap normal_pmap, unsigned int k, const Kernel &)
 Estimates normal directions of the [first, beyond) range of points by linear least squares fitting of a plane over the k nearest neighbors. More...
 
template<typename ForwardIterator , typename PointPMap , typename Kernel >
ForwardIterator random_simplify_point_set (ForwardIterator first, ForwardIterator beyond, PointPMap, double removed_percentage, const Kernel &)
 Randomly deletes a user-specified fraction of the input points. More...
 
template<typename InputIterator , typename PointPMap , typename Kernel >
InputIterator remove_outliers (InputIterator first, InputIterator beyond, PointPMap point_pmap, unsigned int k, double threshold_percent, const Kernel &)
 Removes outliers: More...
 
template<typename InputIterator , typename PointPMap , typename Kernel >
InputIterator remove_outliers_wrt_median_knn_sq_distance (InputIterator first, InputIterator beyond, PointPMap point_pmap, unsigned int k, double threshold_percent, const Kernel &kernel)
 Removes outliers: More...
 

Function Documentation

template<class Iter >
Index_property_map<Iter> CGAL::make_index_property_map ( Iter  first,
Iter  beyond 
)

Free function to create an Index_property_map property map.

Template Parameters
Iteriterator over input elements.
Returns
an "index" property map, which associates a 0-based index (unsigned int) to the [first, beyond) range of elements.
Parameters
firstiterator over the first element (index 0)
beyondpast-the-end iterator over the elements
template<typename InputIterator , typename PointPMap , typename Kernel >
InputIterator CGAL::remove_outliers_wrt_median_knn_sq_distance ( InputIterator  first,
InputIterator  beyond,
PointPMap  point_pmap,
unsigned int  k,
double  threshold_percent,
const Kernel kernel 
)

Removes outliers:

  • computes median squared distance to the K nearest neighbors,
  • sorts the points in increasing order of computed 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.

Precondition
k >= 2
Template Parameters
InputIteratoriterator over input points.
PointPMapis a model of ReadablePropertyMap with a value_type = Point_3<Kernel>. It can be omitted if InputIterator value_type is convertible to Point_3<Kernel>.
KernelGeometric traits class. It can be omitted and deduced automatically from PointPMap value_type.
Returns
iterator over the first point to remove.
Parameters
firstiterator over the first input point.
beyondpast-the-end iterator over the input points.
point_pmapproperty map: value_type of InputIterator -> Point_3
knumber of neighbors.
threshold_percentpercentage of points to remove.
kernelgeometric traits.