\( \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.8 - 3D Mesh Generation

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
List of all members
CGAL::Gray_image_mesh_domain_3< Image, BGT, Image_word_type > Class Template Reference
Domain Classes

`#include <CGAL/Gray_image_mesh_domain_3.h>`

## Definition

The class `Gray_image_mesh_domain_3` implements a domain described by a 3D gray image.

A 3D gray image is a grid of voxels, where each voxel is associated with a gray level value. This class is a model of the concept `MeshDomain_3`. The domain to be discretized is the union of voxels that lie inside a surface described by an isolevel value, called isovalue. The voxels lying inside the domain have gray level values that are larger than the isovalue.

This class includes a member function that provides, by interpolation, a gray level value at any query point. An intersection between a segment and bounding surfaces is detected when both segment endpoints are associated with gray level values which are on both sides of the isovalue. The intersection is then constructed by bisection. The bisection stops when the query segment is shorter than a given error bound `e`. This error bound is given by `e=d` \( \times\)`bound` where `d` is the length of the diagonal of the bounding box (in world coordinates) and `bound` is the argument passed to the constructor of `Labeled_image_mesh_domain_3`.

Template Parameters

  Image | is the type of the input image. This parameter must be a model of the concept `LabeledImage_3`.
  BGT | is a geometric traits class which provides the basic operations to implement intersection tests and intersection computations through a bisection method. This parameter must be instantiated with a model of the concept `BisectionGeometricTraits_3`.
  Image_word_type | is the data type encoded in the `Image` input file

Is Model Of:
  `MeshDomain_3`

See Also
  `BisectionGeometricTraits_3`
  `CGAL::make_mesh_3()`.

Examples:
  Mesh_3/mesh_3D_gray_image.cpp.

## Creation
| Gray_image_mesh_domain_3 (const Image &image, const Image_word_type iso_value, const Image_word_type value_outside=0., const BGT::FT &error_bound=BGT::FT(1e-3))
| Construction from an image. More...

## Constructor & Destructor Documentation

template<typename Image , typename BGT , typename Image_word_type >

CGAL::Gray_image_mesh_domain_3< Image, BGT, Image_word_type >::Gray_image_mesh_domain_3 | ( | const Image & | image,
|  | const Image_word_type | iso_value,
|  | const Image_word_type | value_outside = `0.`,
|  | const BGT::FT & | error_bound = `BGT::FT(1e-3)`
| ) |  |

Construction from an image.

The object to be meshed is described by the voxels that have a gray-level value higher than the input isovalue.

Parameters

  image | the input image
  iso_value | the isovalue, inside `image`, of the surface describing the boundary of the object to be meshed.
  value_outside | the value attached to voxels outside of the domain to be meshed. It should be lower than `iso_value`
  error_bound | is relative to the size of the image.