Hi; Someone please help me, how to do the same code with a set of images with a loop, and save only the first slice of each image?

1 回表示 (過去 30 日間)
Meriem YOUss
Meriem YOUss 2021 年 6 月 10 日
回答済み: Jan 2021 年 6 月 10 日
for sliceIndex = 1 : size(image3d, 3)
thisSlice = image3d(:,:,sliceIndex);
filename = sprintf('Slice #%d.png', sliceIndex);
imwrite(thisSlice, filename);
end

回答 (1 件)

Jan
Jan 2021 年 6 月 10 日

カテゴリ

Help Center および File ExchangeConvert Image Type についてさらに検索

製品


リリース

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by