


brede_read_analyze - Reads an ANALYZE file
function Output = brede_read_analyze(filename, ...
PropertyName, PropertyValue)
Input: filename Filename, with or without the '.img' of
'.hdr' extension
Property: Output [ {Structure} | Volume | DataType | Endian
Header | Mat | Offset | Origin | Scale | Size ]
Size Volume dimension.
Datatype String with precision, for example 'uint16'
or 'float32'.
Endian [ {big} | little ]
FilenameHdr [ '' ] Filename of header. If the
.hdr filename is different from the .img
filename
Info [ {0} | Integer ] Amount of debug and
feedback information
Ordering [ {xyz} | xzy | yxz | yzx | zxy | zyx ]
Orientation [ rlpais | {lrpais} | lrapis | ... ]
Left-right, posterior-anterior,
inferior-superior is the default.
Origin Voxel index of the anterior commisure
Scale Scale value for the voxel values.
Output: Output Output according to 'Output' argument in
the input
This function will read an SPM ANALYZE file and return it as a
'Vol' structure.
When the 'Ordering' is 'xyz' the x-coordinate in the volume is
regarded to have the fastest running index, the y-coordinate
to second fastest and the z-coordinate the slowest running
index.
By default this function expects the orientation so that left
voxels are first in the file. It can be change with the
'orientation' property. If the file contains voxelsize
information, where the first element of the voxel size is
negative then 'rl' orientation will be assumed unless the
'orientation' property is set. (This case with negative voxel
size appear for SPM2 when one of its setup variables is set to
true: "defaults.analyze.flip = 1".)
Example:
filename = [ fileparts(which('spm')) '/canonical/single_subj_T1'];
T1 = brede_read_analyze(filename)
figure, brede_ta3_frame
brede_ta3_volslice(T1);
Ref: http://www.fil.ion.ucl.ac.uk/spm/distrib.html#AzeFmt
http://www.mayo.edu/bir/analyze/AnalyzeFileInfo.html
See also BREDE, BREDE_READ, BREDE_READ_ANALYZE4D,
BREDE_READ_VOLUMES, BREDE_WRITE_ANALYZE, BREDE_VOL,
BREDE_TA2_VOL, BREDE_TA3_VOLSURF, BREDE_TA3_VOLSLICE.
$Id: brede_read_analyze.m,v 1.26 2007/10/25 14:57:39 fn Exp $