Home > fmri > fsl > save_avw_complex.m

save_avw_complex

PURPOSE ^

SAVE_AVW_COMPLEX(img,fname,vsize)

SYNOPSIS ^

function save_avw_complex(img,fname,vsize)

DESCRIPTION ^

 SAVE_AVW_COMPLEX(img,fname,vsize) 

  Create and save an analyse header (.hdr) and image (.img) file
   for either a 2D or 3D or 4D array (automatically determined).
  Only for use with complex data.  (uses avwcomplex)

  vsize is a vector [x y z tr] containing the voxel sizes in mm and
  the tr in seconds  (defaults: [1 1 1 3])

  See also: SAVE_AVW, SAVE_AVW_HDR, SAVE_AVW_IMG,
            READ_AVW_COMPLEX, READ_AVW, READ_AVW_HDR, READ_AVW_IMG

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function save_avw_complex(img,fname,vsize)
0002 % SAVE_AVW_COMPLEX(img,fname,vsize)
0003 %
0004 %  Create and save an analyse header (.hdr) and image (.img) file
0005 %   for either a 2D or 3D or 4D array (automatically determined).
0006 %  Only for use with complex data.  (uses avwcomplex)
0007 %
0008 %  vsize is a vector [x y z tr] containing the voxel sizes in mm and
0009 %  the tr in seconds  (defaults: [1 1 1 3])
0010 %
0011 %  See also: SAVE_AVW, SAVE_AVW_HDR, SAVE_AVW_IMG,
0012 %            READ_AVW_COMPLEX, READ_AVW, READ_AVW_HDR, READ_AVW_IMG
0013 %
0014 
0015 save_avw(real(img),[fname,'R'],'f',vsize);
0016 save_avw(imag(img),[fname,'I'],'f',vsize);
0017 command=sprintf('! avwcomplex -complex %s %s %s \n',[fname,'R'],[fname,'I'],fname);
0018 eval(command);
0019 command=sprintf('! rm %s.hdr %s.img %s.hdr %s.img \n',[fname,'R'],[fname,'R'],[fname,'I'],[fname,'I']);
0020 eval(command);

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