Dear SPMers,
I am struggling to conduct slice timing correction with batch. I have used part of the template 'face_rep_spm12_batch.m' from http://www.fil.ion.ucl.ac.uk/spm/data/face_rep/
For the following batch script:
nslices = 32;
TR = 1.97;
spm('Defaults', 'fMRI');
spm_jobman('initcfg');
clear matlabbatch;
matlabbatch{1}.spm.spatial.realign.estwrite.data{1} = cellstr('sub_ ... _bold.nii');
matlabbatch{2}.spm.temporal.st.scans{1} = cellstr('rsub_ ... _bold.nii');
matlabbatch{2}.spm.temporal.st.nslices = nslices;
matlabbatch{2}.spm.temporal.st.tr = TR;
matlabbatch{2}.spm.temporal.st.ta = TR - (TR/nslices);
matlabbatch{2}.spm.temporal.st.so = nslices:-1:1;
matlabbatch{2}.spm.temporal.st.refslice = round(nslices/2);
spm_jobman('run', matlabbatch);
the following error appears:
Item 'Session', field 'val': Number of matching files (1) less than required (2).
Error using spm_jobman>fill_run_job (line 461)
No executable modules, but still unresolved dependencies or incomplete module
inputs.
Error in spm_jobman (line 247)
sts = fill_run_job('run', cjob, varargin{3:end});
It seems that the only difference between my script and the SPM template is that I use '.nii' rather than '.img' files. The solution is probably very easy... Sorry for bothering you!
Best,
Wiktor
|