Extract Coordinates from an IndexLookupVol Object
Source:R/index_vol.R, R/roi.R, R/sparse_neurovec.R
coords-methods.RdExtracts the coordinates from an IndexLookupVol object based on a given index.
Arguments
- x
An
IndexLookupVolobject to extract coordinates from- i
The index into the lookup volume
- real
if
TRUE, return coordinates in real world units
Examples
space <- NeuroSpace(c(64, 64, 64), c(1, 1, 1), c(0, 0, 0))
ilv <- IndexLookupVol(space, c(1:100))
coords(ilv, 1) # Extract coordinates for index 1
#> [,1] [,2] [,3]
#> [1,] 1 1 1