Look up the segmentation body id at each 3D point. Thin wrapper
around malevnc::manc_xyz2bodyid that targets the
active fish2 DVID node. Input may be in emraw (default), raw, nm or
microns; see fish_coords for what each means.
Usage
fish_xyz2bodyid(
xyz,
units = c("emraw", "raw", "nm", "microns"),
node = "neutu",
cache = FALSE
)Arguments
- xyz
Point coordinates: a length-3 numeric vector for a single point, an Nx3 numeric matrix / data.frame, or anything else accepted by
xyzmatrix(including"x,y,z"strings).- units
Units of the input coordinates.
"emraw"(the default) matches coordinates copied from neuroglancer URLs against the fish2 EM imagery;"raw"matches the neuprint segmentation grid;"nm"and"microns"are self-explanatory. Seefish_coordsfor the underlying voxel sizes.- node
The DVID node (UUID) to query. The default
"neutu"uses the active neutu node, normally the most up-to-date.- cache
Whether to cache the result of this call for 5 minutes (default
FALSE).
Value
A character vector of body ids, one per input point.
NA_character_ where the input row had any NA.
Details
The DVID segmentation/labels endpoint accepts coordinates
on the neuprint (16, 16, 15) "raw" grid, so input coordinates are first
converted to raw via fish_coords and then rounded to
integer voxel positions before the call (as in manc_xyz2bodyid).
Points with NA coordinates yield NA_character_ in the
output.
See also
fish_neuprint_meta, fish_coords,
malevnc::manc_xyz2bodyid
Other coords:
fish_coords()