[Master Index] [Index for export/lyngby]

lyngby_read_analyze

(export/lyngby/lyngby_read_analyze.m)


Function Synopsis

Output = lyngby_read_analyze(filename, arg1, arg2, arg3, ...

Help text

 lyngby_read_analyze  - Reads an ANALYZE file

       function V = lyngby_read_analyze(filename, PropertyName, ...
          PropertyValue) 

       Input:    filename  Filename, with or without the '.img' of
                           '.hdr' extension

       Property: Output    [ {Volume} | Size | DataType | Endian |
                           GuessFileNo | Offset | Origin | Scale |
                           VoxelDim | structure ] 
                 Size      Volume dimension. 
                 Datatype  String with precision, for example 'uint16'
                           or 'float32'. 
                 FilenameIndex  {1}
                 Endian    [ {big} | little ] Byteordering
                 Ordering  [ {xyz} | xzy | yxz | yzx | zxy | zyx ]
                 Orientation [ {lrpais} | lrapsi | lrapis | ... ]
                 VoxelMask 
 
       Output:   Output    Output according to 'Output' argument in 
                           the input

       This function reads in an ANALYZE file(s). It is able to
       return the volume from the .img-file as a vector, and it is
       able to return some of the information from the .hdr-file.

       The orientation cannot be read from the ANALYZE file. Two
       different standards exist: The 'original' where right is
       first in the file, and the 'spm' where left is first in the
       file.

       SPM type of scale and offset is read and returned and cannot
       be changed from the properties.

       Example:
         % If SPM99 is in the path
         filename = [fileparts(which('spm')) '/templates/T1'];

         % Read in the volume as a vector
         T1 = lyngby_read_analyze(filename);

         % Read in the size of the volume
         siz = lyngby_read_analyze(filename, 'output', 'size');

         % Reshape and plot
         T1 = reshape(T1, siz');
         figure, imagesc(squeeze(T1(:,:,40)));

       Ref:    http://www.fil.ion.ucl.ac.uk/spm/distrib.html#AzeFmt
               http://www.mayo.edu/bir/analyze/AnalyzeFileInfo.html
 
       See also LYNGBY, LYNGBY_WRITE_ANA, LYNGBY_READ_SDT,
                LYNGBY_READ_VAPET, LYNGBY_READ_ANA4D.

 $Id: lyngby_read_analyze.m,v 1.15 2006/06/22 15:00:15 fn Exp $    

Cross-Reference Information

This function calls
This function is called by

Produced by mat2html on Wed Jul 29 15:43:40 2009
Cross-Directory links are: OFF