changes fname to appropriate ROI format $Id$
0001 function roifname = my_roifname(fname) 0002 % changes fname to appropriate ROI format 0003 % 0004 % $Id$ 0005 0006 if nargin < 1 0007 fname = []; 0008 end 0009 roifname = fname; 0010 if isempty(fname) 0011 return 0012 end 0013 gend = maroi('classdata', 'fileend'); 0014 lg = length(gend); 0015 0016 [p f e] = fileparts(roifname); 0017 f2 = [f e]; 0018 if length(f2)<lg | ~strcmp(gend, [f2(end - lg +1 : end)]) 0019 roifname = fullfile(p, [f gend]); 0020 end 0021 % make absolute path 0022 roifname = spm_get('cpath', roifname);