indexToGrid {neuroim} | R Documentation |
Generic function to convert 1D indices to N-dimensional grid coordinates
Description
Generic function to convert 1D indices to N-dimensional grid coordinates
Usage
indexToGrid(x, idx)
## S4 method for signature 'BrainSlice,index'
indexToGrid(x, idx)
## S4 method for signature 'BrainSpace,index'
indexToGrid(x, idx)
## S4 method for signature 'BrainVector,index'
indexToGrid(x, idx)
## S4 method for signature 'BrainVolume,index'
indexToGrid(x, idx)
Arguments
x |
the object |
idx |
the 1D |
Value
a matrix of grid coordinates
Examples
bvol <- BrainVolume(array(0, c(10,10,10)), BrainSpace(c(10,10,10), c(1,1,1)))
idx <- 1:10
g <- indexToGrid(bvol, idx)
bvol[g]
[Package neuroim version 0.0.6 Index]