Home > fmri > utils > old > GE2SPM.orig > QA.m

QA

PURPOSE ^

SYNOPSIS ^

function dater = QA(inDir)

DESCRIPTION ^

 QA(inDir)

 Souheil J. Inati  
 Dartmouth College 2000

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function dater = QA(inDir)
0002 %
0003 % QA(inDir)
0004 %
0005 % Souheil J. Inati
0006 % Dartmouth College 2000
0007 
0008 % Create the name of the first file in inDir
0009 firstfile = fullfile(inDir,'I.001');
0010 
0011 % Read the header
0012 [su_hdr,ex_hdr,se_hdr,im_hdr,pix_hdr,im_offset] = GE_readHeader(firstfile);
0013 
0014 nX =  im_hdr.imatrix_X; % X Voxels
0015 nY =  im_hdr.imatrix_Y; % Y Voxels
0016 nZ =  im_hdr.slquant;   % Z Voxels
0017 volSize = [nX nY nZ];
0018 adwcount = im_hdr.user9;
0019 
0020 % Loop over the volumes until there is no more looping to be done.
0021 
0022 % Loop over the passes (volumes)
0023 % Initialize
0024 done = 0;
0025 imageVol = zeros(nX,nY,nZ);
0026 dater = zeros(nX,nY,nZ,adwcount);
0027 for i = 1:adwcount
0028   % Read in the volume
0029   [imageVol, lastfile] = GE_readVolume(inDir, i+1, volSize, 16, im_offset);
0030   dater(:,:,:,i) = imageVol;
0031   % Done with vol
0032   fprintf('read %s\n',lastfile);
0033 
0034 end % Run loop
0035 
0036 return

Generated on Wed 20-Sep-2023 04:00:50 by m2html © 2003