Convert xyz locations to CRANT root or supervoxel ids
Usage
crant_xyz2id(
xyz,
rawcoords = FALSE,
root = TRUE,
integer64 = FALSE,
fast_root = TRUE,
method = c("cloudvolume", "spine"),
...
)Arguments
- xyz
One or more xyz locations as an Nx3 matrix or in any form compatible with
xyzmatrixincludingneuronormesh3dsurface objects.- rawcoords
whether the input values are raw voxel indices or in nm
- root
Whether to return the root id of the whole segment rather than the supervoxel id.
- integer64
Whether to return ids as integer64 type (more compact but a little fragile) rather than character (default
FALSE).- fast_root
Whether to use a fast but two-step look-up procedure when finding roots. This is strongly recommended and the alternative approach has only been retained for validation purposes.
- method
Whether to use the spine transform-service API or cloudvolume for lookup.
"auto"is presently a synonym for"spine".- ...
additional arguments passed to
pbapplywhen looking up multiple positions.
Details
This used to be very slow because we do not have a supervoxel field on spine.
I am somewhat puzzled by the voxel dimensions for crant. Neuroglancer clearly shows voxel coordinates of 4.3x4.3x45. But in this function, the voxel coordinates must be set to 4.25 in x-y to give the correct answers.
See also
Other crant-ids:
crant_islatest(),
crant_latestid(),
crant_leaves(),
crant_rootid()
Examples
if (FALSE) { # \dontrun{
# a point from neuroglancer, should map to 576460752684030043
crant_xyz2id(cbind(37306, 31317, 1405), rawcoords=TRUE)
} # }