I saw some messages posted this summer about an error:
??? Attempted to access (2); index out of bounds because numel()=0.
when running spm5 DICOM Import, but I didn't see any resolution
posted.
Running on a 64bit Opteron box, Redhat Enterprise Linux, I had no
problems with matlab version Version 7.1.0.183 (R14) Service Pack 3.
When we switched to Version 7.2.0.283 (R2006a) I started getting
the numel()=0 problem on the same dicom files that worked under 71.
The problem was that the file pointer offset was getting off so the
wrong fields were being read.
I believe this may be due to this matlab issue:
http://www.mathworks.com/support/solutions/data/1-2782ZU.html?solution=1-2782ZU
In my copy of spm_dicom_headers.m in the decode_csa2() function I changed
the fread(,,'char') calls to fread(,,'uint8') and my numel=0 problem was
fixed. I think the pointer got off just in the
t(i).name = fread(fp,64,'char')';
call, but I changed all char reads except the *char read.
Not sure if this is the right fix, or if really matlab should do
something...
kate
|