navis.simplify_mesh¶
- navis.simplify_mesh(x, F, backend='auto', inplace=False, **kwargs)[source]¶
Simplify meshes (TriMesh, MeshNeuron, Volume).
- Parameters:
x (navis.MeshNeuron/List | navis.Volume | trimesh.Trimesh) – Mesh(es) to simplify.
F (float | int) – Determines how much the mesh is simplified: Floats (0-1) are interpreted as ratio. For example, an F of 0.5 will reduce the number of faces to 50%. Integers (>1) are intepreted as target face count. For example, an F of 5000 will attempt to reduce the number of faces to 5000.
backend ("auto" | "pyfqmr" | "open3d" | "blender" | "pymeshlab") – Which backend to use. Currenly we support
pyfqmr
,open3d
, Blender 3D andpymeshlab
.inplace (bool) – If True, will perform simplication on
x
. If False, will simplify and return a copy.**kwargs – Keyword arguments are passed through to the respective backend’s functions (see below).
parallel (bool) – If True and input is NeuronList, use parallel processing. Requires pathos.
n_cores (int, optional) – Numbers of cores to use if
parallel=True
. Defaults to half the available cores.progress (bool) – Whether to show a progress bar. Overruled by
navis.set_pbars
.omit_failures (bool) – If True will omit failures instead of raising an exception. Ignored if input is single neuron.
- Returns:
Simplified object.
- Return type:
simplified
See also
navis.downsample_neuron()
Downsample all kinds of neurons.
navis.meshes.simplify_mesh_fqmr()
pyfqmr implementation for mesh simplification.
navis.meshes.simplify_mesh_open3d()
Open3D implementation for mesh simplification.
navis.meshes.simplify_mesh_pyml()
PyMeshLab implementation for mesh simplification.
navis.meshes.simplify_mesh_blender()
Blender 3D implementation for mesh simplification.