error reading Philips dicom images
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Search for matlab dicomread error I found only one post but no answer, so I ask the same question here.
Using this code:
My dicom image has only 3 slices.
for p=1:3 filename = sprintf('IM_0022.dcm', p); X(:,:,1,p) = dicomread(filename); end
error: ??? Assignment has more non-singleton rhs dimensions than non-singleton subscripts
I tried several modifications but still got the same error.
Please help and thanks for your time.
0 Kommentare
Antworten (1)
Youssef Khmou
am 15 Aug. 2013
hi pom,
You mean that your samples are named : 'IM_0022.dcm1, 'IM_0022.dcm2, 'IM_0022.dcm3 ?
If this is the case then you have string concatenation rather than sprintf simply because the last function does not take the variable p as string :
try :
for p=1:3
filename=strcat('IM_0022.dcm',num2str(p));
X(:,:,1,p) = dicomread(filename);
end
0 Kommentare
Siehe auch
Kategorien
Mehr zu DICOM Format finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!