The neuroim package

The neuroim package

The neuroim package is a library of S4 classes and functions supporting neuroimaigng analysis in R. It contains data structures for 3D and 4D images and rotines for reading and writing NIFTI formatted images. It currently has experimental/limited support for reading AFNI formatted images.

A brief summary of most important functions is below. More extended documentation can be found in the associated vignettes.

loading an image volume

loadVolume

example:

loadVolume("example.nii")

writing an image volume to disk

writeVolume

example:

writeVolume(vol, "example.nii")

loading a 4-dimensional image (e.g. for fMRI)

loadVector

example:

loadVector("example_4d.nii")

writing a 4-dimensional image (e.g. for fMRI)

writeVector

example:

writeVector(bvec, "example_4d.nii")

extract a time-series from a single voxel in a 4-dimensional image

series

example: series(bvec, 12,12,12) ## voxel coordinates are [12,12,12] in grid units starting at [1,1,1]