CGAL 5.3.2 - Scale-Space Surface Reconstruction
CGAL::Scale_space_surface_reconstruction_3< Geom_traits > Class Template Reference

#include <CGAL/Scale_space_surface_reconstruction_3.h>

Definition

computes a triangulated surface mesh interpolating a point set.

Scale space reconstruction consists in combining a smoothing algorithm (see Scale_space_reconstruction_3::Smoother) that is used to generate a user-specified number of scales with a meshing algorithm (see Scale_space_reconstruction_3::Mesher).

The class stores the point set at the current scale and the reconstructed surface. User can either use the reconstructed surface at the current scale (smoothed version) or propagate the connectivity of the facets back to the original point set. This latest option makes it possible to reconstruct an interpolative surface on a noisy point set.

Template Parameters
Geom_traitsis the geometric traits class. It must be a model of DelaunayTriangulationTraits_3. It must have a RealEmbeddable field number type. Generally, Exact_predicates_inexact_constructions_kernel is preferred.
Examples:
Scale_space_reconstruction_3/scale_space.cpp, Scale_space_reconstruction_3/scale_space_advancing_front.cpp, Scale_space_reconstruction_3/scale_space_incremental.cpp, and Scale_space_reconstruction_3/scale_space_manifold.cpp.

Public Types

typedef Geom_traits::FT FT
 defines the field number type.
 
typedef Geom_traits::Point_3 Point
 defines the point type.
 
typedef std::array< std::size_t, 3 > Facet
 defines a facet of the surface (triple of point indices).
 
typedef unspecified_type Point_iterator
 defines an iterator over the points.
 
typedef unspecified_type Facet_iterator
 defines an iterator over the points.
 

Public Attributes

const typedef unspecified_type Point_const_iterator
 defines a constant iterator over the points.
 
const typedef unspecified_type Facet_const_iterator
 defines a constant iterator over the points.
 

Initialization

 Scale_space_surface_reconstruction_3 ()
 Empty constructor.
 
template<typename InputIterator >
 Scale_space_surface_reconstruction_3 (InputIterator begin, InputIterator end)
 Constructs a reconstruction object with the given point range. More...
 
void insert (const Point &p)
 inserts a point into the scale-space at the current scale. More...
 
template<typename InputIterator >
void insert (InputIterator begin, InputIterator end)
 inserts a collection of points into the scale-space at the current scale. More...
 

Algorithms

template<typename Smoother >
void increase_scale (std::size_t iterations=1, const Smoother &smoother=Smoother())
 increases the scale by a number of iterations. More...
 
template<typename Mesher >
void reconstruct_surface (const Mesher &mesher=Mesher())
 constructs a triangle mesh from the point set at a fixed scale. More...
 

Output

std::size_t number_of_points () const
 gives the number of points of the surface.
 
Point_iterator points_begin ()
 gives an iterator to the first point at the current scale. More...
 
Point_iterator points_end ()
 gives a past-the-end iterator of the points at the current scale. More...
 
Point_const_iterator points_begin () const
 gives an iterator to the first point at the current scale.
 
Point_const_iterator points_end () const
 gives a past-the-end iterator of the points at the current scale.
 
std::size_t number_of_facets () const
 gives the number of facets of the surface.
 
Facet_iterator facets_begin ()
 gives an iterator to the first triple in the surface. More...
 
Facet_iterator facets_end ()
 gives a past-the-end iterator of the triples in the surface. More...
 
Facet_const_iterator facets_begin () const
 gives an iterator to the first triple in the surface.
 
Facet_const_iterator facets_end () const
 gives a past-the-end iterator of the triples in the surface.
 

Constructor & Destructor Documentation

◆ Scale_space_surface_reconstruction_3()

template<typename Geom_traits >
template<typename InputIterator >
CGAL::Scale_space_surface_reconstruction_3< Geom_traits >::Scale_space_surface_reconstruction_3 ( InputIterator  begin,
InputIterator  end 
)

Constructs a reconstruction object with the given point range.

Note
This constructor is equivalent to constructing an empty object and then calling insert(begin, end).
Template Parameters
InputIteratoris an iterator over the point collection. The value type of the iterator must be a Point.
Parameters
beginis an iterator to the first point of the collection.
endis a past-the-end iterator for the point collection.

Member Function Documentation

◆ facets_begin()

template<typename Geom_traits >
Facet_iterator CGAL::Scale_space_surface_reconstruction_3< Geom_traits >::facets_begin ( )

gives an iterator to the first triple in the surface.

Warning
Changes to the surface may change its topology.

◆ facets_end()

template<typename Geom_traits >
Facet_iterator CGAL::Scale_space_surface_reconstruction_3< Geom_traits >::facets_end ( )

gives a past-the-end iterator of the triples in the surface.

Warning
Changes to the surface may change its topology.

◆ increase_scale()

template<typename Geom_traits >
template<typename Smoother >
void CGAL::Scale_space_surface_reconstruction_3< Geom_traits >::increase_scale ( std::size_t  iterations = 1,
const Smoother &  smoother = Smoother() 
)

increases the scale by a number of iterations.

Each iteration the scale is increased, the points set at a higher scale is computed. At a higher scale, the points set is smoother.

Note
If no smoothing algorithm is specified, the default Weighted_PCA_smoother is used.
Template Parameters
Smoothermodel of Scale_space_reconstruction_3::Smoother.
Parameters
iterationsis the number of iterations to perform. If iterations is 0, nothing happens.
smootherthe smoother object.
Note
This method processes the point set at the current scale. The points can be set with insert(begin, end).
If the surface was already constructed, increasing the scale will not automatically adjust the surface.
See also
reconstruct_surface().

◆ insert() [1/2]

template<typename Geom_traits >
void CGAL::Scale_space_surface_reconstruction_3< Geom_traits >::insert ( const Point p)

inserts a point into the scale-space at the current scale.

Parameters
pis the point to insert.
Note
Inserting the point does not automatically construct or update the surface.
In order to construct the surface, call reconstruct_surface().
See also
insert(InputIterator begin, InputIterator end).

◆ insert() [2/2]

template<typename Geom_traits >
template<typename InputIterator >
void CGAL::Scale_space_surface_reconstruction_3< Geom_traits >::insert ( InputIterator  begin,
InputIterator  end 
)

inserts a collection of points into the scale-space at the current scale.

Template Parameters
InputIteratoris an iterator over the point collection. The value type of the iterator must be a Point.
Parameters
beginis an iterator to the first point of the collection.
endis a past-the-end iterator for the point collection.
Note
Inserting the points does not automatically construct or update the surface.
In order to construct the surface, call reconstruct_surface() after inserting the points.
See also
insert(const Point& p).

◆ points_begin()

template<typename Geom_traits >
Point_iterator CGAL::Scale_space_surface_reconstruction_3< Geom_traits >::points_begin ( )

gives an iterator to the first point at the current scale.

Warning
Changes to the scale-space do not cause an automatic update to the surface.

◆ points_end()

template<typename Geom_traits >
Point_iterator CGAL::Scale_space_surface_reconstruction_3< Geom_traits >::points_end ( )

gives a past-the-end iterator of the points at the current scale.

Warning
Changes to the scale-space do not cause an automatic update to the surface.

◆ reconstruct_surface()

template<typename Geom_traits >
template<typename Mesher >
void CGAL::Scale_space_surface_reconstruction_3< Geom_traits >::reconstruct_surface ( const Mesher &  mesher = Mesher())

constructs a triangle mesh from the point set at a fixed scale.

The order of the points at the current scale is the same as the order at the original scale, meaning that the surface can interpolate the point set at the original scale by applying the indices of the surface triangles to the original point set.

After construction, the facets of the surface can be iterated using facets_begin() and facets_end().

Note
If no meshing algorithm is specified, the default Alpha_shape_mesher is used.
Template Parameters
Meshermodel of Scale_space_reconstruction_3::Mesher.
Parameters
mesherthe mesher object.
Note
This method processes the point set at the current scale. The points can be set with insert(begin, end).
See also
increase_scale().