Skip to contents

Extracts the masked time series of one or more neuroim2::NeuroVec runs and builds an fmridataset::fmri_frame() whose feature space is the fmridataset::volume_space() described by mask. Voxel time series are read with neuroim2::series(), so a SparseNeuroVec does not need to be densified.

Usage

neurovec_frame(
  scans,
  mask,
  TR,
  run_length = NULL,
  event_table = NULL,
  censor = NULL,
  assay = "bold"
)

Arguments

scans

A NeuroVec, or a list of them, one per run.

mask

A neuroim2::LogicalNeuroVol (or a NeuroVol whose non-zero voxels form the mask) on the same 3D grid as scans.

TR

Repetition time in seconds; one value, or one per run.

run_length

Volumes per run; defaults to the fourth dimension of each scan.

event_table, censor

As in matrix_frame().

assay

Name of the assay.

Value

An fmri_frame over a volume_space.