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

grid_to_indexR Documentation

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

Description

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

Usage

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 Nov. 3, 2024, 9:31 a.m.