0001 function status = QA(inDir)
0002
0003
0004
0005
0006
0007
0008
0009 firstfile = fullfile(inDir,'I.001');
0010
0011
0012 [su_hdr,ex_hdr,se_hdr,im_hdr,pix_hdr,im_offset] = GE_readHeader(firstfile);
0013
0014 nX = im_hdr.imatrix_X;
0015 nY = im_hdr.imatrix_Y;
0016 nZ = im_hdr.slquant;
0017 volSize = [nX nY nZ];
0018 adwcount = im_hdr.user9;
0019
0020
0021
0022
0023
0024 done = 0;
0025 imageVol = zeros(nX,nY,nZ);
0026 vec = zeros(adwcount,1);
0027
0028 xa = floor(nX/2-15);
0029 xb = ceil(nX/2+15);
0030 ya = floor(nY/2-15);
0031 yb = ceil(nY/2+15);
0032 za = floor(nZ/2-2);
0033 zb = ceil(nZ/2+2);
0034 nx = xb-xa+1;
0035 ny = yb-ya+1;
0036 nz = zb-za+1;
0037 subVol = zeros(nx,ny,nz);
0038
0039 for i = 1:adwcount
0040
0041 [imageVol, lastfile] = GE_readVolume(inDir, i+1, volSize, 16, ...
0042 im_offset);
0043 subVol = imageVol(xa:xb,ya:yb,za:zb);
0044 vec(i) = mean(subVol(:));
0045
0046 fprintf('volnum = %d\tread %s\n',i,lastfile);
0047
0048 end
0049
0050 figure
0051 plot(im_hdr.tr*1E-6*(1:adwcount),vec/mean(vec))
0052 r = axis;
0053 text((r(2)+r(1))/2, (r(3)+r(4))/2+0.2*(r(4)-r(3)), sprintf('Mean Signal = %f\nStandard Dev = %f',mean(vec(75:adwcount)),std(vec(75:adwcount)/mean(vec(75:adwcount)))));
0054 title(inDir)
0055
0056 return
0057
0058
0059
0060
0061
0062
0063
0064