I could only replicate this problem by removing write-permission from the
file. If this is not the cause, then it could be useful to know which
release of SPM5 you are using, which MATLAB version and what sort of computer
you are running it on.
Best regards,
-John
> I am running a routine that uses spm function spm_read_vols and on one data
> folder (namely, E04), it runs fine, but on another (namely E06) I get the
> following error message. Both folders contain similarly processed data
> (that is, realigned and resliced nifti volume files).
>
> --------Error message: -----
> Found 104 ruvol*.* images in the folder ...\NiftiFiles\func-MoCoed\E06
>
> ??? Error using ==> @nifti\private\read_hdr
> Error reading header file "ruvol_001.nii"
>
> Error in ==> nifti.nifti at 27
> vol = read_hdr(fname);
>
> Error in ==> spm_vol_nifti at 16
> N = nifti(fname);
>
> Error in ==> spm_vol>subfunc at 121
> if isempty(n), V = spm_vol_nifti(p);
>
> Error in ==> spm_vol>subfunc1 at 83
> v = subfunc(P(i,:));
>
> Error in ==> spm_vol>subfunc2 at 71
> V = subfunc1(P);
>
> Error in ==> spm_vol at 57
> V = subfunc2(P);
>
> Error in ==> US_BOLD_Nifti at 91
> [CubeRaw_unrotated,XYZ]=spm_read_vols(spm_vol(ruvol_files));
> ----error message end ----
>
> Seems like the function read_hdr has some problem with the volume's
> header, but I don't see a reason why.
> I am just puzzled, I would appreciate any help. I am also attaching
> ruvol_001.nii.
> Thanks,
|