Learn R Programming

fmri (version 1.0)

read.ANALYZE: I/O Functions

Description

Read fMRI data from ANALYZE file(s).

Usage

read.ANALYZE(prefix = "", numbered = FALSE, postfix = "",
             picstart = 1, numbpic = 1)

Arguments

prefix
string. part of the file name before the number
numbered
logical. if FALSE only prefix is taken as file name (default).
postfix
string. part of the file name after the number
picstart
number of the first image to be read.
numbpic
number of images to be read

Value

  • Object of class "fmridata" with the following list entries:
  • tttfour dimensional data cube, the first three dimensions are voxel dimensions, the fourth dimension denotes the time
  • headerheader information of the data
  • formatdata source. string "ANALYZE"
  • deltavoxel size in mm
  • originposition of the datacube origin
  • orientdata orientation code
  • dimdimension of the datacube
  • weightsweights vector coding the relative voxel sizes in x, y, z-direction
  • maskhead mask

Details

This function reads fMRI data files in ANALYZE format. It takes the strings in prefix and postfix and a number of the form "007" in between to create the file name.

If numbered is FALSE, only the string in prefix is used for file name (default).

The number is assumed to be 3 digits (including leading zeros). First number is given in picstart, while numbpic defines the total number of images to be read. Data in multiple files will be combined into a four dimensional datacube.

References

Biomedical Imaging Resource (2001). Analyze Program. Mayo Foundation.

See Also

write.ANALYZE, read.AFNI

Examples

Run this code
analyze <- read.ANALYZE("analyze",TRUE,"file",31,107)

Run the code above in your browser using DataLab