First of all, I'd suggest updating from SPM12b (the beta version) to SPM12 (the official release).  There were some fixes made to some of the functions that help to handle large files.  These involved further changes that involved switching from using 32 bits to represent integers, to using 64 bits.  With only 32 bits, the largest offset into the file is 2^31 - 1, which is smaller than the number of bytes in many 4D files.

If the problem persists, I'd suggest checking that the file is as big as the header says it should be.  Look at the dimensions, datatype and offset into the file that are stored in the header and compare this with the size of the file.

P=spm_select(1,'nifti');
Nii = nifti(P);
disp(size(Nii.dat));
disp(Nii.dat.dtype)
disp(Nii.dat.offset)

Best regards,
-John


 

On 27 May 2015 at 05:30, 李勋 <[log in to unmask]> wrote:
Hi there, I've encountered a problem when dealing with preprocessed resting statefMRI data of HCP (human connectome project) by SPM12b. I used "spm_slice_vol" to read 4D files. However, data after a specific time point can not be recognized by SPM, and the MATLAB command window showed an error "file too small" .  Reading of each frames in 4D data is independent , right?  I'm not sure whether data or SPM has problem.
Looking foward to your reply!
 
2015-05-26

Li Xun