what you observe is very likely due to a bug present in older versions
of SPM5 (in @nifti/private/write_hdr_raw.m to be precise), see:
This is now fixed in the current set of updates:
so I strongly suggest that you update your SPM5 version.
Also, note that this error appears because there are directories in your
MATLAB path that contain images with the same filename than the images
that should be created in your current analysis.
It is good practice to restrict one's MATLAB path to the minimal set of
directories (do not use "Add with Subfolders") and, for example, not
including directories containing data or SPM analyses.
I hope this helps.
Wang, Ling wrote:
> Dear All,
> I met a sort of strange situation. I did not get .hdr files but only
> .img files for some of my subjects after statistical analysis. I used
> the same script for statistical analysis, but for some subjects I can
> get regularly .hdr and .img files. I searched the spm mailing list but
> did not find the similar problems. It would be highly appreciated if
> someone could give me some hints! Thank you in advance!
> Our working environment is: SPM5 (spm_spm.m version 649), Matlab7.3.0
> (R2006b), Linux.
> Best wishes,
Guillaume Flandin, PhD
Wellcome Trust Centre for Neuroimaging
University College London
12 Queen Square
London WC1N 3BG