write.ANALYZE: I/O Functions

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/io.R

Description

Write a 4 dimensional datacube in ANALYZE file format.

Usage

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

Arguments

ttt

4 dimensional datacube

header

header information

filename

file name

Details

Writes the datacube ttt to a file named file in ANLYZE 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.

Value

Nothing is returned.

Author(s)

Karsten Tabelow tabelow@wias-berlin.de

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

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

neuroconductor/fmri documentation built on May 20, 2021, 4:28 p.m.