dvid.fetch.skeletonize_neuron

dvid.fetch.skeletonize_neuron(bodyid, scale=4, server=None, node=None, progress=True, **kwargs)[source]

Skeletonize given body.

Fetches voxels from DVID, creates a mesh (via mesh_neuron) and then skeletonizes it. This can be useful if the precomputed skeletons are not up-to-date or have incorrect topology. This function requires skeletor to be installed:

pip3 install skeletor
Parameters
  • bodyid (int | str | trimesh) – ID of body for which to generate skeleton.

  • scale (int | "COARSE") – Resolution of sparse volume to use for skeletonization. Lower = higher res. Higher resolutions tend to produce more accurate but also more noisy (e.g. tiny free-floating fragments) skeletons. In my experience, scale=”COARSE” for quick & dirty and scale=4 for high-quality skeletons make the most sense. Scales 5 and 6 are too coarse, and below 3 becomes prohibitively slow.

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

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

  • progress (bool) – Whether to show progress bars.

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

Returns

In “nm” coordinates.

Return type

skeletor.Skeleton

See also

dvid.get_skeletons()

To download precomputed skeletons.