How can I save all slices from 3D image?

2 ビュー (過去 30 日間)
Haytham Ali
Haytham Ali 2022 年 1 月 12 日
回答済み: KSSV 2022 年 1 月 12 日
I am using this code but not working good it save only one slice
for i=1:45
slice=Myimage(:,:,i);
saveas(gcf,'slice_i.png')
end

回答 (1 件)

KSSV
KSSV 2022 年 1 月 12 日
for i=1:45
slice=Myimage(:,:,i);
pcolor(slice) ; shading interp
fname = ['slice_',num2str(i),'.png'] ;
saveas(gcf,fname)
end

カテゴリ

Help Center および File ExchangeImage Processing Toolbox についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by