function [IM,NP,NV] = load_fdf(name,sliceno,imno) %---------------------------------------- %function load_fdf %Reads magnitude images in fdf format %Assumes, that the last entry in header is checksum %---------------------------------------- %Usage [IM,np,nv] = load_fdf(name,sliceno,imno); % %Input: %name = name of data directory without the .dat or .img extension %sliceno = slice number to read %imno = image number to read; optional % %Output: %IM = images, sorted by row %np = number of points in each FID (rows in IM); optional %nv = number of phase encoding lines (columns in each image); optional % %Examples: %[IM] = load_fdf('Test_data',1,1); %[IM np nv] = load_fdf('Test_data,',1,1); % %---------------------------------------- % Maj Hedehus, Varian, Inc., Oct 2001. % edited Nov 2003 -- Lulu Edwards (changed program to read in new names of files %---------------------------------------- % format input name dirname = sprintf('%s.img',name); if (exist(dirna...