| analyzeheader.for.data | R Documentation |
Create ANALYZE 7.5 header suitable for given data.
analyzeheader.for.data(analyzedata, ...)
analyzedata |
array of numeric (integer or double) data, can have up to 7 dimensions. |
... |
extra parameters passed on to |
an ANALYZE 7.5 header (see analyzeheader.template) in which the datatype, bitpix,
dim, cal_min and cal_max fields have been set to values suitable for the given data. Feel free to change
the other fields, e.g. the voxel sizes in pix_dim or the orient code.
ANALYZE 7.5 has much fewer data types than NIFTI: integers are stored as 32 bit signed integers and floating
point data as 32 bit floats, which is what this function selects (the same choice that
ni1header.for.data makes for NIFTI v1). To store 16 bit integers, which is the classic ANALYZE
data type, set datatype to 4L and bitpix to 16L in the returned header after calling this function.
analyzeheader <- analyzeheader.for.data(array(1:24, dim = c(4, 3, 2)))
analyzeheader$datatype
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.