returns vols in appropriate format for saving in design FORMAT V = design_vol(D, imgs) Input D - mardo design object imgs - image names or vol structs Output V - paths relative to swd $Id$
0001 function V = design_vol(D, imgs) 0002 % returns vols in appropriate format for saving in design 0003 % FORMAT V = design_vol(D, imgs) 0004 % 0005 % Input 0006 % D - mardo design object 0007 % imgs - image names or vol structs 0008 % 0009 % Output 0010 % V - paths relative to swd 0011 % 0012 % $Id$ 0013 0014 if nargin < 2 0015 error('Need image information'); 0016 end 0017 0018 if isstruct(imgs) % vol struct, check for absolute path name 0019 imgs = strvcat(imgs(:).fname); 0020 end 0021 if iscell(imgs) 0022 imgs = char(imgs); 0023 end 0024 if ischar(imgs) 0025 V = spm_str_manip(imgs, 't'); 0026 else 0027 error('Odd input format for images'); 0028 end 0029