fanc_xyz2id: Convert xyz locations to root or supervoxel ids

View source: R/ids.R

fanc_xyz2idR Documentation

Convert xyz locations to root or supervoxel ids

Description

Convert xyz locations to root or supervoxel ids

Usage

fanc_xyz2id(
  xyz,
  rawcoords = FALSE,
  voxdims = c(4.3, 4.3, 45),
  root = TRUE,
  ...
)

Arguments

xyz

One or more xyz locations as an Nx3 matrix or in any form compatible with xyzmatrix including neuron or mesh3d surface objects.

rawcoords

whether the input values are raw voxel indices or in nm

voxdims

The voxel dimensions (in nm). See details.

root

Whether to return the root id of the whole segment rather than the supervoxel id.

...

additional arguments passed to pbapply when 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 FANC. 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.

Value

A character vector of segment ids, NA when lookup fails.

See Also

flywire_xyz2id

Other fanc-ids: fanc_cellid_from_segid(), fanc_ids(), fanc_islatest(), fanc_latestid(), fanc_leaves(), fanc_rootid()

Examples

# a point from neuroglancer, should map to 648518346498932033
fanc_xyz2id(cbind(34495, 82783, 1954), rawcoords=TRUE)

flyconnectome/fanc documentation built on Sept. 6, 2024, 9:56 a.m.