trimesh.voxel.morphology¶
Basic morphology operations that create new encodings.
Functions:
|
Encoding wrapper around scipy.ndimage.morphology.binary_closing. |
|
Encoding wrapper around scipy.ndimage.morphology.binary_dilation. |
|
Fill the given encoding using the specified implementation. |
|
Get elements on the surface of encoding. |
-
trimesh.voxel.morphology.
binary_closing
(encoding, **kwargs)¶ Encoding wrapper around scipy.ndimage.morphology.binary_closing.
-
trimesh.voxel.morphology.
binary_dilation
(encoding, **kwargs)¶ Encoding wrapper around scipy.ndimage.morphology.binary_dilation.
-
trimesh.voxel.morphology.
fill
(encoding, method='base', **kwargs)¶ Fill the given encoding using the specified implementation.
See fillers for available implementations or to add your own, e.g. via fillers[‘custom_key’] = custom_fn.
custom_fn should have signature (encoding, **kwargs) -> filled_encoding and should not modify encoding.
- Parameters
encoding (Encoding object (left unchanged)) –
method (method present in fillers.) –
**kwargs (additional kwargs passed to the specified implementation.) –
- Returns
- Return type
A new filled Encoding object.
-
trimesh.voxel.morphology.
surface
(encoding, structure=None)¶ Get elements on the surface of encoding.
A surface element is any one in encoding that is adjacent to an empty voxel.
- Parameters
encoding (Encoding or dense rank-3 array) –
structure (adjacency structure. If None, square connectivity is used.) –
- Returns
- Return type
new surface Encoding.