f.read.analyze.slice {AnalyzeFMRI}R Documentation

read one slice from a .img file

Description

Reads in a specific slice from an ANALYZE .img image format file into an array.

Usage

f.read.analyze.slice(file, slice, tpt)

Arguments

file

The .img file to be read from

slice

The number of the slice (assumed to be the 3rd dimension)

tpt

The number of the scan that the slice is to be taken from

Details

The entire dataset is assumed to be 4D and a slice is extracted that is referenced by specifying the last two dimensions of the dataset i.e.slice and tpt.

Value

An array containing the slice

See Also

f.read.analyze.slice.at.all.timepoints, f.read.analyze.ts, f.read.analyze.volume

Examples

a<-f.read.analyze.slice(system.file("example.img", package="AnalyzeFMRI"),10,1)
dim(a)

[Package AnalyzeFMRI version 1.1-23 Index]