Compute a 3D triangle mesh from content of the reconstruction volume.
More...
|
typedef int | reme_surface_t |
| Handle referencing a surface object.
|
|
reme_error_t | reme_surface_create (reme_context_t c, reme_surface_t *s) |
| Create a new surface object.
|
|
reme_error_t | reme_surface_destroy (reme_context_t c, reme_surface_t *s) |
| Destroy a previously created surface object.
|
|
reme_error_t | reme_surface_bind_generation_options (reme_context_t c, reme_surface_t s, reme_options_t o) |
| Access the surface generation options.
|
|
reme_error_t | reme_surface_bind_poisson_options (reme_context_t c, reme_surface_t s, reme_options_t o) |
| Access the poisson reconstruction options.
|
|
reme_error_t | reme_surface_bind_decimation_options (reme_context_t c, reme_surface_t s, reme_options_t o) |
| Access the surface decimation options.
|
|
reme_error_t | reme_surface_generate (reme_context_t c, reme_surface_t s, reme_volume_t v) |
| Extract the iso-surface from the given volume.
|
|
reme_error_t | reme_surface_poisson (reme_context_t c, reme_surface_t s) |
| Perform poisson reconstruction on the extracted surface.
|
|
reme_error_t | reme_surface_decimate (reme_context_t c, reme_surface_t s) |
| Decimate the extracted surface.
|
|
reme_error_t | reme_surface_transform (reme_context_t c, reme_surface_t s, const float *coordinates) |
| Transform the surface.
|
|
reme_error_t | reme_surface_get_points (reme_context_t c, reme_surface_t s, const float **coordinates, int *length) |
| Get points of a surface.
|
|
reme_error_t | reme_surface_get_normals (reme_context_t c, reme_surface_t s, const float **coordinates, int *length) |
| Get point normals of a surface.
|
|
reme_error_t | reme_surface_get_triangles (reme_context_t c, reme_surface_t s, const unsigned int **indices, int *length) |
| Get triangle faces of a surface.
|
|
reme_error_t | reme_surface_save_to_file (reme_context_t c, reme_surface_t s, const char *filename) |
| Export the surface to file.
|
|
Compute a 3D triangle mesh from content of the reconstruction volume.
This modules provides methods to generate triangle meshes from reconstruction volumes. Besides basic surface extraction, hole closing and decimation functionality is provided.
The example below illustrates the functionality.
Handle referencing a surface object.
A reme_surface_t represents a 3D mesh surface extracted from a volume. Its associated methods allow to influence the generation process, access mesh data and save volumes using our exporters.
Access the surface generation options.
- Associated Protocol Buffers Specification
message generation_options {
optional bool merge_duplicate_vertices = 1 [default = true];
optional float merge_radius = 2 [default = 0.1];
}
- Parameters
-
c | A valid context object |
s | A valid surface object |
o | A valid options binding object |
- Return values
-
- Examples:
- example_reconstructmesdk_surface.cpp.
Access the poisson reconstruction options.
- Associated Protocol Buffers Specification
message poisson_options {
optional int32 depth = 1 [default = 8];
optional int32 solver_divide = 2 [default = 8];
optional int32 iso_divide = 3 [default = 8];
optional int32 minimum_samples_per_node = 4 [default = 1];
optional float scale = 5 [default = 1.25];
optional bool enable_manifold = 6 [default = true];
optional int32 minimum_depth = 7 [default = 5];
}
- Parameters
-
c | A valid context object |
s | A valid surface object |
o | A valid options binding object |
- Return values
-
- Examples:
- example_reconstructmesdk_options_type_safe.cpp, and example_reconstructmesdk_surface.cpp.
Access the surface decimation options.
- Associated Protocol Buffers Specification
message decimation_options {
optional int32 maximum_faces = 1 [default = 100000];
optional float maximum_quadric_error = 2 [default = 100000];
optional float minimum_triangle_roundness = 3 [default = 0];
optional float maximum_angle_error = 4 [default = 90];
optional bool preserve_boundary = 5 [default = false];
}
- Parameters
-
c | A valid context object |
s | A valid surface object |
o | A valid options binding object |
- Return values
-
- Examples:
- example_reconstructmesdk_surface.cpp.
Transform the surface.
This will transform the points and normals of the surface.
- Parameters
-
c | A valid context object |
s | A valid surface object |
coordinates | A pointer to constant Transform data. |
- Return values
-
- Examples:
- example_reconstructmesdk_surface.cpp.
Get points of a surface.
The surface points are represented as an array of floats where each point consists of 4 coordinates Px Py Pz Pw Px Py Pz Pw ...
. The w component is always zero.
Note the i-th point starts at index i * 4
of coordinate array returned.
- Memory Management Rules Exception
The returned coordinates pointer remains valid until the mesh changes.
- Parameters
-
c | A valid context object |
s | A valid surface object |
coordinates | A mutable pointer to constant point data. |
length | The number of coordinates returned. To get the number of points divide this value by 4. |
- Return values
-
Get point normals of a surface.
The surface point normals are represented as an array of floats where each point consists of 4 coordinates Px Py Pz Pw Px Py Pz Pw ...
. The w component is always zero.
Note the i-th point normal starts at index i * 4
of coordinate array returned.
- Memory Management Rules Exception
The returned coordinates pointer remains valid until the mesh changes.
- Parameters
-
c | A valid context object |
s | A valid surface object |
coordinates | A mutable pointer to constant point normal data. |
length | The number of coordinates returned. To get the number of point normals divide this value by 4. |
- Return values
-
Get triangle faces of a surface.
The triangle faces are represented as an array of unsigned integers (point indice s) where each triangle consists of 3 indices that represent that points that make up each face P0 P1 P2 P0 P1 P2 ...
.
Note the i-th triangle starts at index i * 3
of index array returned.
- Memory Management Rules Exception
The returned indices pointer remains valid until the mesh changes.
- Parameters
-
c | A valid context object |
s | A valid surface object |
indices | A mutable pointer to constant triangle index data. |
length | The number of indices returned. To get the number of triangles divide this value by 3. |
- Return values
-