필터 지우기
필터 지우기

How can I save all slices from 3D image?

조회 수: 1 (최근 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 CenterFile Exchange에서 Images에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by