Saves a parameter map to file from an fe structure. feSaveMapToNifti(fe,mapType, niftiName) Copyright (2013-2014), Franco Pestilli, Stanford University, pestillifranco@gmail.com.
0001 function feSaveMapToNifti(fe,mapType, niftiName) 0002 % Saves a parameter map to file from an fe structure. 0003 % 0004 % feSaveMapToNifti(fe,mapType, niftiName) 0005 % 0006 % 0007 % Copyright (2013-2014), Franco Pestilli, Stanford University, pestillifranco@gmail.com. 0008 0009 % Generate the requested map and save it to volume. 0010 map = feValues2volume((feGetRep(fe, mapType)),feGet(fe,'roi coords'),feGetRep(fe,'map size')); 0011 0012 % Generate a nifti structure for it. 0013 nii = niftiCreate('data',map,... 0014 'qto_xyz',feGet(fe,'xform img 2 acpc'),... 0015 'fname',niftiName); 0016 0017 % Write the nifti 0018 niftiWrite(nii); 0019 end