Learn R Programming

AnalyzeFMRI (version 1.1-16)

fps2diminfo: fps2diminfo

Description

Encode freq.dim, phase.dim and slice.dim fields into the one byte dim.info field of a NIFTI header file.

Usage

fps2diminfo(freq.dim,phase.dim,slice.dim)

Arguments

freq.dim

freq.dim field of a NIFTI file

phase.dim

phase.dim field of a NIFTI file

slice.dim

slice.dim field of a NIFTI file

Value

A list containing dim.info field.

A few fields are provided to store some extra information that is sometimes important when storing the image data from an FMRI time series experiment. (After processing such data into statistical images, these fields are not likely to be useful.)

freq_dim = These fields encode which spatial dimension (1,2, or 3) phase_dim = corresponds to which acquisition dimension for MRI data. slice_dim = Examples: Rectangular scan multi-slice EPI: freq_dim = 1 phase_dim = 2 slice_dim = 3 (or some permutation) Spiral scan multi-slice EPI: freq_dim = phase_dim = 0 slice_dim = 3 since the concepts of frequency- and phase-encoding directions don't apply to spiral scan

The fields freq_dim, phase_dim, slice_dim are all squished into the single byte field dim_info (2 bits each, since the values for each field are limited to the range 0..3). This unpleasantness is due to lack of space in the 348 byte allowance.

See Also

diminfo2fps

Examples

Run this code
# NOT RUN {
dim.info <- f.read.header(system.file("example-nifti.hdr", package="AnalyzeFMRI"))$dim.info
mylist <- diminfo2fps(dim.info)
fps2diminfo(mylist$freq.dim,mylist$phase.dim,mylist$slice.dim)
# }

Run the code above in your browser using DataLab