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 日間)
古いコメントを表示
for sliceIndex = 1 : size(image3d, 3)
thisSlice = image3d(:,:,sliceIndex);
filename = sprintf('Slice #%d.png', sliceIndex);
imwrite(thisSlice, filename);
end
0 件のコメント
回答 (1 件)
参考
カテゴリ
Help Center および File Exchange で Get Started with MATLAB についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!