Hi Steve,
I never tried that, but should be really easy by loading SPM.mat,
reading the contrast names and renaming the respective con*.img/hdr
files. The matter is that SPM will probably create again the
con_0001.img, con_0002.img, ..., when you want to see the results.
The code to rename maybe something like this:
################
load SPM.mat
for i=1:length(SPM.xCon)
disp(SPM.xCon(1,i).name);
confile = SPM.xCon(1,i).Vcon.fname;
confilehdr = regexprep(confile, '\.img', '\.hdr');
conname = [SPM.xCon(1,i).name '.img']
connamehdr = [SPM.xCon(1,i).name '.hdr']
movefile([SPM.swd '\' confile],[SPM.swd '\' conname],'f'); % rename
img con file
movefile([SPM.swd '\' confilehdr],[SPM.swd '\' connamehdr],'f'); %
rename hdr con file
end;
%% Be aware that contrast names may contain illegal characters.
####################
Dorian.
2010/3/5 XL <[log in to unmask]>:
> If your OS supports symbolic link, it is a matter of using Matlab or shell
> script to create your desired contrast names pointing to the corresponding
> SPM con or t maps.
>
|