hi plz help me in this probleme i wont to créate a montage of dicom image with 26 images

1 view (last 30 days)
s = dicomread('SE000005\IM00000.dcm'); [r c] = size(s);
X = repmat(int16(0), [256 256 0 25])
for i=1:26
filename = sprintf('SE000005\\IM0000%d.dcm', i);
X(:,:,1,i) = dicomread(filename);
error in X(:,:,1,i) = dicomread(filename);(Subscripted assignment dimension mismatch.)

Accepted Answer

Image Analyst
Image Analyst on 10 Apr 2016
Do you have the right dimensions? Looks like it must be a 4-D array. From the help:
montage(I) displays all the frames of a multiframe image array I in a single image object. I can be a sequence of binary, grayscale, or truecolor images. A binary or grayscale image sequence must be an M-by-N-by-1-by-K array. A truecolor image sequence must be an M-by-N-by-3-by-K array.
What does this say:
whos X

Sign in to comment.

More Answers (0)


Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!