Skip to content

Function: roiFromCoords() ​

ts
function roiFromCoords(
   space, 
   coords, 
   data?): ROICoords | ROIVol;

Defined in: src/roi/ROI_factories.ts:314

Creates an ROI from a set of coordinates.

Parameters ​

space ​

NeuroSpace

The NeuroSpace defining the coordinate system

coords ​

number[][]

Array of [i, j, k] coordinates

data? ​

TypedArray | number[]

Optional data values for each coordinate. If not provided, fills with 1

Returns ​

ROICoords | ROIVol

An ROIVol or ROICoords depending on whether data is provided

Released under the MIT License.