Since setting up lab in St Andrews I’ve consistently run into a DICOM Import Error that causes the process to terminate about half-way through. I finally fixed the problem today after a quick search on the SPM mailing list.
The error I was receiving was as follows:
Running ‘DICOM Import’
Changing directory to: D:Akira Cue Framing 2011PP03
Failed ‘DICOM Import’
Error using ==> horzcat
CAT arguments dimensions are not consistent.
In file “C:spm8spm_dicom_convert.m” (v4213), function “spm_dicom_convert” at line 61.
In file “C:spm8configspm_run_dicom.m” (v2094), function “spm_run_dicom” at line 32.The following modules did not run:
Failed: DICOM Import??? Error using ==> cfg_util at 835
Job execution failed. The full log of this run can be found in MATLAB command window, starting with the lines (look for the line
showing the exact #job as displayed in this error message)
——————
Running job #[X]
——————Error in ==> spm_jobman at 208
??? Error while evaluating uicontrol Callback
This was a little mysterious, as the appropriate number of nifti files appeared to be left after the process terminated unexpectedly.
The following link suggested an SPM code tweak that might fix it:
https://www.jiscmail.ac.uk/cgi-bin/webadmin?A2=ind1106&L=SPM&P=R49499&1=SPM&9=A&J=on&d=No+Match%3BMatch%3BMatches&z=4
The proposed fix from John Ashburner simply requires changing line 61 of spm_dicom_convert.m from:
out.files = [fmos fstd fspe];
to:
out.files = [fmos(:); fstd(:); fspe(:)];
Works like a charm!