dvid.fetch.mesh_neuron

dvid.fetch.mesh_neuron(bodyid, scale='COARSE', step_size=1, bbox=None, parallel=False, progress=True, server=None, node=None, **kwargs)[source]

Create mesh for given neuron(s).

Parameters
  • bodyid (int | str | list-like) – Body ID(s) for which to generate mesh.

  • scale (int | "COARSE", optional) – Resolution of sparse volume starting with 0 where each level beyond 0 has 1/2 resolution of previous level. “COARSE” will return the volume in block coordinates.

  • step_size (int, optional) – Step size for marching cube algorithm. Higher values = faster but coarser.

  • bbox (list | None, optional) – Bounding box to which to restrict the meshing to. Must be in scale=0 coordinates. Format: [x_min, x_max, y_min, y_max, z_min, z_max].

  • parallel (bool | int) – Whether to run meshing in parallel on multiple cores if bodyid is more than one neuron. If parallel is integer will use that many cores. Otherwise defaults to half the available cores.

  • progress (bool) – Whether to show a progress bar when meshing multiple neurons.

  • server (str, optional) – If not provided, will try reading from global.

  • node (str, optional) – If not provided, will try reading from global.

  • **kwargs – Keyword arguments are passed through to dv.meshing.mesh_from_voxels.

Return type

trimesh.Trimesh

See also

get_meshes()

Use this to fetch precomputed meshes instead of making our own.