Skip to contents

fanc_voxdims returns the image voxel dimensions which are normally used to scale between raw and nm coordinates.

banc_voxdims returns the image voxel dimensions for the BANC which are normally used to scale between raw and nm coordinates.

Usage

fanc_voxdims(url = choose_fanc(set = FALSE)[["fafbseg.sampleurl"]])

banc_voxdims(url = choose_banc(set = FALSE)[["fafbseg.sampleurl"]])

fanc_nm2raw(x, vd = fanc_voxdims())

fanc_raw2nm(x, vd = fanc_voxdims())

banc_raw2nm(x, vd = banc_voxdims())

banc_nm2raw(x, vd = banc_voxdims())

Arguments

url

Optional neuroglancer URL containing voxel size. Defaults to getOption("fafbseg.sampleurl") as set by choose_fanc.

x

3D coordinates in any form compatible with xyzmatrix

vd

The voxel dimensions in nm. Expert use only. Normally found automatically.

Value

For fanc_voxdims A 3-vector

for fanc_raw2nm and fanc_nm2raw an Nx3 matrix of coordinates

Details

relies on nat >= 1.10.4

Examples

fanc_voxdims()
#> [1]  4.3  4.3 45.0
#> attr(,"units")
#> [1] "nm"
fanc_raw2nm(c(159144, 22192, 3560))
#>             X       Y      Z
#> [1,] 684319.2 95425.6 160200
fanc_raw2nm('159144 22192 3560')
#>             X       Y      Z
#> [1,] 684319.2 95425.6 160200
if (FALSE) { # \dontrun{
fanc_nm2raw(clipr::read_clip())
} # }