Learn R Programming

fmri (version 1.9.12.1)

write.ANALYZE: I/O Functions

Description

Write a 4 dimensional datacube in ANALYZE file format.

Usage

write.ANALYZE(ttt, header=NULL, filename)

Value

Nothing is returned.

Arguments

ttt

4 dimensional datacube

header

header information

filename

file name

Author

Karsten Tabelow tabelow@wias-berlin.de

Details

Writes the datacube ttt to a file named file in ANALYZE file format. header is a list that contains the header information as documented by the Mayo Foundation. We give here a short summary. If a value is not provided, it will be tried to fill it with reasonable defaults, but do not expect fine results, if the entry has a special important meaning (h.i. pixdim).

[1]datatype1 -- 10 byte character[2]dbname -- 18 byte character
[3]extents -- integer[4]sessionerror -- integer
[5]regular -- character[6]hkey -- character
[7]dimension -- 8 integers, dimensions ...[8]unused -- 7 integers
[9]datatype -- integer, datatype usually "4"[10]bitpix -- integer
[11]dimun0 -- integer[12]pixdim -- 8 floats, voxel dimensions ...
[13]voxoffset -- float[14]funused -- 3 floats
[15]calmax -- float[16]calmin -- float
[17]compressed -- float[18]verified -- float
[19]glmax -- integer[20]glmin -- integer
[21]describ -- 80 byte character[22]auxfile -- 24 byte character
[23]orient -- character[24]originator -- 5 integers
[25]generated -- 10 byte character[26]scannum -- 10 byte character
[27]patientid -- 10 byte character[28]expdate -- 10 byte character
[29]exptime -- 10 byte character[30]histun0 -- 3 byte character
[31]views -- integer[32]voladded -- integer
[33]startfield -- integer[34]fieldskip -- integer
[35]omax -- integer[36]omin -- integer
[37]smax -- integer[38]smin -- integer

See ANALYZE documentation for details.

References

Polzehl, J. and Tabelow, K. (2007) fmri: A Package for Analyzing fmri Data, R News, 7:13-17 .

See Also

read.ANALYZE, write.AFNI

Examples

Run this code
## Example 1
write.ANALYZE(array(as.integer(65526*runif(10*10*10*20)),c(10,10,10,20)),
              file=file.path(tempdir(),"analyzefile"))

Run the code above in your browser using DataLab