Learn R Programming

FIACH (version 0.1.2)

readNii: Input function for fmri data

Description

This function reads 4D and 3d nifti and nifti files

Usage

readNii(input,fourD=TRUE)

Arguments

input
A character vector containing a single string or multiple strings. If multiple strings are provided the data is concatenated and is assumed to be from the same session. The data can be in 4d.nii format or .img and .hdr pairs. If input input is in .img/.hdr pair only the .img file need be specified
fourD
If set to false nii objects are returned for each image.

Value

A 4D array is returned with time being the fourth dimension

Examples

Run this code
file<-system.file("extdata","motion_ex.nii.gz",package="FIACH")
func<-readNii(file)

Run the code above in your browser using DataLab