how to fix multibrandread function
5 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
mohd akmal masud
am 8 Feb. 2021
Beantwortet: Walter Roberson
am 8 Feb. 2021
Hi all,
i want to use multibrandread function, but got error. this is my dicom image 128ASTITR2SUB8.dcm
which is my image have Rows=130, Columss=130, numberofFrames =90
this is my coding.
SPECTinfo = dicominfo('128ASTITR2SUB8.dcm');
fixedVolume = multibandread('128ASTITR2SUB8.dcm',...
[SPECTinfo.Rows, SPECTinfo.Columns, SPECTinfo.NumberOfFrames],...
'uint16=>single', 0, 'bsq', 'ieee-be' );
but i got error
Index exceeds the number of array elements (15).
Error in multibandread>readDiskFile (line 269)
im(:,destNdx(2),destNdx(3)) = data(srcNdx{1}-kStart+1);
Error in multibandread (line 165)
im = readDiskFile(filename, info, ndx, readOrder);
What does means by Index exceeds the number of array elements (15).????
Anyone can help me?
0 Kommentare
Akzeptierte Antwort
Walter Roberson
am 8 Feb. 2021
dcm files are binary files with structured binary segments. https://docs.fileformat.com/image/dcm/ . The first 128 bytes are reserved for comments, or binary 0 if unused. You are reading starting from byte 0, so you are reading the comments as-if they are data.
The easiest explanation for that error would be if SPECTinfo.Rows, SPECTinfo.Columns, and SPECTinfo.NumberOfFrames are all non-scalar.
0 Kommentare
Weitere Antworten (0)
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!