grid_to_index-methods: Generic function to convert N-dimensional grid coordinate to...

Description Usage Arguments Value

Description

Generic function to convert N-dimensional grid coordinate to 1D indices

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
grid_to_index(x, coords)

## S4 method for signature 'NeuroSlice,matrix'
grid_to_index(x, coords)

## S4 method for signature 'NeuroSlice,numeric'
grid_to_index(x, coords)

## S4 method for signature 'NeuroSpace,matrix'
grid_to_index(x, coords)

## S4 method for signature 'NeuroSpace,numeric'
grid_to_index(x, coords)

## S4 method for signature 'NeuroVol,matrix'
grid_to_index(x, coords)

## S4 method for signature 'NeuroVol,numeric'
grid_to_index(x, coords)

Arguments

x

the object, typically a NeuroVol or NeuroSpace instance.

coords

a matrix where each row is a coordinate or a vector of length equal to ndim(x)

Value

a vector of indices


bbuchsbaum/neuroim2 documentation built on Dec. 3, 2019, 12:12 p.m.