dvid.fetch.snap_to_body

dvid.fetch.snap_to_body(bodyid, positions, server=None, node=None)[source]

Snap a set of positions to the closest voxels on a given body.

Parameters
  • bodyid (body ID) – Body for which to find positions.

  • positions (array-like) – List/Array of (x, y, z) raw(!) coordinates.

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

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

Return type

(x, y, z)