Search code examples
matlabupgraderegressiondicom

MATLAB dicominfo fails in 2015b


When trying to open a DICOM file I get this: Index exceeds matrix dimensions.

Error in dicominfo>parsePerson (line 371)
                    personName(p).(pnParts{q}) = [personName(p).(pnParts{q}) '=' componentParts{q}];

However everything used to work smoothly in 2013a. Does anyone know what is the matter?


Solution

  • It's indeed a bug in Matlab R2015b. The solution to change p to q didn't work for me. This seems to work:

    Swap line 336 of dicominfo.m for

    personName = repmat(makePerson(pnParts),[1,numel(splitRawData)]);
    

    Swap line 354 of dicominfo.m for

    personName(p) = makePerson(pnParts);