Anyone know how to convert 4D image dicom to png slice by slice. I try, but have error
[I, cmap] = dicomread('I10');
dcmImagei(:,:,k) = uint8(255 * mat2gray( dcmImagei));
imwrite(dcmImagei(:,:,k), sprintf('qqqmyGray%d.png', k));
Unable to perform assignment because the size of the left side is 258-by-258 and the size of
the right side is 258-by-258-by-176.