How to convert 4D image dicom to png by slice
1 回表示 (過去 30 日間)
古いコメントを表示
mohd akmal masud
2021 年 8 月 30 日
回答済み: Shadaab Siddiqie
2021 年 9 月 15 日
Hi all,
Anyone know how to convert 4D image dicom to png slice by slice. I try, but have error
clc
clear all
[I, cmap] = dicomread('I10');
dcmImagei = squeeze(I); % Check number of images
for k = 1:176
dcmImagei(:,:,k) = uint8(255 * mat2gray( dcmImagei));
imwrite(dcmImagei(:,:,k), sprintf('qqqmyGray%d.png', k));
end
ERROR
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.
0 件のコメント
採用された回答
Shadaab Siddiqie
2021 年 9 月 15 日
From my understanding you want to get slices of your image. You might be able use sliceviewer and orthosliceviewer for this task.
0 件のコメント
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Convert Image Type についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!