| read.analyze.data | R Documentation |
Read ANALYZE 7.5 data from file.
read.analyze.data(filepath, header = NULL, drop_empty_dims = TRUE)
filepath |
character string, the path to the |
header |
optional ANALYZE 7.5 header as returned by |
drop_empty_dims |
logical, whether to drop empty dimensions in the returned data array, see
|
the data in the .img file of the pair, as an array (or a vector for 1D data). Note that the fields of
the header are not applied in any way: the data are returned exactly as they are stored in the file, in the
storage order of the format (the first dimension varies fastest, which is also the order used by R and by the
MGH/MGZ format), and the funused1 field that SPM uses as a scale factor is not applied (see
read.fs.volume.analyze if you want that).
read.analyze.header
hdrfile <- system.file("extdata", "analyze", "tiny_u8.hdr",
package = "freesurferformats", mustWork = TRUE
)
data <- read.analyze.data(hdrfile)
dim(data)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.