Skip to content

Function: readVec() ​

ts
function readVec(fileName, options?): Promise<BigNeuroVec>;

Defined in: src/io/io.ts:429

Read a 4D neuroimaging vector from file.

The file is read and decompressed once and held in memory; nothing is written to disk. The result keeps the legacy time-first shape (dim = [T, X, Y, Z], getAt(i, j, k, t)); its spatial geometry, including the full affine, is available as volumeSpace and on every getVolume(t).

The time axis of space gets pixdim[4] (the TR) as its spacing when the header has a finite positive value, else 1.

useBigVec is accepted for compatibility and no longer changes behaviour. mask is currently ignored.

Parameters ​

fileName ​

string

options? ​

indices? ​

number[]

mask? ​

LogicalNeuroVol

useBigVec? ​

boolean

onProgress? ​

(progress) => void

Returns ​

Promise<BigNeuroVec>

Released under the MIT License.