extract.roi: Extract an ROI from an image timeseries using a mask. Expects...

Description Usage Arguments Examples

Description

Extract an ROI from an image timeseries using a mask. Expects an image in the format of NIFTI file. If it's not, we get trouble.

Usage

1
extract.roi(img.ts, roi.mask)

Arguments

img.ts

a 4D image timeseries from which to extract the mask

roi.mask

the roi mask to use to extract the file.

Examples

1
2
3
4
5
6
image.filename <- system.file("extdata", "haxby2001subj1bold.nii.gz", package = "mvpa")
mask.filename <- system.file("extdata", "haxby2001subj1mask.nii.gz", package = "mvpa")
fmri.image <- read.image(image.filename)
mask.image <- read.image(mask.filename)
roi.data <- extract.roi(fmri.image,mask.image)
summary(roi.data)

bjsmith/r-mvpa documentation built on May 30, 2019, 11:53 a.m.