openalea.phenomenal.mesh.algorithms.meshing

openalea.phenomenal.mesh.algorithms.meshing(image_3d, smoothing_iteration=0, reduction=0.0, verbose=False)[source]

Build a polygonal mesh representation (= list of vertices and faces) from a 3d image (= numpy array 3D).

More, some option, is available to smooth the 3D object representation and reduce the number triangle.

Firstly :
A marching cubes algorithm is apply to compute the polygonal mesh.
Secondly :
A smoothing algorithm is apply according the number of iteration given
Thirdly :
A mesh decimation algorithm is apply according the percentage of reduction given.
Parameters:
  • image_3d (3D numpy array) – 3D Array with positive values
  • smoothing_iteration (int, optional) – Number of iteration for smoothing
  • reduction (float, optional) – Center position of the first original voxel, who will be split. 0 and 1
  • verbose (bool, optional) – If True, print for some information of each part of the algorithms
Returns:

  • vertices ([(x, y, z), …]) – Spatial coordinates for unique mesh vertices.
  • faces ([(V1, V2, V3), …]) – Define triangular faces via referencing vertex indices from vertices. This algorithm specifically outputs triangles, so each face has exactly three indices