mirror of https://github.com/CGAL/cgal
Discussion on scale space and output
This commit is contained in:
parent
212db7c608
commit
3d6cf83275
|
|
@ -306,7 +306,9 @@ surfaces with boundaries: contrary to Poisson, it does not require
|
|||
normals and is not bound to reconstruct closed shapes. However, it
|
||||
requires preprocessing if the point is noisy.
|
||||
|
||||
Here is an example on how to call this function:
|
||||
The \ref Chapter_Advancing_Front_Surface_Reconstruction "Advancing Front"
|
||||
package provides several ways of constructing the function. Here is
|
||||
a simple example:
|
||||
|
||||
\code{.cpp}
|
||||
typedef CGAL::cpp11::array<std::size_t,3> Facet; // Triple of indices
|
||||
|
|
@ -318,7 +320,27 @@ CGAL::advancing_front_surface_reconstruction(points.begin(),
|
|||
|
||||
\subsection TutorialsReconstruction_reconstruction_scale_space Scale Space
|
||||
|
||||
\todo Tutorial
|
||||
Scale space reconstruction aims at producing a surface that
|
||||
interpolates the input points (interpolant) while offering some
|
||||
robustness to noise. It is the good choice if the input point cloud is
|
||||
noisy but the user still wants the surface to pass exactly through the
|
||||
points.
|
||||
|
||||
Notice that although there is an option to force the output to be
|
||||
manifold, it is not guaranted to be orientable (contrary to _Poisson_
|
||||
and _Avdancing front_).
|
||||
|
||||
\code{.cpp}
|
||||
CGAL::Scale_space_surface_receonstruction_3<Kernel> reconstruct
|
||||
(10, // Number of neighborhood points
|
||||
300); // Number of samples used to estimate neighborhood radius
|
||||
|
||||
reconstruct.reconstruct_surface(points.begin (), points.end (),
|
||||
4, // Number of iterations
|
||||
false, // Do not separate connected components
|
||||
true); // Force manifold output
|
||||
\endcode
|
||||
|
||||
|
||||
\section TutorialsReconstruction_postprocessing Output and Postprocessing
|
||||
|
||||
|
|
@ -334,17 +356,39 @@ user's expectations on the output mesh.
|
|||
The mesh (postprocessed or not) can easily be saved in the OFF format:
|
||||
|
||||
\code{.cpp}
|
||||
\\ Poisson
|
||||
// Poisson
|
||||
std::ofstream f ("out.off");
|
||||
CGAL::output_facet_to_off(f, c2t3);
|
||||
f.close ();
|
||||
\endcode
|
||||
|
||||
\code{.cpp}
|
||||
\\ Advancing Front
|
||||
// Advancing Front
|
||||
std::ofstream f ("out.off");
|
||||
f << "OFF" << std::endl << points.size () << " " << facets.size () << " 0" << std::end;
|
||||
|
||||
for (std::size_t i = 0; i < points.size (); ++ i)
|
||||
f << points[i] << std::endl;
|
||||
|
||||
for (std::size_t i = 0; i < facets.size (); ++ j)
|
||||
f << "3 " << facets[i] << std::endl;
|
||||
|
||||
f.close ();
|
||||
\endcode
|
||||
|
||||
\code{.cpp}
|
||||
\\ Advancing Front
|
||||
// Scale space
|
||||
std::ofstream f ("out.off");
|
||||
f << "OFF" << std::endl << points.size () << " " << facets.size () << " 0" << std::end;
|
||||
|
||||
for (std::size_t i = 0; i < points.size (); ++ i)
|
||||
f << points[i] << std::endl;
|
||||
|
||||
typedef typename Scale_space_surface_reconstruction_3<Kernel>::Triple_iterator Triple_iterator;
|
||||
for (Triple_iterator it = reconstruct.shell_begin (shell); it != reconstruct.shell_end (shell); ++it)
|
||||
out << "3 "<< *it << std::endl;
|
||||
|
||||
f.close ();
|
||||
\endcode
|
||||
|
||||
\section TutorialsReconstruction_recap Recap and Full Code Example
|
||||
|
|
|
|||
Loading…
Reference in New Issue