CGAL 6.1 - 3D Mesh Generation

Loading...
Searching...
No Matches
List of all members | Public Member Functions
CGAL::Construct_initial_points_gray_image< C3t3, MeshDomain, Functor > Struct Template Reference
Reference Manual » Mesh Initialization Functors

`#include <CGAL/Mesh_3/Construct_initial_points_gray_image.h>`

## Definition

template<typename C3t3, typename MeshDomain, typename Functor = CGAL::Null_functor>
struct CGAL::Construct_initial_points_gray_image< C3t3, MeshDomain, Functor >

Functor for generating initial points in gray images.

This functor is a model of the `InitialPointsGenerator_3` concept, and can be passed as a parameter to `CGAL::make_mesh_3()` using the `CGAL::parameters::initial_points_generator()` parameter function.

On images that contain multiple connected components, this functor will scan the full image and output enough points on the surface of each component to initialize them all. Each connected component is guaranteed to be represented by at least one cell of the triangulation.

Is model of
  `InitialPointsGenerator_3`

Template Parameters

  C3t3 | model of `MeshComplex_3InTriangulation_3`
  MeshDomain | model of `MeshDomain_3`
  Functor | a function object that takes the number type in which the image is encoded, and returns the `MeshDomain::Index` of the corresponding subcomplex index. The default type is `CGAL::Null_functor`.

See also
  `CGAL::parameters::initial_points_generator()`
  `CGAL::make_mesh_3()`
  `CGAL::Construct_initial_points_labeled_image`

## Public Member Functions
| Construct_initial_points_gray_image (const CGAL::Image_3 &image, const MeshDomain &domain, const double iso_value, const Functor image_values_to_subdomain_indices=CGAL::Null_functor())
| Constructs a functor for generating initial points in gray images.
template<typename OutputIterator >
OutputIterator | operator() (OutputIterator pts, const int n=20) const
| constructs at least `n` points by collecting them on the surface of all subdomains in the image, even if they are not connected components.

## Constructor & Destructor Documentation

## ◆ Construct_initial_points_gray_image()

template<typename C3t3 , typename MeshDomain , typename Functor = CGAL::Null_functor>

CGAL::Construct_initial_points_gray_image< C3t3, MeshDomain, Functor >::Construct_initial_points_gray_image | ( | const CGAL::Image_3 & | image,
|  | const MeshDomain & | domain,
|  | const double | iso_value,
|  | const Functor | image_values_to_subdomain_indices = `CGAL::Null_functor()`
| ) |  |

Constructs a functor for generating initial points in gray images.

Parameters

  image | the gray image that defines the mesh domain
  domain | the mesh domain
  iso_value | the iso value corresponding to the surface of the domain
  image_values_to_subdomain_indices | a function object that takes the number type in which `image` is encoded, and returns the corresponding `MeshDomain::Index`. The default functor is `CGAL::Null_functor` and corresponds to meshing the areas where the image values are greater than `iso_value`.

## Member Function Documentation

## ◆ operator()()

template<typename C3t3 , typename MeshDomain , typename Functor = CGAL::Null_functor>
template<typename OutputIterator >

OutputIterator CGAL::Construct_initial_points_gray_image< C3t3, MeshDomain, Functor >::operator() | ( | OutputIterator | pts,
|  | const int | n = `20`
| ) |  | const

constructs at least `n` points by collecting them on the surface of all subdomains in the image, even if they are not connected components.

Using this functor guarantees to initialize each connected component.

Template Parameters

  OutputIterator | model of `OutputIterator` for tuple-like objects containing a `Weighted_point_3` for the point an `int` for the minimal dimension of the subcomplexes on which the point lies a `MeshDomain::Index` for the corresponding subcomplex index
  MeshDomain | model of `MeshDomain_3`
  C3t3 | model of `MeshComplex_3InTriangulation_3`